Link to home
Start Free TrialLog in
Avatar of Jeff swicegood
Jeff swicegood

asked on

Can't see Ubuntu desktop on KVM switch unless I reboot the PC

Trying to get my KVM switch to work smoothly.

I have a 4 port KVM switch.

The other three PC's work fine but with my Ubuntu box nothing shows up unless I reboot the machine with it's display selected on the switch. I can then switch back and forth to and form it.

Monitor: Dell basic flat panel with VGA input
KVM Switch: IOGEAR 4-Port USB Cable KVM Switch GCS24U
    Switch configuration; (1). Ubuntu 16.04 text console, graphics mode (2). Ubuntu (Xubuntu) 14.04 --the one in question (3). WIndows 10 (4). RouterOS text console only.
OS: Ubuntu 14.04 64bit with Xfce desktop environment
Graphics Card: Cape Verde PRO [Radeon HD 7750/8740 / R7 250E]


Would making an Xorg.conf and manually editing it help?
Avatar of gheist
gheist
Flag of Belgium image

Can you disable all sorts of USB power saving on ubuntu (powertop is interactive menu to do this)?
Avatar of Jeff swicegood
Jeff swicegood

ASKER

I have made the changes to power contol via powertop, and am testing.
You will need to add reverse parameter i.e usbcore.autosuspend=0 if tests prove good:
https://wiki.archlinux.org/index.php/Power_management#USB_autosuspend
It did not work. But syslog says that the USB keyboard and mouse are being registered. I also tried logging in via ssh and restarting lightdm but same. I also generated an Xorg.conf but I didn't move it to it's place.
Normally you dont need xorg.conf at all. It uses kernel input drivers in this case, which means you can plug 255 keyboards and mouses per USB port in any combination.

Connect SSH to machine, run lsusb
Now switch away and switch back faster than 15s - run lsusb
Now same but 5min away
Could it be that somehow KVM is slow or USB 'keyboard' stops responding as Linux sees it?
Can you post dmesg (you can delete MAC addresses and other serial numbers, they dont help here) while flipping KVM to other systems?
I did what you said.
 In all three cases the lsusb was the same:

Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 002: ID 2109:0811 VIA Labs, Inc. Hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 022: ID 1c4f:0003 SiGma Micro HID controller
Bus 001 Device 021: ID 046d:c315 Logitech, Inc. Classic Keyboard 200
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Open in new window



Dmesg
 usb 1-1.6: Manufacturer: SIGMACHIP
