USB-C monitor not detected with nvidia-driver on Ubuntu

This is a follow-up from Ubuntu 22.04 nvidia-driver-515 not working/starting

I have a Lenovo X1 Extreme Gen 5 laptop (running Ubuntu with kernel 5.15.0-47-generic) and a Dell monitor connected via USB-C.
When using the open source video driver, the Dell monitor is detected and working. When using nvidia-driver, the monitor is not detected (but other devices, like a USB keyboard, connected to the monitor is detected and working).

$ lspci|grep VGA
00:02.0 VGA compatible controller: Intel Corporation Alder Lake-P Integrated Graphics Controller (rev 0c)
01:00.0 VGA compatible controller: NVIDIA Corporation GA107M [GeForce RTX 3050 Ti Mobile] (rev a1)
$ nvidia-smi 
Sat Sep  3 09:10:41 2022       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 515.65.01    Driver Version: 515.65.01    CUDA Version: 11.7     |
|-------------------------------+----------------------+----------------------+
| 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 ...  Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   52C    P3    N/A /  N/A |      5MiB /  4096MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      2464      G   /usr/lib/xorg/Xorg                  4MiB |
+-----------------------------------------------------------------------------+
$ uname -r
5.15.0-47-generic


Ok, this is strange…
Based on a blog post I found, I tried the following:

  1. Start laptop without the external monitor connected
  2. Turn on “Fractional scaling”
  3. Connect the external USB-C monitor (and it’s detected! See below)
  4. Turn off “Fractional scaling”

Does this make sense?

Doesn’t really make sense.
Please post the output of

sudo cat /sys/module/nvidia_drm/parameters/modeset

Please run nvidia-bug-report.sh as root and attach the resulting nvidia-bug-report.log.gz file to your post.

$ sudo cat /sys/module/nvidia_drm/parameters/modeset
Y

nvidia-bug-report.log.gz (973.1 KB)

As much as it doesn’t make sense, I tried again:

  • Booted with USB-C monitor plugged in - external monitor not detected (like screenshot above). Turned on fractional scaling, nothing happened. Turned off fractional scaling, nothing happened.
  • Booted with USB-C monitor NOT plugged in. Turned on fractional scaling, then plugged in USB-C monitor - and it got detected (see second screenshot above).

Please create another nvidia-bug-report.log in the non-working state.
Does running
xrandr --setprovideroutputsource NVIDIA-G0 modesetting && xrandr --auto
enable the monitor?

Now this has been working for a week - will wait a bit and see if the problem resurfaces

Ok, today I’m at a new location (with new external monitors) and they’re not detected (2 monitors connected to a Lenovo docking station, which is connected to my laptop USB-C).
nvidia-bug-report.log.gz (1.1 MB)

xrandr --setprovideroutputsource NVIDIA-G0 modesetting && xrandr --auto made the built-in monitor flash quickly, but still no detection of external monitors.

The fractional scaling on/off trick also made no difference.

Will try to reboot with the USB-C connected and see if it helps.

Rebooting with USB-C plugged in made no difference. Mouse and keyboard from the docking station works, but no external displays detected.

$ nvidia-smi 
Thu Sep 15 08:52:10 2022       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 515.65.01    Driver Version: 515.65.01    CUDA Version: 11.7     |
|-------------------------------+----------------------+----------------------+
| 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 ...  Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   43C    P3    N/A /  N/A |      5MiB /  4096MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      2587      G   /usr/lib/xorg/Xorg                  4MiB |
+-----------------------------------------------------------------------------+
$ nvidia-xconfig --query-gpu-info
Number of GPUs: 1

GPU #0:
  Name      : NVIDIA GeForce RTX 3050 Ti Laptop GPU
  UUID      : GPU-f7241ef5-c58c-40ff-2813-9f52f35b12e2
  PCI BusID : PCI:1:0:0

  Number of Display Devices: 0

Is that a different dock model? It seems to have DisplayLink devices, which means it doesn’t pass through the DP links of the nvidia gpu but has its own devices needing drivers.

Yes, this is a different dock (Lenovo dock), compared to the one I normally use (which is just a Dell monitor with built-in dock).
Do you know what driver I need to install?

I should add that I’ve been using the same setup (Lenovo dock + 2 monitors ) for a year with my old X1 Carbon…so it’s a working setup.

I tried to change from DP to HDMI for one of the monitors - and through the dock there’s no difference. But HDMI directly into the laptop does work (it’s not a long term solution, but at least it gives me one additional monitor to work on today).

Okay, after re-reading your message @generix , I Googled and found https://www.synaptics.com/products/displaylink-graphics/downloads/ubuntu
After installing that driver, the monitors are detected :-)
Thanks a lot for your help!

Fine to hear. Please keep in mind that you now have a triple-gpu setup (intel/nvidia/displaylink) and the displaylink drivers don’t work well in conjunction with the nvidia drivers. So you shouldn’t use prime-select to switch modes.

Could you explain what you mean by the last sentence?
Should I use sudo prime-select nvidia ?
Or sudo prime-select on-demand ?
Or something else?

You should not use prime-select as switching to another mode likely will cause the DisplayLink dock to fail. It now works, don’t touch.

Hello, I am having a very similar problem to the above. I have checked that all individual components work. I have a lenovo y740 with RTX 2070 max Q, using a dell monitor. The monitor is connected with a HDMI cord going into a dongle that then connects to the USB-C. This set up has been working fine for mouths now, and and just stopped working today. my primary monitor works fine, going directly to the HDMI port on the laptop. my NVIDIA drivers are also up to date.

1 Like

Same issue. I installed DisplayLink driver, but still not able to view from usb-c port. Can you please provide detailed debugging steps and recommended actions? Thank you!