Hi all.
I recently updated my system and a bunch of games that were fine now have low GPU and CPU utilization.
I’m using an intel/nvidia laptop and the problems are similar on both GPUs.
What is strange is that I have benchmarked both the GPU and CPU independently and they perform as expected however when I run certain graphical programs such as glxgears or vkcube I get fps in the 20s.
$ VK_INSTANCE_LAYERS=VK_LAYER_MESA_overlay VK_LAYER_MESA_OVERLAY_CONFIG=help vkcube
I tried profiling vkcube
and apparently writev
is taking a lot of time. I’m not sure what to make of this or if this is worth pursuing further.
gprofng display text --functions ./test.5.er/
9.327 100.00 9.327 100.00 <Total>
7.705 82.62 7.705 82.62 writev
1.041 11.16 1.041 11.16 sched_yield
0.270 2.90 0.270 2.90 ioctl
...
When I run a game, there is consistently exactly one process that is using 100% of a CPU core. I’d imagine this is the bottleneck. I believe that the CPU is boosting correctly.
Performance also scales with window size.
The only game that I have tested that does not have behavior is factorio where if i have the in game video driver setting set to wayland I get normal performance, but if I set it to X11, I get poor performance. FreeCAD and OpenSCAD also have good performance.
Here is some of my configuration:
hardware.nvidia = {
open = false;
package = config.boot.kernelPackages.nvidiaPackages.beta;
modesetting.enable = true;
powerManagement = {
enable = true;
finegrained = true;
};
nvidiaPersistenced = true;
};
hardware.graphics = {
enable = true;
extraPackages = with pkgs; [
vaapiIntel
vaapiVdpau
libvdpau-va-of thegl
intel-media-driver
nvidia-vaapi-driver
];
};
boot.initrd = {
systemd.enable = true;
kernelModules = [ "vfat" "nls_cp437" "nls_iso8859-1" "usbhid" "amdgpu" ];
...
}
I am on sway, using kernel 6.13.0, have nix version 2.24.12. I have tested with the nvidia 565.77 driver and the 550 driver.