[OPEN] XORG high CPU

First check the forums - Do not know where to put it then put it here
Post Reply
User avatar
uniquegch
Crewman
Posts: 6
Joined: Wed Mar 16, 2022 10:12 am

greeting fellow Arco Linuxer,

I have Arco Linux installed on two laptops and my main unit (XMG Fusion 15 with Nvidia 1660TI, two screens both 1920x1080 (Laptop 144Hz, external screen 240hz G-Sync) show in HTOP a "high" CPU usage between 45%-65% for the process

/usr/lib/Xorg -nolisten tcp -background none -seat seat0 vtl -auth /var/run/sddm/{} -noreset -displayfd 18

My research came up with a possible problem with some apps and the managing of presenting the output on the screens of the apps.

I used Budgie DE, but that was also in the 25%+ CPU Usage.
Running pstree -p PID show several child processes for budgie-wm and ibus-dconf, ibus engine etc.

So I switched to Cinnamon and the Cinnamon wm is much lower in CPU usage, but I went further and now running XCFE which the xfwm4 is deeply relaxed below 1.0 % CPU usage.

Now I would like to get more information to the XORG CPU load and what could be done to improve it.

Thanks
Today I am doing nothing and I am ahead in time :mrgreen:
User avatar
erikdubois
Captain
Posts: 5125
Joined: Tue Nov 07, 2017 3:45 pm
Location: Belgium
Contact:

Not my cup of tea

leaving this post to others.
Learn, have fun and enjoy.
But first use the power of the Arch Wiki
use the tutorials on https://www.youtube.com/erikdubois
then use the power of google
then use the power of our moderators.
User avatar
uniquegch
Crewman
Posts: 6
Joined: Wed Mar 16, 2022 10:12 am

I did some more research and tinkering around.
  • I changed Display Managers. Installed LXDM, removed SDDM, disabled SDDM regards systemctl, enabled LXDM. Rebooted the system and same result regardx XORG CPU Usage.
    So I switched back to SDDM.
  • with XFCE as DE it does not remember after reboot that a second screen was active and placed where. I started htop with only the laptop screen and saw the CPU Usage was around 2%. The moment I activated the 2nd screen the CPU went up to over 50% and stayed there.
  • I was wondering what happens if I reduce the refresh rate from the external monitor from 240hz to match the laptop screen refresh rate for 144hz. And the result is the CPU is now in the 30% range not getting over 40%.
    Both screen run 1920x1080 resolution.
I will keep on looking into Xorg and if I could move to Wayland.
Today I am doing nothing and I am ahead in time :mrgreen:
User avatar
uniquegch
Crewman
Posts: 6
Joined: Wed Mar 16, 2022 10:12 am

today I have configured my Arco Linux main laptop with Wayland and gnome (not my favorite DE but for the purpose it is the easiest).
and the result is astonishing. /usr/lib/Xwayland :1 -rootless- noreset -accessx -core -auth .... has a CPU utilisation of below 2%, while using both screens with its max refresh rate (Laptop 144Hz, LG 240Hz).
But games seem not run when in Steam, just tried one and got logged out.
Also it is to mention that it is Xwayland using as WM: Mutter. DE: GNOME 42.5.

Below are the steps I did on my system followig that youtube video Wayland on Arch Linux (with Nvidia proprietary driver) https://www.youtube.com/watch?v=_YtgszmnfN8 and they worked. AS DISCLAIMER , it worked on MY laptop, but might not work on yours or even make it under circumstances unbootable?

https://wiki.archlinux.org/title/NVIDIA ... de_setting

"... 1.3 DRM kernel mode setting ..."
"... To enable DRM (Direct Rendering Manager) kernel mode setting, add the nvidia_drm.modeset=1 kernel parameter. ..."
1. open terminal
2. sudoedit /etc/default/grub

Code: Select all

sudoedit /etc/default/grub
3. adding at the end of the line GRUB_CMDLINE_LINUX_DEFAULT= ... nvidia_drm.modeset=1
4. CRTL + X -> safe
5. sudo grub-mkconfig -o /boot/grub/grub.cfg

Code: Select all

sudo grub-mkconfig -o /boot/grub/grub.cfg
"... 1.3.1 Early loading ..." based on that paragraph and the video I have also added the modules into the mkinitcpio
6. sudoedit /etc/mkinitcpio.conf

Code: Select all

sudoedit /etc/mkinitcpio.conf
7. adding at the end of the line MODULES="... nvidia nvidia_modeset nvidia_uvm nvidia_drm"
8. CRTL + X -> safe

"... mkinitcpio ..."
because the entry was done manually it is addresses when updating the nvidia drivers it has be repeated OR using #pacman hook

9. ls -la OR cat /etc/pacman.d/hooks/nvidia.hook <- check if nvidia.hook file exisits

Code: Select all

cat /etc/pacman.d/hooks/nvidia.hook 
10. because I already had the entry as shown in the documentation I did close the file

Installation of GNOME DE using the Arco Linux Tweak Tool. I did try with Qtile, but do not have any knowledge regarding DEs based on Xmonad (Qtile is a fork of it). I could select it at the login (back to SDDM) but screen stayed black, had to hit CRTL + ALT + DEL to reboot.
Today I am doing nothing and I am ahead in time :mrgreen:
User avatar
uniquegch
Crewman
Posts: 6
Joined: Wed Mar 16, 2022 10:12 am

SUMMARY:

using Wayland/XWayland with Mutter shows a much lower CPU usage (2% or less) regarding Display Management compared to XORG (50+%) by using two screens with same resolution (1920x1080) and max refresh rate of Lapto 144hz and LG 240Hz with G-Sync and Nvidia GPU.

Also the CPU temperature is up to 10° C lower with Wayland/Xwayland (50°+) compared to XORG 59° and more.
This also applies when playing games.
BUT using games in STEAM has its problems that many games are programmed using XORG and will not run (in my case just gettig logged out when starting the game) with Wayland. But this is a different topic.

The kernel settigs and mkinitcpio module settings have no impact when using an XORG based DM and WM.
Today I am doing nothing and I am ahead in time :mrgreen:
User avatar
erikdubois
Captain
Posts: 5125
Joined: Tue Nov 07, 2017 3:45 pm
Location: Belgium
Contact:

always remember

- "FOR ME" -

it will not be the same on other hardware.
Learn, have fun and enjoy.
But first use the power of the Arch Wiki
use the tutorials on https://www.youtube.com/erikdubois
then use the power of google
then use the power of our moderators.
Post Reply

Return to “General Questions”