[ 4299.557960] input: SIGMACHIP Usb Mouse as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.6/1-1.6:1.0/input/input23
[ 4299.558316] hid-generic 0003:1C4F:0003.0006: input,hidraw1: USB HID v1.10 Mouse [SIGMACHIP Usb Mouse] on usb-0000:00:1a.0-1.6/input0
[ 4357.864747] usb 1-1.5: USB disconnect, device number 7
[ 4358.024958] usb 1-1.6: USB disconnect, device number 8
[ 4396.738343] usb 1-1.5: new low-speed USB device number 9 using ehci-pci
[ 4396.837077] usb 1-1.5: New USB device found, idVendor=046d, idProduct=c315
[ 4396.837083] usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 4396.837086] usb 1-1.5: Product: Logitech USB Keyboard
[ 4396.837088] usb 1-1.5: Manufacturer: Logitech
[ 4396.840740] input: Logitech Logitech USB Keyboard as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.5/1-1.5:1.0/input/input24
[ 4396.840918] hid-generic 0003:046D:C315.0007: input,hidraw0: USB HID v1.10 Keyboard [Logitech Logitech USB Keyboard] on usb-0000:00:1a.0-1.5/input0
[ 4397.038478] usb 1-1.6: new low-speed USB device number 10 using ehci-pci
[ 4397.136232] usb 1-1.6: New USB device found, idVendor=1c4f, idProduct=0003
[ 4397.136237] usb 1-1.6: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 4397.136240] usb 1-1.6: Product: Usb Mouse
[ 4397.136242] usb 1-1.6: Manufacturer: SIGMACHIP
[ 4397.139222] input: SIGMACHIP Usb Mouse as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.6/1-1.6:1.0/input/input25
[ 4397.139569] hid-generic 0003:1C4F:0003.0008: input,hidraw1: USB HID v1.10 Mouse [SIGMACHIP Usb Mouse] on usb-0000:00:1a.0-1.6/input0
[ 4402.461385] usb 1-1.5: USB disconnect, device number 9
[ 4402.629459] usb 1-1.6: USB disconnect, device number 10
[ 4433.875454] usb 1-1.5: new low-speed USB device number 11 using ehci-pci
[ 4433.974209] usb 1-1.5: New USB device found, idVendor=046d, idProduct=c315
[ 4433.974215] usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 4433.974217] usb 1-1.5: Product: Logitech USB Keyboard
[ 4433.974220] usb 1-1.5: Manufacturer: Logitech
[ 4433.978006] input: Logitech Logitech USB Keyboard as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.5/1-1.5:1.0/input/input26
[ 4433.978349] hid-generic 0003:046D:C315.0009: input,hidraw0: USB HID v1.10 Keyboard [Logitech Logitech USB Keyboard] on usb-0000:00:1a.0-1.5/input0
[ 4434.175614] usb 1-1.6: new low-speed USB device number 12 using ehci-pci
[ 4434.273114] usb 1-1.6: New USB device found, idVendor=1c4f, idProduct=0003
[ 4434.273119] usb 1-1.6: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 4434.273122] usb 1-1.6: Product: Usb Mouse
[ 4434.273124] usb 1-1.6: Manufacturer: SIGMACHIP
[ 4434.276232] input: SIGMACHIP Usb Mouse as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.6/1-1.6:1.0/input/input27
[ 4434.276907] hid-generic 0003:1C4F:0003.000A: input,hidraw1: USB HID v1.10 Mouse [SIGMACHIP Usb Mouse] on usb-0000:00:1a.0-1.6/input0
[ 4446.866692] usb 1-1.5: USB disconnect, device number 11
[ 4447.034018] usb 1-1.6: USB disconnect, device number 12
[ 4455.389405] usb 1-1.5: new low-speed USB device number 13 using ehci-pci
[ 4455.488752] usb 1-1.5: New USB device found, idVendor=046d, idProduct=c315
[ 4455.488758] usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 4455.488761] usb 1-1.5: Product: Logitech USB Keyboard
[ 4455.488763] usb 1-1.5: Manufacturer: Logitech
[ 4455.492441] input: Logitech Logitech USB Keyboard as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.5/1-1.5:1.0/input/input28
[ 4455.492590] hid-generic 0003:046D:C315.000B: input,hidraw0: USB HID v1.10 Keyboard [Logitech Logitech USB Keyboard] on usb-0000:00:1a.0-1.5/input0
[ 4455.689568] usb 1-1.6: new low-speed USB device number 14 using ehci-pci
[ 4455.786891] usb 1-1.6: New USB device found, idVendor=1c4f, idProduct=0003
[ 4455.786897] usb 1-1.6: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 4455.786900] usb 1-1.6: Product: Usb Mouse
[ 4455.786902] usb 1-1.6: Manufacturer: SIGMACHIP
[ 4455.790125] input: SIGMACHIP Usb Mouse as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.6/1-1.6:1.0/input/input29
[ 4455.790470] hid-generic 0003:1C4F:0003.000C: input,hidraw1: USB HID v1.10 Mouse [SIGMACHIP Usb Mouse] on usb-0000:00:1a.0-1.6/input0
[ 4493.095204] usb 1-1.5: USB disconnect, device number 13
[ 4493.259296] usb 1-1.6: USB disconnect, device number 14
[ 4563.471271] usb 1-1.5: new low-speed USB device number 15 using ehci-pci
[ 4563.570109] usb 1-1.5: New USB device found, idVendor=046d, idProduct=c315
[ 4563.570115] usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 4563.570118] usb 1-1.5: Product: Logitech USB Keyboard
[ 4563.570120] usb 1-1.5: Manufacturer: Logitech
[ 4563.573885] input: Logitech Logitech USB Keyboard as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.5/1-1.5:1.0/input/input30
[ 4563.574251] hid-generic 0003:046D:C315.000D: input,hidraw0: USB HID v1.10 Keyboard [Logitech Logitech USB Keyboard] on usb-0000:00:1a.0-1.5/input0
[ 4563.771410] usb 1-1.6: new low-speed USB device number 16 using ehci-pci
[ 4563.869013] usb 1-1.6: New USB device found, idVendor=1c4f, idProduct=0003
[ 4563.869018] usb 1-1.6: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 4563.869021] usb 1-1.6: Product: Usb Mouse
[ 4563.869023] usb 1-1.6: Manufacturer: SIGMACHIP
[ 4563.872007] input: SIGMACHIP Usb Mouse as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.6/1-1.6:1.0/input/input31
[ 4563.872401] hid-generic 0003:1C4F:0003.000E: input,hidraw1: USB HID v1.10 Mouse [SIGMACHIP Usb Mouse] on usb-0000:00:1a.0-1.6/input0
[ 4566.248946] usb 1-1.5: USB disconnect, device number 15
[ 4566.409041] usb 1-1.6: USB disconnect, device number 16
[ 4962.911665] init: videocast main process (3040) killed by KILL signal
[ 4962.911674] init: videocast main process ended, respawning
[ 5081.594333] usb 1-1.5: new low-speed USB device number 17 using ehci-pci
[ 5081.693215] usb 1-1.5: New USB device found, idVendor=046d, idProduct=c315
[ 5081.693221] usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 5081.693224] usb 1-1.5: Product: Logitech USB Keyboard
[ 5081.693226] usb 1-1.5: Manufacturer: Logitech
[ 5081.696750] input: Logitech Logitech USB Keyboard as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.5/1-1.5:1.0/input/input32
[ 5081.696947] hid-generic 0003:046D:C315.000F: input,hidraw0: USB HID v1.10 Keyboard [Logitech Logitech USB Keyboard] on usb-0000:00:1a.0-1.5/input0
[ 5081.894470] usb 1-1.6: new low-speed USB device number 18 using ehci-pci
[ 5081.991473] usb 1-1.6: New USB device found, idVendor=1c4f, idProduct=0003
[ 5081.991479] usb 1-1.6: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 5081.991481] usb 1-1.6: Product: Usb Mouse
[ 5081.991484] usb 1-1.6: Manufacturer: SIGMACHIP
[ 5081.994261] input: SIGMACHIP Usb Mouse as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.6/1-1.6:1.0/input/input33
[ 5081.994641] hid-generic 0003:1C4F:0003.0010: input,hidraw1: USB HID v1.10 Mouse [SIGMACHIP Usb Mouse] on usb-0000:00:1a.0-1.6/input0
[ 5182.721360] usb 1-1.5: USB disconnect, device number 17
[ 5182.889449] usb 1-1.6: USB disconnect, device number 18
[ 5683.312759] init: videocast main process (3402) killed by KILL signal
[ 5683.312768] init: videocast main process ended, respawning

