You are not logged in.

#1 2021-09-21 18:59:31

deivi
Member
Registered: 2020-05-24
Posts: 19

[SOLVED] Monitor not working after changing source

Hi guys,

I'm experiencing a very weird problem and I've been searching for it for a few days now. Currently I have a dual monitor setup for two different PCs: A and B, let's say. My secondary monitor is connected to an HDMI switch I use to switch input between both of my computers. My primary monitor has two different HDMI inputs. One of them is connected to PC A and the other one is connected to PC B. Before diving deep into it, have in mind that I also have dual boot in one of the computers, and both of the monitors work perfectly on Windows. Also, have in mind that this setup works correctly on Arch when PC is started and continuously as long as I don't switch monitors input.

Now, the problem shows up when I try to switch monitors from one PC to another. Secondary monitor (the one that uses the HDMI switch) does NOT give any problem, it's input changes and it shows correctly for both computers. However, when using my primary monitor source menu to switch its input, it works good on my second PC but after switching it back to Arch it never comes back. Note that changing source of input for my primary monitor does not mean I am disconnecting it from PC A. During the entire process primary monitor appear as connected in xrandr output.

Summarizing, when changing primary monitor source and then changing it back again to Arch, monitor shows black screen, and keeps getting and losing signal continuously. When I say changing source, I mean physically me pressing the monitor button to switch from HDMI-2 to HDMI-1 input source.

lspci | grep VGA

01:00.0 VGA compatible controller: NVIDIA Corporation GP107 [GeForce GTX 1050 Ti] (rev a1)

My /etc/X11/xorg.conf

# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 470.63.01

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
    Option         "Xinerama" "0"
EndSection

Section "Files"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "DELL P2419H"
    HorizSync       30.0 - 83.0
    VertRefresh     56.0 - 76.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "NVIDIA GeForce GTX 1050 Ti"
    Option         "NoLogo" "1"
    Option	   "ConnectedMonitor" "CRT,CRT"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-5"
    Option         "metamodes" "HDMI-0: nvidia-auto-select +0+500, HDMI-2: nvidia-auto-select +1920+0"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "ServerFlags"
    Option "StandbyTime" "0"
    Option "SuspendTime" "0"
    Option "OffTime" "0"
    Option "BlankTime" "0"
EndSection

As you can see in my config, standby, suspend, offtime and blanktime are disabled. Monitors are never turning off. All these are not related to the problem.

xrandr -q

Screen 0: minimum 8 x 8, current 4480 x 1580, maximum 32767 x 32767
DVI-D-0 disconnected (normal left inverted right x axis y axis)
HDMI-0 connected 1920x1080+0+500 (normal left inverted right x axis y axis) 527mm x 296mm
   1920x1080     60.00*+  59.94    50.00    60.05    60.00    50.04
   1600x900      60.00
   1280x1024     75.02    60.02
   1280x720      60.00    59.94    50.00
   1152x864      75.00
   1024x768      75.03    60.00
   800x600       75.00    60.32
   720x576       50.00
   720x480       59.94
   640x480       75.00    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)
HDMI-1 disconnected (normal left inverted right x axis y axis)
HDMI-2 connected primary 2560x1440+1920+0 (normal left inverted right x axis y axis) 597mm x 336mm
   2560x1440    144.00*+ 120.00    99.95    59.95
   1920x1080     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    50.00
   1152x864      75.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

EDIT: Tried multiple solutions to resolve issue with HDMI, but none of them worked. Finally, switched to DisplayPort and the issue disappeared. Anyways, I hope one of them solves your problem

Last edited by deivi (2021-09-23 13:29:35)

Offline

#2 2021-09-21 20:20:28

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

Re: [SOLVED] Monitor not working after changing source

standby, suspend, offtime and blanktime are disabled

Is that because DPMS would cause similar issues?
https://bbs.archlinux.org/viewtopic.php?id=260159

Do you get https://bbs.archlinux.org/viewtopic.php … 6#p1962606 and does https://bbs.archlinux.org/viewtopic.php … 7#p1940627 help?

Offline

#3 2021-09-21 21:11:39

deivi
Member
Registered: 2020-05-24
Posts: 19

Re: [SOLVED] Monitor not working after changing source

seth wrote:

Is that because DPMS would cause similar issues?
https://bbs.archlinux.org/viewtopic.php?id=260159

I don't know if DPMS is related as I disabled it on purpose because I didn't want to have it. It seems to be similar though.

No, I don't get that error with $ journalctl -p 3 -xb
No, both of the flags snd_hda_intel.enable_silent_stream=0 and snd_hda_codec_hdmi.enable_silent_stream=0 didn't work.

But I have found something: Both reconnecting HDMI cable and pressing Ctrl+Alt+F2 and then back to Ctrl+Alt+F1 fixes the problem. Weird.

Offline

#4 2021-09-21 21:33:02

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

Re: [SOLVED] Monitor not working after changing source

The HDMI handshake (likely) fails, predominatly because it's a tacked on fragile shit protocol w/ a deliberate race condition to please Hollywood… (ie: can you use DisplayPort?)

Does adding

Option "UseHotplugEvents" "False"

to the Device section have any impact?

Offline

#5 2021-09-22 06:42:49

deivi
Member
Registered: 2020-05-24
Posts: 19

Re: [SOLVED] Monitor not working after changing source

