You are not logged in.

#1 2021-09-26 12:18:08

dasBook
Member
Registered: 2015-10-27
Posts: 12

NVIDIA + USB-C monitor must restart X after wake up

Most is contained in the title. The long version:

I am using the NVIDIA drivers with a 2060 SUPER card and a (DELL) monitor connected via a USB-C cable. The kernel boot parameters are

 ... mem_sleep_default=deep

. I start in a text console then start X manually, via startx. Invariably, after I suspend the system with

$ sudo pm-suspend

upon waking up I have a blank screen. The monitor displays "No USB Type C signal" then promptly goes to sleep. I can switch to another console with Ctrl+Alt+Fx (x = 2-7) and the monitor comes up just fine and displays the text console. I switch back to the console from which I started X and the monitor again shows the message "No USB Type C signal" and goes back to sleep. The only 100% reliable workaround is to kill and restart X. When I kill X I get again the first text console to show and I can restart X from there and all is again well.

dmesg shows no errors. No errors in Xorg.log.

Any suggestions?

Offline

#2 2021-09-26 12:54:33

seth
Member
Registered: 2012-09-03
Posts: 24,049

Re: NVIDIA + USB-C monitor must restart X after wake up

Just a guess, http://download.nvidia.com/XFree86/Linu … ement.html
What's your X11 session? Is there a(n OpenGL) compositor?

Offline

#3 2021-09-26 19:00:29

dasBook
Member
Registered: 2015-10-27
Posts: 12

Re: NVIDIA + USB-C monitor must restart X after wake up

Thanks, that is something to consider and I'll dig around. I am pretty sure I am not using a compositor and I am running (almost) stock dwm as WM. inxi does not report any:

~ $ inxi -Gxx
Graphics:  Device-1: NVIDIA TU106 [GeForce RTX 2060 SUPER] driver: nvidia v: 470.74 bus-ID: 0b:00.0 chip-ID: 10de:1f06
           Display: server: X.Org 1.20.13 driver: loaded: nvidia resolution: 3840x2160~60Hz s-dpi: 162
           OpenGL: renderer: NVIDIA GeForce RTX 2060 SUPER/PCIe/SSE2 v: 4.6.0 NVIDIA 470.74 direct render: Yes
~ $ inxi -Sxx
System:    Host: behemoth Kernel: 5.14.6-arch1-1 x86_64 bits: 64 compiler: gcc v: 11.1.0 Desktop: dwm 6.2 dm: startx
           Distro: Arch Linux

Offline

#4 2021-09-27 07:18:08

seth
Member
Registered: 2012-09-03
Posts: 24,049

Offline

#5 2021-10-04 15:52:03

dasBook
Member
Registered: 2015-10-27
Posts: 12

Re: NVIDIA + USB-C monitor must restart X after wake up

Alright, so here is the final summary of the situation.

Upon wakeup, before I manually kill the Xorg process, the Xorg log shows this right at the end:

[  4905.969] (II) NVIDIA(GPU-0): Deleting GPU-0
[  4905.970] (WW) xf86CloseConsole: KDSETMODE failed: Input/output error
[  4905.970] (WW) xf86CloseConsole: VT_GETMODE failed: Input/output error
[  4905.970] (WW) xf86CloseConsole: VT_ACTIVATE failed: Input/output error
[  4905.970] (II) Server terminated successfully (0). Closing log file.

It seems to me that the Xorg process is still running but after some error has caused it to log the above. From ps output I see that the Xorg process is not a zombie process. A cursory search for the above sends me to some bug in Xorg that was supposedly fixed a while ago and has already been pushed into mainstream.

Anyhoo... I have removed the USB cable and am now using an HDMI cable to connect my monitor. The issue has disappeared. I am chalking it to a bug in Xorg server who's being tripped by some weird USB wake-up delay/issue.

Offline

#6 2021-10-10 13:24:06

dasBook
Member
Registered: 2015-10-27
Posts: 12

Re: NVIDIA + USB-C monitor must restart X after wake up

One more update after some more tinkering (back to using the monitor on USB instead of HDMI).

The input/output errors that appear in the Xorg log are coming from the function xf86CloseConsole. The function is called during Xorg process shutdown and it emits those error messages trying to switch the console back to text mode. The sequence is: failure of sorts causing the Xorg server to close, upon closing it tries to switch the console to text mode, fails at that too, end.

I assume that it all is caused by the monitor going to sleep during pm-suspend. If I prevent the monitor from going to sleep (there is a specific setting in the monitor menu) then the computer wakes up fine (just as it does with an HDMI connection). I am pretty much done with this issue. HTH.

Offline

Board footer

Powered by FluxBB