r/NixOS • u/MasterCraftXT • 2d ago
GPU using more power in NixOS
My GPU is idling at 30-50 Watts in nixos, while just using 4-5 Watts in CachyOS.
Any help?
Thanks in advance :)
6
u/Jacobobarobatobski 2d ago edited 2d ago
I THINK you're amdgpu.nix file is suspiciously lacking. I THINK you need:
hardware.graphics = { enable = true; enable32Bit = true;
};
Also lact specifically messes with power profiles in GPUs so a good test could be to comment it out and see how that goes. But the way I'm seeing it your graphics stack isn't complete.
This is from the wiki:
Basic Setup For ordinary desktop / gaming usage, AMD GPUs are expected to work out of the box. As with any desktop configuration though, graphics acceleration does need to be enabled.
hardware.graphics = { enable = true; enable32Bit = true; };
1
u/MasterCraftXT 2d ago
Didn't help :/
For lact im using the exact same settings on both nix and cachy
2
1
u/Raviexthegodremade 2d ago
Something I've realized for LACT is that it needs one other thing for the Daemon to be able to actually apply changes at times on Nix, which is to add the LACT package to 'systemd.paclages', as well as set 'systemd.services.lactd.wantedBy = ["multi-user.target"];'.
3
u/ZackSousa 2d ago
Can you check if you're using the same driver version on both distros? I'd bet in driver differences or kernel differences, like the other guy suggested
3
u/ssynths 2d ago
Remove hardware.amdgpu.overdrive.enable = true (or set hardware.amdgpu.overdrive.ppfeaturemask = "0xfff7ffff" if you undervolt or overclock)
NixOS's overdrive mask prevents the gpu from totally idling.
4
u/MasterCraftXT 2d ago edited 2d ago
It partially fixed it, GPU now drops down to 1-4 MHz, but still draws around 16 Watts
(I changed it to the overdrive method you mentioned)
1
u/InfusedBush 2d ago
I’m having similar problems. I have AMD Radeon 890M integrated graphics that could play satisfactory 1080p@120Hz just fine in Arch Linux but now in NixOS I get around 100Hz. I also have graphics.hardware enabled and 32bit enabled
1
u/Spoonwastakenalready 2d ago
Been having a similar ish problem in addition to having performance differences and gpu usage being higher on nixos than arch. Higher gpu load but less performance.
-36
2d ago
[removed] — view removed comment
13
u/ZackSousa 2d ago
read the room, bro forgot what sub hes in
also, thats a pretty dumb and unhelpful way to answer a technical question...
5
4
18
u/ABrainlessDeveloper 2d ago
Some questions: is there any difference in term of kernel version between NixOS and catchyos? Kernel boot options? Things that are running on idle?
Usually this is bcs the gpu is stuck at high memory clock, which could be caused by either driver/kernel regression or something hogging the gpu.