Unfortunately monitor does not have DisplayPort. Also, I tried adding that option with no result. I have discovered something new. My second monitor, which I switch among PCs using an HDMI switch, has also different sources, so I have tried to change it and then back to normal just the way I do in the primary monitor. Surprisingly, it works perfectly. Could this be happening only in the primary screen for some reason?

Last edited by deivi (2021-09-22 06:50:13)

Offline

#6 2021-09-22 07:01:06

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

Re: [SOLVED] Monitor not working after changing source

Is the "xrandr -q" from when the the output acts up (ie. does it already appear on the system)?
(We may be able to leverage a workaround from there)

Can you try to swap the GPU outputs (ie. wire the 1st monitor to the 2nd HDMI jack and vv.)?
Is there btw. some adapter (DP -> HDMI etc.) involved?

Offline

#7 2021-09-22 07:18:14

deivi
Member
Registered: 2020-05-24
Posts: 19

Re: [SOLVED] Monitor not working after changing source

Yes, during the entire process no matter what source is primary monitor using, xrandr -q output keeps the same. Both HDMI-2 and HDMI-0 keep connected. Also, I just tried swapping GPU outputs, and I have the exact same behavior. I am now writing after the change. And no, between the PC and my primary monitor there is only an HDMI cable.

Last edited by deivi (2021-09-22 07:26:27)

Offline

#8 2021-09-22 07:53:12

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

Re: [SOLVED] Monitor not working after changing source

during the entire process … xrandr -q output keeps the same

That's not good and rather the cause of the issue - or is this only because of "UseHotplugEvents" "False"?

Offline

#9 2021-09-22 07:57:18

deivi
Member
Registered: 2020-05-24
Posts: 19

Re: [SOLVED] Monitor not working after changing source

seth wrote:

That's not good and rather the cause of the issue - or is this only because of "UseHotplugEvents" "False"?

"UseHotplugEvents" didn't change anything. It was like that before. Also, I think it is expected to work like that. Afaik, monitor gets input from different sources, but it is connected to both PCs. At least that's the way it works on Windows. Although the monitor is displaying other PC, I am still able to hover the mouse in and out the other monitor. I think this is the way it should be. When changing source of my second monitor (the one that gives no problem) it happens the same thing. While secondary monitor is displaying a different source, it continues to show as connected in xrandr -q (because it is connected), and I am still able to move the mouse around like if the monitor would be displaying. And then, when switching the source back again, display comes back perfectly.

I think it would be more interesting to know what does pressing Ctrl+Alt+F2, Ctrl+Alt+F1 (switching ttys) does internally to make it work again. At least, now that I know this, I no longer have to go down the table and reconnect the HDMI cable.

Last edited by deivi (2021-09-22 08:06:24)

Offline

#10 2021-09-22 14:33:20

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

Re: [SOLVED] Monitor not working after changing source

Reclaim the framebuffer, modeline update - do you get away w/ "xrandr --output HDMI-whatever --auto"?

Offline

#11 2021-09-22 15:36:57

deivi
Member
Registered: 2020-05-24
Posts: 19

Re: [SOLVED] Monitor not working after changing source

I don't know what reclaiming the framebuffer or modeline update means, but "xrandr --output HDMI-0 --auto" does not bring it back.

Offline

#12 2021-09-22 20:56:07

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

Re: [SOLVED] Monitor not working after changing source

Does it help if you actively change the refresh rate? Eg. (there needs to be a supported rate other than 60 Hz)

xrandr --output HDMI-0 --rate 50; xrandr --output HDMI-0 --rate 60

(You can use chvt to change the VT programmatically, but that's oc annoying)

Offline

#13 2021-09-22 21:15:33

deivi
Member
Registered: 2020-05-24
Posts: 19

Re: [SOLVED] Monitor not working after changing source

Nope, executing those commands just does not affect xrandr output at all.

Offline

#14 2021-09-23 06:05:05

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

Re: [SOLVED] Monitor not working after changing source

The xrandr output is only supposed to change between those commands, the more relevant question would be whether it reactivates the output (I guess the answer is implied)
But this here just streamed along: https://bbs.archlinux.org/viewtopic.php … 9#p1994309

Offline

#15 2021-09-23 07:28:05

deivi
Member
Registered: 2020-05-24
Posts: 19

Re: [SOLVED] Monitor not working after changing source

I meant that xrandr output does not change at any time. Neither before, middle, nor after the second one. Thank you for doing that research, they seem to be very similar problems. Unfortunately, none of the solutions proposed there helped. Flags "NoPM", "DPMS", "ConnectToAcpid" didn't solve the problem. I'm starting to lose faith sad

Offline

#16 2021-09-23 07:43:17

deivi
Member
Registered: 2020-05-24
Posts: 19

Re: [SOLVED] Monitor not working after changing source

Alright, it turns out I had DP, but I didn't notice by accident. Switched to it and it now works perfectly. Although I'm very happy now, it bothers me not knowing what was happening with HDMI... Thank you anyways for your help!

Offline

#17 2021-09-23 07:46:10

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

Re: [SOLVED] Monitor not working after changing source

seth wrote:

tacked on fragile shit protocol w/ a deliberate race condition to please Hollywood

Avoid HDMI at all costs, it'll only cause you headaches.

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

Board footer

Powered by FluxBB