19

Fresh install on a Thinkpad W530 with Ubuntu 20.04. The installation had no problem, but after rebooting, everything is extremely slow. When I unplug the monitor (DisplayPort) and use the internal screen, I have no problem.

I have checked the NVIDIA drivers and the problem is the same. I have also checked the BIOS settings and they make no change for Ubuntu.

However, Fedora 32 just worked with no problems. Windows 10 on the other hand couldn’t even use the external screen.

How can I solve this problem?

  • Related question, with solution: https://askubuntu.com/questions/881285/external-monitor-slow-laggy-when-in-standlone-mode – user196499 Oct 09 '20 at 08:52
  • main problem is NVIDIA does not support linux well. I have tested on Ubuntu / Windows and read all threads from google. I will stop using NVIDIA once I know a replacement. – Jake Aug 10 '22 at 02:56
  • I have same issue on ubuntu 22 04 with lenovo uhd monitor and dell notebook. I should say that I manage to "properly install" nvidia drivers using sudo apt instal ... And I manage over ome issue with external monitor by switching to extend mode. One ext monitoy slows down computer but if extend works fine... – Marat Zakirov Dec 25 '22 at 14:04

11 Answers11

15

I'm having a similar problem with my laptop and external display. From testing different settings it seems that every time the laptop screen is off (either because it's closed, or because I set gnome display settings for external screen only) the external display gets EXTREMELY slow, completely unusable. If I mirror both screens and leave the laptop screen on, it is back "normal". Screen resolution was the same on all my test cases (4k).

For reference, I'm using an AMD external gpu.

Tiago
  • 251
14

I have a Thinkpad W520 with freshly installed U20.04. I had a similar problem when I tried to connect my WQHD display through DisplayPort. Even though the NVIDIA driver was installed, it somehow could not be activated. If the NVIDIA driver is properly activated and you run

$ nvidia-settings

then you should see something like this:

enter image description here

If you don't see the options on the left, then probably your NVIDIA driver is not properly activated. I purged the driver using the command:

$ sudo apt remove --purge nvidia-kernel-common-390

and then reinstalled it using the "Additional Drivers" utility of the "Software & Updates" app. After I restarted the computer the NVIDIA driver got properly activated and the NVIDIA settings also showed the options as it should.

Pizza
  • 1,428
Pizzasok
  • 151
8

TL;DR: Looks like it might be an issue with X11 and external primary displays.


I have to give credit here to both @Tiago and @hadarS as it was both of their answers combined that led me to a solution.

I'm using an MSI Bravo 15 (AMD Ryzen 7 and Radeon RX 5500M) with a (relatively) fresh install of KDE Neon 5.21. The current 20.04 LTS kernel doesn't support my driver so I've updated to the mainline kernel 5.10 and installed the AMD 20.45 firmware. Yet, I was still finding that my external display (4K) was horrendously slow at doing some of the most basic tasks while doing the same task on the main display was as responsive as ever.

@hadarS mentioned changing their primary display back to the laptop screen so I checked that and, lo and behold, the 4k screen was set as the primary. Switched it to the laptop screen and immediately the external display became usable. Great! Fixed it! But why does it happen?

This is where @Tiago's answer came in handy (as well as your information in your question, OP).

  • The obvious info is that in cases where there was slow performance, an external monitor is used, in some cases without the internal one. That's a given.
  • OP is using an Nvidia card, I'm using an AMD card, @Tiago is using an external AMD card. Same issue in all three cases so we can rule out both the card manufacturer and the bus for the GPU.
  • @Tiago mentioned GNOME specifically, I'm assuming OP is using GNOME as well. I'm using KDE Plasma 5. There goes the DE as a source of the issue.

So what's left?

Well, because Wayland doesn't seem to recognise my external display, I'm using X11. C'est la vie. Without knowing whether everyone else is also using X11 - I'm assuming so since AFAIK X11 is still the default display server for Ubuntu 20.04 - I'm going to have to simply assume that this is our common factor. It seems that X11 just doesn't like having an externally connected display set as the primary display.

I have another laptop with a "fresh" Neon install and an Nvidia GPU. I'll test this theory later tonight if I remember.

