Ryzen igpu UMA carveout, VRAM allocation on linux, finally found how to change it

Posted by Olwaht@reddit | linux | View on Reddit | 6 comments

so I have an HP OmniBook X Flip 14 (Ryzen AI 7 350, Radeon 860M 24ram/1tb). when I was still on Windows I used to change the UMA carveout directly in AMD Adrenalin, Then as planned for that laptop, I switched to Linux (arch btw) and realized there's just no option to change it anymore. the HP BIOS doesn't have a setting for iGPU VRAM at all and as i understand a lot of laptops with this APU have the same problem, it's completely hidden.

I started looking for ways to fix it. Smokeless UMAF can actually find the hidden AMD CBS settings in the BIOS, but HP uses Insyde H2O so UMAF can read everything but can't save anything. every other tool people recommend hits the same wall. the only remaining options were finding a way to boot Windows again and use Adrenalin, that not sounded fun.

Kernel 7.0 added some new sysfs files for AMD APUs specifically for UMA carveout. So i checked if its here on my machine

ls /sys/class/drm/card*/device/uma/

It was here, genuinely didn't expect that after 2-3 months of trying and using this laptop

cat /sys/class/drm/card1/device/uma/carveout_options

cat /sys/class/drm/card1/device/uma/carveout

Mine showed: 0: Minimum (512 MB) 1: (1 GB) 2: (2 GB) 3: (4 GB) 4: (6 GB) 5: Medium (8 GB) 6: (12 GB), and confirmed I was sitting at index 0 (512MB). so I just did:

echo 5 | sudo tee /sys/class/drm/card1/device/uma/carveout

reboot

After reboot i'm back to 8GB, finaly

Then i changed gtt memory settings so i dont use so much of so called shared memory bc i don't need it anymore

As far as i find, its related to Atom ROM. if your BIOS doesn't expose ATCS the /uma/ directory simply won't be there, so there's no harm in checking.

Posting this because I couldn't find anyone talking about it and spent way too long thinking I needed Windows for this. if you're on any AMD APU laptop and you've been stuck fighting with BIOS restrictions for this, just check if the directory exists. might save you a lot of pain