I recently installed on an older machine the latest Manjaro KDE. I have been experiencing high CPU usage from kwin_x11 and Xorg (like 25-30% each). I have disabled compositor and it the usage is back to normal. I am pasting the output of inxi -Fayz and mhwd -li. Is there any way to have it enabled and not consume so much CPU? CPU is a bit old and GPU is a bit newer (both are old…)
EDIT 1: I also tried changing to the 5.4 kernel and there is no change
> Installed PCI configs:
--------------------------------------------------------------------------------
NAME VERSION FREEDRIVER TYPE
--------------------------------------------------------------------------------
video-linux 2018.05.04 true PCI
video-nvidia-390xx 2020.11.30 false PCI
Warning: No installed USB configs!
Uhm, so you have downgraded your kernel… Any reason you avoid just released 5.10 which will be new LTS? Your problem could have been resolved months ago in new kernel but we don’t know that unless it’s tested. And if it’s not, then at least bug report will have strong grounds as existing in newest kernel version.
Install 5.4 LTS kernel and if needed then reinstall video-nvidia-390xx
If you have a custom /etc/X11/mhwd.d/nvidia.conf you should make a backup of it, and restore it later, or simply leave it be generated again.
I have been running on 5.4 LTS kernel to avoid any new bugs. (I have not tested yet 5.10 but I doubt that newer kernels will fix a problem on such an old machine).
I removed video-linux (with mhwd -r pci video-linux) and cleared any custom files from /etc/X11
Still nvidia-smi states that there is no GPU acceleration and enabling compositor increases kwin_x11 and Xorg cpu usage to 15-20%. I think that it is not even using the GPU to be honest (but I am yet a noob).
> Installed PCI configs:
--------------------------------------------------------------------------------
NAME VERSION FREEDRIVER TYPE
--------------------------------------------------------------------------------
video-nvidia-390xx 2020.11.30 false PCI
Warning: No installed USB configs!
There is no such file now after I deleted it. And I remember that I had to generate that file by myself. Yes OpenGL renderer is always set like that from the start
And why would you delete it? No, a default is generated automatically … and for custom things, edited carefully.
Also you should have /etc/modules-load.d/mhwd-gpu.conf with this content in it:
nvidia
nvidia-drm
and inside /etc/modprobe.d/mhwd-gpu.conf you should have:
blacklist nouveau
blacklist ttm
blacklist drm_kms_helper
blacklist drm
I gather you did not install the nvidia driver properly. Try this: sudo pacman-mirrors -f5 && sudo pacman -Syyu
then sudo mhwd -f -i pci video-nvidia-390xx
And let us know if the /etc/X11/mhwd.d/nvidia.conf is generated … share it unaltered, we might try something to it to test it…Then reboot.
Also I noted that nvidia-smi never reports any processes but nvidia-settings shows GPU utilization when viewing a video in browser. Still with enabled compositor, the problem persists. Maybe the KDE compositor cannot use the GPU by default and we are searching for nothing? I don’t know…
EDIT: Still renderer shows up as OpenGL: renderer: llvmpipe (LLVM 11.0.0 128 bits)
I’m going to follow this thread because I have a similar problem. But mine manifests its self when I use Vivaldi. It calms down when I close Vivaldi and use Firefox.
Vivaldi, Chrome and any Chromium-based browsers use more CPU than Firefox generally I think. In this case with the wrong OpenGL renderer, the difference is higher as I can observe.
But my main problem still stands with the wrong OpenGL renderer and the compositor using too many resources when on.
SOLUTION: I fixed the problem by referring to some old arch forum posts.
I had this
$ cat /var/log/Xorg.0.log | grep EE
[ 3.130] (EE) NVIDIA: Failed to load module "glxserver_nvidia" (module does not exist, 0)
[ 3.130] (EE) NVIDIA(0): Failed to initialize the GLX module; please check in your X
[ 3.130] (EE) NVIDIA(0): log file that the GLX module has been loaded in your X
[ 3.130] (EE) NVIDIA(0): server, and that the module is the NVIDIA GLX module. If
[ 3.130] (EE) NVIDIA(0): you continue to encounter problems, Please try
[ 3.130] (EE) NVIDIA(0): reinstalling the NVIDIA driver.
and after adding these lines to /etc/X11/mhwd.d/nvidia.conf
the renderer has switched to the GPU! Thank you very much for your help @bogdancovaciu and helping me understand the nvidia.conf and other .conf files differences.
nvidia drivers have unresolved bugs for a few months and are not so stable … in combination with chromium based browsers it causes driver crashes … turning off hw acceleration in these browsers helps with this … drivers still not entirely stable, but much better overall while not under heavy load by browser