High CPU usage on xorg when the external monitor is plugged in

I also have the same issue as OP on Manjaro Linux.

Hybrid graphis - Intel + Nvidia.

Nvidia GeForce GTX 1650 Mobile

Running Manjaro
Kernel: 5.9.16-1-MANJARO

I have exactly the same problem on Fedora 33 on Lenovo P51 (Intel and Nvidia). Xorg cpu usage is always over 30% . I suspect the periodic Zoom hangs (over 300% cpu usage for a few minutes) are related.
Changing the configuration in BIOS from “Hybrid” to “Discrete”(Nvidia only) fixes the problem, but one has to remember to change BIOS settings every time the laptop is taken out of the dock :)

Nvidia packages are 3:460.67-1.fc33, kernel is 5.11.10 . From the lspci -k :

00:02.0 VGA compatible controller: Intel Corporation HD Graphics 630 (rev 04)
Subsystem: Lenovo Device 224d
Kernel driver in use: i915
Kernel modules: i915

01:00.0 3D controller: NVIDIA Corporation GM206GLM [Quadro M2200 Mobile] (rev a1)
Subsystem: Lenovo Device 224d
Kernel driver in use: nvidia
Kernel modules: nouveau, nvidia_drm, nvidia
01:00.1 Audio device: NVIDIA Corporation GM206 High Definition Audio Controller (rev a1)
Kernel driver in use: snd_hda_intel
Kernel modules: snd_hda_intel

I’m experiencing the same problem on a X1 extreme gen 2 running pop os.
The CPU load of the same exact process “/usr/lib/xorg/Xorg vt2 -displayfd 3 -auth /run/user/1000/gdm/Xauthority -nolisten tcp -background none -noreset -keeptty -novtswitch -verbose 3” is always very high especially when I connect my external monitors.
I’m desperately trying to fix this problem since the summer is coming and the laptop’s cpu temperatures are getting out of control.

I too have this problem. I need to investigate and characterise it more fully (tomorrow) but in the mean time, is there any further activity on this thread?

I have the same problem in an Acer Predator Helios 300 laptop, with a 1660 gtx gpu. I would also add that when I turn off the laptop display, everything but the mouse becomes super slow in the display connected to the hdmi output.

