You are not logged in.

#1 2017-01-03 18:14:35

Batou
Member
Registered: 2017-01-03
Posts: 259

[SOLVED] Corrupted screen, TV when waking up from Suspend Nvidia

Hi all,

I have an issue that I can't seem to solve on my own. I'm hoping someone here can help me.

I've noticed that when waking up from Suspend, really bad things happen. Suspend with (binary) Nvidia driver never worked for me and the screen would always end up messed up after Wake. But yesterday, when I had my TV connected, Wake from sleep completely messed up my TV and the only thing that fixed it was power cycling. Just turning it on and off resulted in my computer using a 640x480 resolution because that's the only thing the TV was providing. This never used to happen with Intel iGPU and it never happened with any of the game consoles that were connected to that TV. I've also tested it out with a monitor and while it doesn't disable it after Wake, I still corrupts it and I have to reboot Arch to actually get my screen back. The issue must be Nvidia driver.

I'm using the latest binary driver from AUR (Driver Version: 375.26 ), my card is an Nvidia GeForce GTX 1060 and is connected to my TV over HDMI2.0. DE is cinnamon.

I've done some Googling but haven't been able to find Arch-specific fixes.

Anyone have some suggestions?

Thanks!

Last edited by Batou (2017-01-05 08:38:22)


Please vote for all the AUR packages you're using. You can mass-vote for all of them by doing: "pacman -Qqm | xargs aurvote -v" (make sure to run "aurvote --configure"  first)

Offline

#2 2017-01-03 21:45:24

seth
Member
Registered: 2012-09-03
Posts: 51,029

Re: [SOLVED] Corrupted screen, TV when waking up from Suspend Nvidia

I had my TV connected, Wake from sleep completely messed up my TV and the only thing that fixed it was power cycling. Just turning it on and off resulted in my computer using a 640x480 resolution because that's the only thing the TV was providing

This is a mess of a description.
"was power cycling" - what device?
"turning it on and off" - what device?
"using a 640x480" - if either computer or tv is off (last line), where do you get 640x480?
"because that's the only thing the TV was providing" - your TV does really only support VGA???

iow: what actually *is* your issue?


The black screen is most likely because of cinnamon, the GL compositor in particular. OpenGL was not designed towards such scenarios and the textures drop invalid when the gpu buffer is transferred to or from RAM. Try icewm or fluxbox on the behavior and check the output of  "journalctl _TRANSPORT=kernel"

Offline

#3 2017-01-03 23:37:22

Batou
Member
Registered: 2017-01-03
Posts: 259

Re: [SOLVED] Corrupted screen, TV when waking up from Suspend Nvidia

seth wrote:

I had my TV connected, Wake from sleep completely messed up my TV and the only thing that fixed it was power cycling. Just turning it on and off resulted in my computer using a 640x480 resolution because that's the only thing the TV was providing

This is a mess of a description.
"was power cycling" - what device?
"turning it on and off" - what device?
"using a 640x480" - if either computer or tv is off (last line), where do you get 640x480?
"because that's the only thing the TV was providing" - your TV does really only support VGA???

iow: what actually *is* your issue?


The black screen is most likely because of cinnamon, the GL compositor in particular. OpenGL was not designed towards such scenarios and the textures drop invalid when the gpu buffer is transferred to or from RAM. Try icewm or fluxbox on the behavior and check the output of  "journalctl _TRANSPORT=kernel"

HI,

I had to power-cycle the TV since turning the TV on/off with the remote did nothing.

Without power-cycling the TV, all I was getting was 640x480 screen from the nvidia-settings control panel. Here's the pic of what it looked like without power cycling the TV:

whfepVo.png

But the TV is not an issue. Even with the monitor that's connected with DP or DVI, PC cannot wake up properly from the Suspend. Only when I take out Nvidia GFX card and set my graphics to iGPU can I sleep/wake properly.

I'll give other WMs a try but cinnamon is really the only DE that I can setup in a way that I like.


Please vote for all the AUR packages you're using. You can mass-vote for all of them by doing: "pacman -Qqm | xargs aurvote -v" (make sure to run "aurvote --configure"  first)

Offline

#4 2017-01-04 00:34:45

seth
Member
Registered: 2012-09-03
Posts: 51,029

Re: [SOLVED] Corrupted screen, TV when waking up from Suspend Nvidia

Either the TV crashed or keeps chatter with the GPU, try to unplug the HDMI connection and see whether the TV starts to react afterwise. 640x480 is VGA and can assume to be supported by any device, so it seems the GPU and TV don't success a handshake after the TV enters this state (does the VGA-only state imply a reboot of the system as well?)

