I’m trying to share the same monitor between a desktop and a laptop. I got a KVM. Switching the shared monitor from the desktop to the laptop works fine; switching the other way, from the laptop to the desktop works randomly about 30% - 50% of the times.
I’ve found a few people with a similar issue but no clear solution to solving it.
Here are some more details.
The hardware:
- a Linux desktop (Ubuntu 20.04) with an Asus Z170-K motherboard with a graphics chipset Mesa Intel® HD Graphics 530 (SKL GT2)
- a DELL laptop running Windows 10, with a DP to DVI dongle.
- a DELL monitor 2001FP with a DVI and a VGA input, used in portrait mode.
- a TV connected via HDMI to the Linux desktop
- a Bowu EL-21UHB 2-port USB KVM switch, video is DVI, and it is powered only via the single USB link to each PC. The same product is sold under the same model name but different brand
When I switch the KVM from the laptop to the desktop, if the video doesn’t switch properly, the monitor goes dark, but it seems it detects a signal or power because the monitor’s power LED is green, not amber. It will eventually come on after a random delay, often several minutes, without any specific action on my part.
xrandr reports the monitor is connected even though it is dark:
% xrandr | grep -v '^ '
Screen 0: minimum 320 x 200, current 3120 x 1600, maximum 16384 x 16384
HDMI-1 connected primary 1200x1600+1920+0 left (normal left inverted right x axis y axis) 367mm x 275mm
HDMI-2 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 1440mm x 810mm
DP-1 disconnected (normal left inverted right x axis y axis)
I’m not sure why the desktop’s DVI output is listed as HDMI-1, nor why it is reporting a DP output as it does not have one.
I’ve tried switching the DVI output (labeled “HDMI-1”) on and off via the xrandr command but that had no effect.
I’ve tried issuing commands to /sys/class/drm/card0-HDMI-A-1/status in a sudo’ed bash shell:
echo detect > /sys/class/drm/card0-HDMI-A-1/status
echo on > /sys/class/drm/card0-HDMI-A-1/status
Again no effect.
I’ve tried changing from a USB 2.1 to a USB 3 port on the desktop. Again, no effect.
Recently, sometimes switching the KVM to the desktop has come up with a working monitor but in the wrong mode (landscape instead of portrait) which then fixes itself in typically under a minute.
Oh, and obviously, the monitor never had any issues when connected directly to the desktop via a DVI cable.
And I checked my /var/log/syslog
for any messages. I think the only relevant ones are these:
% egrep 'stride|EDID' /var/log/syslog* | sed -e 's;.*/gdm-x-session;;' | uniq -c
735 [77767]: (II) modeset(0): EDID vendor "DEL", prod id 40968
1 [77767]: (II) modeset(0): Allocate new frame buffer 2944x1080 stride
117 [77767]: (II) modeset(0): EDID vendor "DEL", prod id 40968
1 [77767]: (II) modeset(0): Allocate new frame buffer 3520x1200 stride
1 [77767]: (II) modeset(0): Allocate new frame buffer 3120x1600 stride
27 [77767]: (II) modeset(0): EDID vendor "DEL", prod id 40968
1 [77767]: (II) modeset(0): Allocate new frame buffer 2944x1080 stride
4 [77767]: (II) modeset(0): EDID vendor "DEL", prod id 40968
1 [77767]: (II) modeset(0): Allocate new frame buffer 3520x1200 stride
1 [77767]: (II) modeset(0): Allocate new frame buffer 3120x1600 stride
3 [77767]: (II) modeset(0): EDID vendor "DEL", prod id 40968
1 [77767]: (II) modeset(0): Allocate new frame buffer 2944x1080 stride
7 [77767]: (II) modeset(0): EDID vendor "DEL", prod id 40968
1 [77767]: (II) modeset(0): Allocate new frame buffer 3520x1200 stride
1 [77767]: (II) modeset(0): Allocate new frame buffer 3120x1600 stride
11 [77767]: (II) modeset(0): EDID vendor "DEL", prod id 40968
1 [77767]: (II) modeset(0): Allocate new frame buffer 2944x1080 stride
15 [77767]: (II) modeset(0): EDID vendor "DEL", prod id 40968
1 [77767]: (II) modeset(0): Allocate new frame buffer 3520x1200 stride
1 [77767]: (II) modeset(0): Allocate new frame buffer 3120x1600 stride
9 [77767]: (II) modeset(0): EDID vendor "DEL", prod id 40968
1 [77767]: (II) modeset(0): Allocate new frame buffer 2944x1080 stride
105 [77767]: (II) modeset(0): EDID vendor "DEL", prod id 40968
1 [77767]: (II) modeset(0): Allocate new frame buffer 3520x1200 stride
1 [77767]: (II) modeset(0): Allocate new frame buffer 3120x1600 stride
86 [77767]: (II) modeset(0): EDID vendor "DEL", prod id 40968
1 [77767]: (II) modeset(0): Allocate new frame buffer 2944x1080 stride
2 [77767]: (II) modeset(0): EDID vendor "DEL", prod id 40968
1 [77767]: (II) modeset(0): Allocate new frame buffer 3520x1200 stride
1 [77767]: (II) modeset(0): Allocate new frame buffer 3120x1600 stride
1206 [77767]: (II) modeset(0): EDID vendor "DEL", prod id 40968
1 [77767]: (II) modeset(0): Allocate new frame buffer 2944x1080 stride
2 [77767]: (II) modeset(0): EDID vendor "DEL", prod id 40968
1 [77767]: (II) modeset(0): Allocate new frame buffer 3520x1200 stride
1 [77767]: (II) modeset(0): Allocate new frame buffer 3120x1600 stride
289 [77767]: (II) modeset(0): EDID vendor "DEL", prod id 40968
The additional EDID lines are from a script I wrote that monitors xrandr every minute.
The 3 frame buffer sizes listed in syslog are supposedly for different arrangements of the 2 displays on the desktop, the 1920x1080 TV and the 1200x1600 DELL monitor:
- Allocate new frame buffer 3120x1600 stride = this is the correct side by side
- Allocate new frame buffer 3520x1200 stride = this is side by side, with the monitor in landscape mode
- Allocate new frame buffer 2944x1080 stride = this is side by side, with the monitor in landscape mode at lower res
At this point, yes, I’m aware that using the monitor’s DVI input for one PC and VGA for the other should work. And it sounds like the best solution to share the mouse and keyboard would then be Barrier.
[EDIT: the same thing happens when the KVM is set to the desktop with the monitor working fine and, after the predetermined time of inactivity, the screen is blanked by Ubuntu. Mouse or keyboard activity may not wake the monitor beyond turning its LED from amber to green.]
But still, are there any ideas of what the problem might be with the KVM switching?
And by the way, I found that if I only wanted to use the DVI input of the monitor, I would have an issue in adding a second virtual or ghost monitor to the Windows 10 laptop. And that the solution there might be adding a DP to VGA dongle to it, without any VGA cable beyond that, to trick Windows 10 into allowing a ghost monitor.
0 Answers