Open in new window


Not sure if there are mac addresses of not.
Does the keyboard or mouse recover if you unplug and plug back KVM USB to Ubuntu?
lsusb -t may tell if you have free USB bus and KVM usb starts to work in other USB port...

Your KVM says it is host-powered and there is no power input. You could try disabling USB power save on all ports it is connected to.
Unplugging and replugging the KVM USB does nothing. I have created the following in an attempt to disable all powersaving:

As far as I know, that part is working.

/etc/rc.local:

#!/bin/sh -e
#
# rc.local

#by Jaga to keep USB from going into powersave mode

#Autosuspend for USB device EHCI Host Controller [usb2]
echo 'on' > '/sys/bus/usb/devices/usb2/power/control'
#Autosuspend for unknown USB device 1-1 (8087:0024)
echo 'on' > '/sys/bus/usb/devices/1-1/power/control'
#Autosuspend for unknown USB device 2-1 (8087:0024)
echo 'on' > '/sys/bus/usb/devices/2-1/power/control'
#Autosuspend for USB device EHCI Host Controller [usb1]
echo 'on' > '/sys/bus/usb/devices/usb1/power/control'
#Autosuspend for USB device USB2.0 Hub [5-1]
echo 'on' > '/sys/bus/usb/devices/5-1/power/control'
#Autosuspend for USB device xHCI Host Controller [usb4]
echo 'on' > '/sys/bus/usb/devices/usb4/power/control'
#Autosuspend for USB device xHCI Host Controller [usb5]
echo 'on' > '/sys/bus/usb/devices/usb5/power/control'
#Autosuspend for USB device xHCI Host Controller [usb6]
echo 'on' > '/sys/bus/usb/devices/usb6/power/control'
#Autosuspend for USB device xHCI Host Controller [usb3]
echo 'on' > '/sys/bus/usb/devices/usb3/power/control'


exit 0

Open in new window


I have also tried plugging them into an unused bus. Nothing.
ASKER CERTIFIED SOLUTION
Avatar of masnrock
masnrock
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
It could be that linux machine (hardware, not software) happens to have proper power regulator and KVM does request enough power for usb kayboards and mice.
You are disabling wrong powersaving.
You need to set usbcore.autosuspend=0 boot parameter.
usbcore.autosuspend=0 boot parameter has no effect. I found something that makes it come up with out rebooting. If I ssh in from another PC and stop lightdm and then start lightdm it comes up. Maybe if xorg had the right IEID for that KVM switch it would work the first time?
Normally you can go ahead without xorg.conf and linux kernel via X11 evdev driver takes care of all HID devices.
I am just wondering if text console also suffers from mouse disappearance (then we can leave out linux problems and focus on Xorg)
How do I set it to start persistently without the GUI? I know how to do it in systemd -  systemctl default multiuser.target. But this it upstart.

Edit: Nevermind. I learned that to so it I add "text" to the boot options.
Happens the same it text mode. Although it does not appear to be a true text mode but a graphical text mode. But if I switch to it (the blank screen), login completely blind and type "start lightdm" completely blind, the display comes up.
It looks like USB power issue. If there is sort of firmware update for KVM - try it out.
The firmware is not updatable. I guess I'm out of luck.
Do you have another KVM that you could try?
No. But reading here. It seems the kernel param to turn of autosuspend is supposed to be usbcore.autosuspend=-1. I will try that.
OK, i am behind very late kernels and recent distros.
No, that did not help. What makes you say it is a USB power issue when it has enough power to receive data from the input devices (keyboard and mouse)? There is something magical about initializing the display which happens during the boot process and later when the display manager is restarted that makes it come up.

BTW, I don't mean to be challenging. I ask mainly for my own learning. I tried putting the EDID in a binary file and then loading it with kms on the kernel boot command line as suggested here, but it did not help. I guess at some point I have to give up. Too bad because this KVM was cheap and mostly works. KVM's are mostly very expensive.
I switched to Windows on this PC because the Windows version of the service I am running is better. So the problem in now moot.

Thank you gheist for giving it your best.