It actually does not look like you're compositing (the ugly black frame where there should be some shadows)

Offline

#5 2017-01-04 02:03:11

Batou
Member
Registered: 2017-01-03
Posts: 259

Re: [SOLVED] Corrupted screen, TV when waking up from Suspend Nvidia

seth wrote:

Either the TV crashed or keeps chatter with the GPU, try to unplug the HDMI connection and see whether the TV starts to react afterwise. 640x480 is VGA and can assume to be supported by any device, so it seems the GPU and TV don't success a handshake after the TV enters this state (does the VGA-only state imply a reboot of the system as well?)

It actually does not look like you're compositing (the ugly black frame where there should be some shadows)

Seth, it's definitely not the TV. I've replicated the same thing with a regular monitor connected over DP and DVI. After waking up from suspend, DE is erratic and freezes after 10 seconds or so. The error is somewhere in either Nvidia driver or cinnamon DE. The only difference between the monitor and TV is that I don't have to power cycle the monitor. Other than that, Waking from Suspend ends up in me having to press the reset button on my PC.

I'm at loss as to what to do next..

Last edited by Batou (2017-01-04 02:05:03)


Please vote for all the AUR packages you're using. You can mass-vote for all of them by doing: "pacman -Qqm | xargs aurvote -v" (make sure to run "aurvote --configure"  first)

Offline

#6 2017-01-04 08:05:50

seth
Member
Registered: 2012-09-03
Posts: 51,029

Re: [SOLVED] Corrupted screen, TV when waking up from Suspend Nvidia

try to unplug the HDMI connection and see whether the TV starts to react after

The TV doesn't respond to the IR, so it's misbehaving and whether induced by the GPU or not, it will certainly be interesting to know whether that's a crash or it's just busy talking with the GPU.
It's notably interesting whether the TV remains in this state even after rebooting the computer (your screenshot looks a bit like that)

grep -niC10 acpi /usr/share/doc/nvidia/README

Offline

#7 2017-01-05 03:16:08

Batou
Member
Registered: 2017-01-03
Posts: 259

Re: [SOLVED] Corrupted screen, TV when waking up from Suspend Nvidia

seth wrote:

try to unplug the HDMI connection and see whether the TV starts to react after

The TV doesn't respond to the IR, so it's misbehaving and whether induced by the GPU or not, it will certainly be interesting to know whether that's a crash or it's just busy talking with the GPU.
It's notably interesting whether the TV remains in this state even after rebooting the computer (your screenshot looks a bit like that)

grep -niC10 acpi /usr/share/doc/nvidia/README

Well, the IR remote does turn the TV on and off. But TVs these days are "smart TVs" that run their own OS and have a beefy CPU. This Samsung 4K TV that I have has a quad-core processor (for h.265 decoding I presume) so who knows what exactly happens when it receives a messed up signal from an HDMI source... but it definitely screws it up and only a power cycle restores resolutions. Regular monitors are dumb so it doesn't affect them at all and no power-cycling is needed.

What do you think about doing a "startx -logverbose 6" and then trying to find what exactly happens by combing through /var/log/Xorg.0.log ?

Last edited by Batou (2017-01-05 03:28:56)


Please vote for all the AUR packages you're using. You can mass-vote for all of them by doing: "pacman -Qqm | xargs aurvote -v" (make sure to run "aurvote --configure"  first)

Offline

#8 2017-01-05 07:10:43

Batou
Member
Registered: 2017-01-03
Posts: 259

Re: [SOLVED] Corrupted screen, TV when waking up from Suspend Nvidia

Whoa, I finally found the solution! After Seth mentioned ACPI, I did some more searching and I included that term and came across a Github discussion and a kind person there posted a way to fix this: https://github.com/linuxmint/Cinnamon/issues/2838

Solution is as follows:

Create a file 00-avoid-glamor.conf and disable glamoregl.so which is incompatible whit Nvidia's binary driver.

sudo vim /usr/share/X11/xorg.conf.d/00-avoid-glamor.conf 

Add the following:

#Do not edit
Section "Module"
   Disable "glamoregl"
EndSection

And reboot. From now on, you can suspend and wake the PC without any issues!

I'm so glad this is fixed! And thank you seth!

PS: This should be automatically added when you install any of the nvidia binary drivers since they all have this issue.


Please vote for all the AUR packages you're using. You can mass-vote for all of them by doing: "pacman -Qqm | xargs aurvote -v" (make sure to run "aurvote --configure"  first)

Offline

#9 2017-01-05 07:30:45

