You are not logged in.

#26 2022-01-25 04:12:18

MegaMexican
Member
Registered: 2021-10-08
Posts: 27

Re: [SOLVED] Monitor Will Not Receive Signal From Sleep

$ xrandr -q
Screen 0: minimum 8 x 8, current 2560 x 1440, maximum 32767 x 32767
DVI-D-0 disconnected (normal left inverted right x axis y axis)
HDMI-0 connected primary 2560x1440+0+0 (normal left inverted right x axis y axis) 698mm x 393mm
   2560x1440     59.95 + 143.98*  120.00  
   3840x2160     59.94    50.00  
   2560x1080     50.00  
   1920x1080    120.00   100.00    60.00    59.94    50.00    60.00    50.04  
   1440x900      59.89  
   1440x576      50.00  
   1400x1050     59.98  
   1280x1024     75.02    60.02  
   1280x960      60.00  
   1280x720     119.88    60.00    59.94    50.00  
   1024x768      75.03    70.07    60.00  
   800x600       75.00    72.19    60.32    56.25  
   720x576       50.00  
   720x480       59.94  
   640x480       75.00    72.81    59.94    59.93  
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis)
DP-4 disconnected (normal left inverted right x axis y axis)
DP-5 disconnected (normal left inverted right x axis y axis)

Tried

#!/bin/sh
case $1/$2 in
        pre/*)
        ;;
        post/*)
        sleep 10
        echo "stage 1" >> /tmp/xrandr.errors
        sudo -u username xrandr --display :0 --output HDMI-0 --rate 60 2>&1 | tee -a /tmp/xrandr.errors
        sleep 0.5
        echo "stage 2" >> /tmp/xrandr.errors
        sudo -u username xrandr --display :0 --output HDMI-0 --rate 144 2>&1 | tee -a /tmp/xrandr.errors
        ;;
esac

It didn't work :'( and there's nothing in the logs.

Offline

#27 2022-01-25 08:34:39

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

Re: [SOLVED] Monitor Will Not Receive Signal From Sleep

here's nothing in the logs.

Not even the "stage 1/2" echos??
Otherwise the calls cause no errors but are insufficient to activate the output.

#!/bin/sh
case $1/$2 in
        pre/*)
        ;;
        post/*)
        sleep 1
        echo "stage 1" >> /tmp/xrandr.errors
        sudo -u username xrandr --display :0 --output HDMI-0 --mode 1024x768 --rate 60 2>&1 | tee -a /tmp/xrandr.errors
        sleep 0.5
        echo "stage 2" >> /tmp/xrandr.errors
        sudo -u username xrandr --display :0 --output HDMI-0 --auto 2>&1 | tee -a /tmp/xrandr.errors
        ;;
esac

Offline

#28 2022-01-25 19:43:19

MegaMexican
Member
Registered: 2021-10-08
Posts: 27

Re: [SOLVED] Monitor Will Not Receive Signal From Sleep

Okay, I'm pretty sure it's been solved.

To answer your question, the echoes were showing up.

So I started off by trying the script you provided, and it was wonky. The screen came back up, but it didn't reset the mode back to 2560x1440. Also, upon reboot, the monitor will never come back up, but after switching to TTY2 then back to GUI and THEN suspending, it'll come back up no problem. Checking /tmp/xrandr.errors gave the "Configure crtc 0 failed" error again. I also tried using xrandr to adjust refresh rate just in the terminal, and that wasn't working either. So I ended up finding out that in order to change the refresh rate with xrandr, you have to set the mode as well. With that in mind, I adjusted the script so that it changes mode and refresh rate together.

As for the crtc 0 error, looking into it I found that it is oftentimes associated with driver problem or kernel module problem. I ran

$ lsmod | grep nvidia
nvidia_drm             73728  11
nvidia_uvm           2560000  0
nvidia_modeset       1155072  24 nvidia_drm
nvidia              36970496  1423 nvidia_uvm,nvidia_modeset

so kernel modules seemed fine. However, when I first installed Arch Linux I initially tried Nouveau before switching to proprietary NVIDIA drivers. I ended up finding the package "x86-video-nouveau" is installed so I removed it.

The script I ended up with is

#!/bin/sh
case $1/$2 in
        pre/*)
        ;;
        post/*)
        sleep 1
        echo "stage 1" >> /tmp/xrandr.errors
        sudo -u username xrandr --display :0 --output HDMI-0 --mode 1024x768 --refresh 60 2>&1 | tee -a /tmp/xrandr.errors
        sleep 0.5
        echo "stage 2" >> /tmp/xrandr.errors
        sudo -u username xrandr --display :0 --output HDMI-0 --mode 2560x1440 --refresh 144 2>&1 | tee -a /tmp/xrandr.errors
        ;;
esac

And upon rebooting, it will bring the monitor back up first time. So as far as I can tell, the issue is fixed. Thanks for the help, this was a WEIRD issue.

Last edited by MegaMexican (2022-01-25 20:25:30)

Offline

#29 2022-01-25 22:12:36

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

Re: [SOLVED] Monitor Will Not Receive Signal From Sleep

Also, upon reboot, the monitor will never come back up

The sleep hooks won't affect that at all - it depends on the X11 server config (though by default all present outputs are activated) and your session login.
Is the output available in SDDM (the login screen)?

Offline

#30 2022-01-26 13:20:43

MegaMexican
Member
Registered: 2021-10-08
Posts: 27

Re: [SOLVED] Monitor Will Not Receive Signal From Sleep

I didn't word it correctly. What I meant to say was that if I got the sleep hooks to work, then rebooted the computer, and then suspended the PC, it wouldn't work. But if I woke up from suspend, switched to and from TTY2, then suspended for a second time, it would work. Either way, the issue is resolved. You've been very helpful. Thank you.

Offline

Board footer

Powered by FluxBB