Could this have anything to do with the issue? DisplayLink displays runs at 1FPS when laptop lid is closed. (#1028) · Issues · xorg / xserver · GitLab

The same problem on Lenovo Legion 5 Ryzen 4800H GTX1650ti in hybrid graphics mode with external monitor (via HDMI). Ubuntu 21.04, kernel: 5.13.5-051305-generic, nvidia driver: 470.57.02
Happy to help with logs or experiments if required!

Same problem here, not with hybrid graphics but with an actual graphics card (RTX 3080), I have provided an exhaustive list of the troubleshooting steps I took while trying to fix this problem as well as a bug-report log in this thread : Very High Xorg CPU usage using latest Drivers with an RTX 3080

i also have this problem running:
popos 21.04
nvidia driver 470.57.02
gtx 1070ti (3monitors)
i5 8600k

I have 4 monitors with mixed refresh rates running on KDE and used to have high GPU usage plus high usage on one cpu core. The settings I found that seemed to fix it were Allow Flipping in nvidia-settings, and using Option “UseNvKmsCompositionPipeline” “false” in xorg conf. Turning off Allow Flipping got rid of the high cpu usage, and the xorg option got rid of the high gpu usage. Now on idle desktop, cpu is at 0% and gpu is at 0-2%. May or may not help in your case, but maybe worth a try.

Okay i had this problem, you need to switch your rending back-end to Xrender, some things may not work properly, like video playback on your external monitor may drop some frames, and things like games may tear a little, but you wont have 1 of your cores tied up by the compositor catching one of NVIDIA™s bugs over and over, im not even sure why it works, nothing in the log indicates it should but my knowledge is limited, im not gonna question it tho

Same problem for me on a Lenovo P1 Gen2 (NVIDIA Corporation TU117GLM [Quadro T2000 Mobile / Max-Q] / Mesa Intel® UHD Graphics 630 (CFL GT2)) and Ubuntu 21.04.

Not sure about it, but I think it doesn’t start happening until I call xrandr to set the displays.

Can confirm it doesn’t happen on prime-select nvidia and “Perform Maximum Performance”.

This is also happening to me when connected to an external display. In hybrid mode GPU usage is at 30-40% and CPU usage on xorg is ~50%. This is idle and they never drop below that. Switching to Performance Mode i.e. fully discrete GPU fixes the issue. The solution isn’t ideal, because when not connected to external display, I’d like to use integrated gpu for better battery life. Now I need to restart every time to switch between the modes.

I have Lenovo ThinkBook 16p Gen 2 which has AMD integrated GPU and NVidia 3060 RTX. Running latest Ubuntu 21.04 and nvidia drivers 470.63.01.

(post deleted by author)

relevant bug report on the Pop OS Github page:

https://github.com/pop-os/pop/issues/1662

It happened to me also with a fresh ubuntu 21.10 install with 470 and 495 drivers (not with nouveau). Running on an asus strix g512 with rtx2070. Only happening on linux (not windows) and with the secondary monitor plugged into the HDMI port.

After reading this thread I’ve done what @correo1 suggested and it worked:

  • Go to the NVIDIA X Server app and under PRIME Profiles select the “Performance Mode” option, and then reboot (by default is selected “On-Demand” ).

Have a great day!

This issue still exists and practically makes On-Demand profile useless with external monitors. Any updates?

Same problem here, guys… when the second monitor is plugged in Xorg and nv_queue goes up on CPU.
changed settings on bios to discrete so I could work, but as people said above this is not a solution.

Details of my machine:

lsb_release -a:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.4 LTS
Release: 20.04
Codename: focal

lspsi -k:

01:00.0 VGA compatible controller: NVIDIA Corporation GP104BM [GeForce GTX 1070 Mobile] (rev a1)
Subsystem: CLEVO/KAPOK Computer GP104BM [GeForce GTX 1070 Mobile]
Kernel driver in use: nvidia
Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia

dpkg -l | grep nvidia
ii libnvidia-cfg1-510:amd64 510.47.03-0ubuntu0.20.04.1 amd64 NVIDIA binary OpenGL/GLX configuration library
ii libnvidia-common-510 510.47.03-0ubuntu0.20.04.1 all Shared files used by the NVIDIA libraries
ii libnvidia-compute-510:amd64 510.47.03-0ubuntu0.20.04.1 amd64 NVIDIA libcompute package
ii libnvidia-compute-510:i386 510.47.03-0ubuntu0.20.04.1 i386 NVIDIA libcompute package
ii libnvidia-decode-510:amd64 510.47.03-0ubuntu0.20.04.1 amd64 NVIDIA Video Decoding runtime libraries
ii libnvidia-decode-510:i386 510.47.03-0ubuntu0.20.04.1 i386 NVIDIA Video Decoding runtime libraries
ii libnvidia-encode-510:amd64 510.47.03-0ubuntu0.20.04.1 amd64 NVENC Video Encoding runtime library
ii libnvidia-encode-510:i386 510.47.03-0ubuntu0.20.04.1 i386 NVENC Video Encoding runtime library
ii libnvidia-extra-510:amd64 510.47.03-0ubuntu0.20.04.1 amd64 Extra libraries for the NVIDIA driver
ii libnvidia-fbc1-510:amd64 510.47.03-0ubuntu0.20.04.1 amd64 NVIDIA OpenGL-based Framebuffer Capture runtime library
ii libnvidia-fbc1-510:i386 510.47.03-0ubuntu0.20.04.1 i386 NVIDIA OpenGL-based Framebuffer Capture runtime library
ii libnvidia-gl-510:amd64 510.47.03-0ubuntu0.20.04.1 amd64 NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii libnvidia-gl-510:i386 510.47.03-0ubuntu0.20.04.1 i386 NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii linux-modules-nvidia-510-5.13.0-30-generic 5.13.0-30.33~20.04.1 amd64 Linux kernel nvidia modules for version 5.13.0-30
ii linux-modules-nvidia-510-generic-hwe-20.04 5.13.0-30.33~20.04.1 amd64 Extra drivers for nvidia-510 for the generic-hwe-20.04 flavour
ii linux-objects-nvidia-510-5.13.0-30-generic 5.13.0-30.33~20.04.1 amd64 Linux kernel nvidia modules for version 5.13.0-30 (objects)
ii linux-signatures-nvidia-5.13.0-30-generic 5.13.0-30.33~20.04.1 amd64 Linux kernel signatures for nvidia modules for version 5.13.0-30-generic
ii nvidia-compute-utils-510 510.47.03-0ubuntu0.20.04.1 amd64 NVIDIA compute utilities
ii nvidia-driver-510 510.47.03-0ubuntu0.20.04.1 amd64 NVIDIA driver metapackage
ii nvidia-driver-local-repo-ubuntu2004-460.32.03 1.0-1 amd64 nvidia-driver-local repository configuration files
ii nvidia-kernel-common-510 510.47.03-0ubuntu0.20.04.1 amd64 Shared files used with the kernel module
ii nvidia-kernel-source-510 510.47.03-0ubuntu0.20.04.1 amd64 NVIDIA kernel source package
ii nvidia-prime 0.8.16~0.20.04.1 all Tools to enable NVIDIA’s Prime
ii nvidia-settings 470.57.01-0ubuntu0.20.04.3 amd64 Tool for configuring the NVIDIA graphics driver
ii nvidia-utils-510 510.47.03-0ubuntu0.20.04.1 amd64 NVIDIA driver support binaries
ii screen-resolution-extra 0.18build1 all Extension for the nvidia-settings control panel
ii xserver-xorg-video-nvidia-510 510.47.03-0ubuntu0.20.04.1 amd64 NVIDIA binary Xorg driver

Any update to this? I’m pretty disappointed in my new laptop with 3070 + AMD hybrid graphics. Using any external display via HDMI or DP causes extremely high CPU usage doing nothing. If the above comments are true, it’s also flooding my SSD with needless writes, probably shortening its life, too.

Using discrete graphics only is not a solution either; battery life would be horrendous, and on top of that, the nVidia drivers (for both discrete only via mux, or using prime-run) result in NV-GLX error 156 when running some 32-bit OpenGL applications…forcing me to use the iGPU (which works perfectly fine). Further, when running discrete-only, the backlight controls do not work, it’s stuck on full brightness.

I feel boxed into a corner having paid a premium for top-tier hardware that doesn’t work properly for some basic/fundamental things, like an external display, 32-bit programs, and backlight control…