seth
Member
Registered: 2012-09-03
Posts: 51,029

Re: [SOLVED] Corrupted screen, TV when waking up from Suspend Nvidia

Interesting indeed. glamoregl isn't considered for loading here. Can you please
a) mark the thread as solved ;-)
b) share your xorg log?

Edit: did you enable nvidia-drm?

Last edited by seth (2017-01-05 07:35:23)

Offline

#10 2017-01-05 08:08:16

Batou
Member
Registered: 2017-01-03
Posts: 259

Re: [SOLVED] Corrupted screen, TV when waking up from Suspend Nvidia

seth,

a) Not sure how to mark it solved! I don't see any options to do that (maybe because I'm a new account?)
b) here's the Xorg.0.log  http://pastebin.com/qeLLqzkG

Yes, nvidia-drm is enabled in /etc/mkinitcpio.conf... should I leave it enabled?


While I still have your attention, could you please look at the log and check these parts:

[    43.611] (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)

...

[    44.460] (II) NVIDIA(0): ACPI: failed to connect to the ACPI event daemon; the daemon
[    44.460] (II) NVIDIA(0):     may not be running or the "AcpidSocketPath" X
[    44.460] (II) NVIDIA(0):     configuration option may not be set correctly.  When the
[    44.460] (II) NVIDIA(0):     ACPI event daemon is available, the NVIDIA X driver will
[    44.460] (II) NVIDIA(0):     try to use it to receive ACPI event notifications.  For
[    44.460] (II) NVIDIA(0):     details, please see the "ConnectToAcpid" and
[    44.460] (II) NVIDIA(0):     "AcpidSocketPath" X configuration options in Appendix B: X
[    44.460] (II) NVIDIA(0):     Config Options in the README.

While looking at various solutions, I came across this page: https://forum.kde.org/viewtopic.php?f=111&t=121590

This is clearly not a DE specific issue and it's more of a glamor issue with Nvidia binary drivers.

In that link above, one person says that:

This is done with an option when you load the module: modprobe nvidia NVreg_RegisterForACPIEvents=1 NVreg_EnableMSI=1

To automatically use this option, create a file named /etc/modprobe.d/50-nvidia.conf with the following content:

options nvidia NVreg_RegisterForACPIEvents=1 NVreg_EnableMSI=1

I have not tried this because I was so happy that the one above worked (LOL) but should I also add this?

THANK YOU!

Last edited by Batou (2017-01-05 08:09:23)


Please vote for all the AUR packages you're using. You can mass-vote for all of them by doing: "pacman -Qqm | xargs aurvote -v" (make sure to run "aurvote --configure"  first)

Offline

#11 2017-01-05 08:30:46

seth
Member
Registered: 2012-09-03
Posts: 51,029

Re: [SOLVED] Corrupted screen, TV when waking up from Suspend Nvidia

The ACPI warning is "harmless" (this is unless you've acpid installed and running), see https://wiki.archlinux.org/index.php/NV … CPI_events.

You can leave nvidia-drm enabled, I just never bothered and it probably explains why glamoregl isn't even considered here.
The deactivation notice should thereefore be added to the wiki (unless this remains a permanent issue, what might be the case):  https://wiki.archlinux.org/index.php/NV … de_setting (feel free to do so smile
I filed this bug

To mark a thread as solved, edit your OPs subject and prepend "[SOLVED] " ;-)

Edit: oh and you really don't need to thank me - i'd say you figured the solution by your own entirely.

Last edited by seth (2017-01-05 08:31:31)

Offline

#12 2017-01-05 08:43:14

Batou
Member
Registered: 2017-01-03
Posts: 259

Re: [SOLVED] Corrupted screen, TV when waking up from Suspend Nvidia

Thanks Seth! Since I don't use Nvidia card in a laptop, is there a point to even bother with ACPI?

As for solved, doh! Just changed the title.

PS: I've never edited a Wiki before and all that syntax looks scary to me and I don't want to mess it up. Hope someone adds it however.

Last edited by Batou (2017-01-05 08:47:24)


Please vote for all the AUR packages you're using. You can mass-vote for all of them by doing: "pacman -Qqm | xargs aurvote -v" (make sure to run "aurvote --configure"  first)

Offline

#13 2017-01-05 09:27:21

seth
Member
Registered: 2012-09-03
Posts: 51,029

Re: [SOLVED] Corrupted screen, TV when waking up from Suspend Nvidia

No, the system probably doesn't  provide any useful acpi events anyway (if you unplug AC/DC, the system's not on battery but dead ;-)
Let's see how the bug develops.

Offline

Board footer

Powered by FluxBB