Sera H
  • 181
  • Is there any alternative to this X11 thing to stop the external screens from being slow if it's the primary monitor? – zipline86 Jul 10 '21 at 10:38
  • 1
    @zipline86, you can try [Wayland][https://wayland.freedesktop.org/] which is the intended-to-be successor of X11. Depending on your distro, it may be already installed or you will need to install it and its dependencies from your package manager. Will it solve the issue for you? You're gonna have to try it and see. – Sera H Jul 16 '21 at 08:41
  • Thanks. I took at look but I am not confident enough to try to install it because the instructions confused me a lot. – zipline86 Aug 02 '21 at 16:25
  • 1
    You were right! Switching to wayland solved my problem. Apparently, it was already installed and I just needed to do a little workaround to activate it. Thanks! – zipline86 Aug 05 '21 at 18:04
6

In my case, increase the refresh rate helps

enter image description here

I don't know why by default it set the refresh rate to the lowest value, but changing it seems to improve a lot (btw my monitor support 60hz, not sure why the max is 30 on ubuntu)

Jerry wu
  • 171
3

I've the same problem, on my Asus laptop with GTX1650 & Ryze 3750H. After I suspended my laptop, I couldn't turn it back on so I had to forcibly shut it down.

After this, Firefox & Chrome on my secondary monitor would be VERY SLOW, even for highlighting what I hover.

What solved my problem was to change the primary display back to the laptop one. Now everything works normally again.

hadarS
  • 619
2

There are two different problems:

  1. Turning off built-in screen will cause slowness, is the first one.
  2. Resume from suspend using nvidia driver >450 will hang computer, is the second one.

Here is the Fix for second problem:

#sudo touch /etc/udev/rules.d/10-remove-nvidia-audio.rules

Then edit the newly created file and paste the copy-paste the following to the file:

#sudo pico /etc/udev/rules.d/10-remove-nvidia-audio.rules

== cut ==
ACTION=="add", KERNEL=="0000:01:00.1", SUBSYSTEM=="pci", RUN+="/bin/sh -c 'echo 1 > /sys/bus/pci/devices/0000:01:00.1/remove'"
== cut ==

Be aware of ' apostroph characters! They may change turning copy-paste!

zx485
  • 2,426
2

For me helped when I switched to Wayland (Click the small gear icon in bittom-right corner before logging in). I have RTX 2060 and Ubuntu 22.04.

1

From @sera H's answer above

...I'm assuming so since AFAIK X11 is still the default display server for Ubuntu 20.04 - I'm going to have to simply assume that this is our common factor. It seems that X11 just doesn't like having an externally connected display set as the primary display.

@sera H. was correct in diagnosing why my computer slows down when using an external monitor. My Ubuntu 20.04 is using X11, no clue what this is, and it doesn't like having the primary monitor being any other monitor than the laptop monitor. Everything gets slow and choppy.

Solution which activates Wayland

Requirement - You're computer should be using X11. To check if it is, run echo $XDG_SESSION_TYPE in the terminal. It should return X11.

  1. Open the file /etc/gdm3/custom.conf with any editor
  2. Un-ccomment and change the line #WaylandEnable=false to WaylandEnable=true
  3. Save
  4. Open a terminal and run sudo systemctl restart gdm3
  5. Check if your Ubuntu is now using Wayland. Run in the terminal echo $XDG_SESSION_TYPE in the terminal. It should return wayland.
  6. Connect your laptop to external monitors and see everything works.
zipline86
  • 177
  • tried, still slow – Jake Nov 23 '21 at 03:03
  • Tried re-logging in with Wayland and it reboots teh system every time – CpILL Dec 09 '21 at 03:13
  • Hmmm, yea I'm not sure if Ubuntu has changed something in an update. I haven't had this choppy monitor problem for the last few months. This solution worked for me before, 4 months ago, but I'm guessing something has changed in an update. Apparently, my laptop is actually using X11 instead of Wayland and is running fine; although, I don't know why it's using X11 when I set it to Wayland several months ago. – zipline86 Dec 09 '21 at 08:49
  • Thanks! Worked great on Ubuntu 22.04 after enable the Wayland and restart the computer. – Rodrigo Soares May 06 '22 at 16:53
1

For me the issue was that I had fractional scaling enabled (found under Displays) and had set 125% scaling for my laptop screen.

Ubuntu does mention that fractional scaling may increase battery consumption and have performance issues.

0

I had the same issue but was able to fix it by installing nvidia driver 390 from https://www.nvidia.com/en-us/drivers/unix/ and selecting it in software & updates > Additional drivers

Using driver 460 which came by default doesn't let me wake the laptop from sleep. Whenever the laptop goes into sleep, i cannot wake it there is only a black screen and i have to turn it off by holding the power button.

The Nouveau driver doesn't have this sleep wake issue, but when i set the display to external monitor, it slows down so much. Turning both laptop screen and monitor on fixes it, but i want to use only my monitor. The nvidia 390 driver solved both the issues for me. Hope this helps. Make sure to check if the driver supports your device.

0

This issue occurs if you are running in hybrid graphics mode, so both of your displays are actually running the integrated (Intel or Vega, whatever) graphics driver, and the nVidia discrete card driver (or AMD) only takes over if you are run applications with the offloading.

Can't really say if this is an nVidia, Intel or Xorg or DE bug, imho it will never be fixed because developers will blame each other.

So as a solution try this: set the graphics to not hybrid (not "NVIDIA On-Demand") mode. Just choose on of the GPU to sovereignly rule the Xorg.

Assumed that you want a discrete one, so: Either via nvidia-settings: "NVIDIA (Perfomance mode)", or via prime systray indicator or if you running Pop_OS just:

system76-power graphics nvidia

and reboot.

(In this case, you will lose some of the power savings and your laptop's fan will spin more frequently)

superqwerty
  • 45
  • 1
  • 1
  • 7