Short version:
I have a external monitor connected via USB-C to my Ubuntu 22.04 laptop. Installing CUDA completely broke my setup and I cannot use the external monitor anymore (always black, cannot select as second display)
Long version:
I use a Ubuntu 22.04 laptop with an RTX 2060 Mobile graphics card and connected to an external display (samsung odyssey G53A) via DP over USB-C. This setup used to work like a charm. I now wanted to start learning a bit of CUDA programming, so I followed the installation tutorial at Contents — cuda-installation-guide-linux 12.1 documentation and installed CUDA 12.1 which included driver version 530. After installation everything seemed to work perfectly, I could use nvcc and the monitor setup also still worked. I rebooted, and afterwards, the external monitor started lagging. The pc ran fine: When i used the internal display, everything is smooth and quick; however, as soon as i do something on the external monitor, it had continuous lag spikes of up to 5 seconds where the display just froze.
- I checked the driver settings – it said 530, which seems fine
- I rebooted about 3 more times – no change.
Then I manually installed nvidia-driver-525 (via apt), which is the the one that was installed before everything I think. Rebooted. Now the external display stays black. In the display settings, it still shows as a valid display, however, as soon as i click on “Join Displays” or “Mirror” and then “Apply” it reverts back to using only the internal display.
- Rebooting several times – no change
- deleting ~/.config/monitors.xml (of course with restarts) – no change
- /etc/X11/xorg.conf – doesn’t exist (/etc/X11/xorg.conf.d – empty)
- xrandr shows DP-1-0 as “connected” and DP-1-2 as “disconnected” (but whole setup should be DP1.2 capable)
- apt purging everything nvidia related (practically following the uninstallation guide on the before linked cuda installation guide) and booting using noveau drivers makes external display work, but appear red.
- I reverted back to manually install nvidia-driver-530 or cuda-driver-530 – both again make the external display black and prevented changing display layouts like before.
Sideremark: I dual-boot Win10 and there everything works like a charm. So the hardware setup must be fine.
I could not attach documents to this message, so here are a few outputs directly:
$ xrandr
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 16384 x 16384
eDP connected 1920x1080+0+0 (normal left inverted right x axis y axis) 382mm x 215mm
1920x1080 144.03*+
1680x1050 144.03
1280x1024 144.03
1440x900 144.03
1280x800 144.03
1280x720 144.03
1024x768 144.03
800x600 144.03
640x480 144.03
DP-1-0 connected (normal left inverted right x axis y axis)
2560x1440 144.00 + 164.84 120.00 59.95
1920x1080 165.00 143.98 119.88 60.00 59.94 50.00
1680x1050 59.95
1600x900 60.00
1440x900 59.89
1280x1024 75.02 60.02
1280x800 59.81
1280x720 60.00 59.94
1152x864 75.00
1024x768 75.03 70.07 60.00
800x600 75.00 72.19 60.32 56.25
640x480 75.00 72.81 59.94
DP-1-1 disconnected (normal left inverted right x axis y axis)
HDMI-1-0 disconnected (normal left inverted right x axis y axis)
DP-1-2 disconnected primary (normal left inverted right x axis y axis)
$ uname -a
Linux Lenovo-Legion-Linux 5.19.0-41-generic #42~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Apr 18 17:40:00 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
$ nvidia-smi
Mon May 1 14:37:02 2023
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 530.30.02 Driver Version: 530.30.02 CUDA Version: 12.1 |
|-----------------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+======================+======================|
| 0 NVIDIA GeForce RTX 2060 On | 00000000:01:00.0 Off | N/A |
| N/A 39C P8 1W / 90W| 6MiB / 6144MiB | 0% Default |
| | | N/A |
+-----------------------------------------+----------------------+----------------------+
+---------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=======================================================================================|
| 0 N/A N/A 1961 G /usr/lib/xorg/Xorg 4MiB |
+---------------------------------------------------------------------------------------+
I hope you can help me, and this information is something for you to work with.