You are not logged in.
I have a dual boot (Arch + Windows). Whenever I get back from Windows my multimedia keys doesn't work anymore.
After boot on Arch I can just unplug and plug my keyboard and it works fine again.
There's some way to soft reset my keyboard driver?
I'm thinking this could be a solution to my issue.
I've tried this:
sudo rmmod atkbd ; modprobe atkbd reset=1No success and this error message:
modprobe: ERROR: could not insert 'atkbd': Operation not permittedYes, I'm using sudo.
For reference it's a Razer Deathstalker Essential, maybe someday someone will google if it works on linux.
Offline
you aren't using sudo on the modprobe command.
Offline
Actually you were right, I didn't saw it before.
Anyway, didn't solve it after all. I got this from dmesg:
[ 5314.892958] atkbd serio0: keyboard reset failed on isa0060/serio0
[ 5333.801874] atkbd serio0: keyboard reset failed on isa0060/serio0When I unplug and I get this (dmesg too), maybe it can help:
[ 5506.744610] usb 1-1.4: USB disconnect, device number 5
[ 5508.210523] usb 1-1.4: new full-speed USB device number 6 using ehci-pci
[ 5508.297731] input: Razer Razer DeathStalker Essential 2014 as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4/1-1.4:1.0/0003:1532:011F.0007/input/input24
[ 5508.350958] hid-generic 0003:1532:011F.0007: input,hidraw2: USB HID v1.11 Keyboard [Razer Razer DeathStalker Essential 2014] on usb-0000:00:1a.0-1.4/input0
[ 5508.355145] input: Razer Razer DeathStalker Essential 2014 as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4/1-1.4:1.1/0003:1532:011F.0008/input/input25
[ 5508.407617] hid-generic 0003:1532:011F.0008: input,hidraw3: USB HID v1.11 Keyboard [Razer Razer DeathStalker Essential 2014] on usb-0000:00:1a.0-1.4/input1
[ 5508.411589] input: Razer Razer DeathStalker Essential 2014 as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4/1-1.4:1.2/0003:1532:011F.0009/input/input26
[ 5508.411914] hid-generic 0003:1532:011F.0009: input,hidraw4: USB HID v1.11 Mouse [Razer Razer DeathStalker Essential 2014] on usb-0000:00:1a.0-1.4/input2Offline
That's quite possibly because your keyboard is USB so reloading the AT & PS/2 driver doesn't bother it in the slightest ![]()
I think usbhid is the one for USB keyboards and mice.
Offline
What happens if you remove and reload the usbhid module (atkbd is for PS/2 keyboards so no surprise there)
Offline
Allright! We're on something! Thanks!
It still doesn't work. I think it's happening some kind of conflict. This is my new dmesg after trying "sudo rmmod usbhid ; sudo modprobe usbhid reset=1":
[ 1250.526215] usbcore: deregistering interface driver usbhid
[ 1250.900304] usbhid: unknown parameter 'reset' ignored
[ 1250.901655] input: Razer Razer Abyssus 1800 as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.3/1-1.3:1.0/0003:1532:0020.0007/input/input22
[ 1250.901871] hid-generic 0003:1532:0020.0007: input,hidraw0: USB HID v1.11 Mouse [Razer Razer Abyssus 1800] on usb-0000:00:1a.0-1.3/input0
[ 1250.924021] input: Razer Razer Abyssus 1800 as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.3/1-1.3:1.1/0003:1532:0020.0008/input/input23
[ 1250.977548] hid-generic 0003:1532:0020.0008: input,hidraw1: USB HID v1.11 Keyboard [Razer Razer Abyssus 1800] on usb-0000:00:1a.0-1.3/input1
[ 1251.241891] input: Razer Razer Kraken 7.1 as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.6/2-1.6:1.3/0003:1532:0506.0009/input/input24
[ 1251.294259] hid-generic 0003:1532:0506.0009: input,hiddev0,hidraw2: USB HID v1.11 Device [Razer Razer Kraken 7.1] on usb-0000:00:1d.0-1.6/input3
[ 1251.310572] input: Razer Razer DeathStalker Essential 2014 as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4/1-1.4:1.0/0003:1532:011F.000A/input/input25
[ 1251.364173] hid-generic 0003:1532:011F.000A: input,hidraw3: USB HID v1.11 Keyboard [Razer Razer DeathStalker Essential 2014] on usb-0000:00:1a.0-1.4/input0
[ 1251.367353] input: Razer Razer DeathStalker Essential 2014 as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4/1-1.4:1.1/0003:1532:011F.000B/input/input26
[ 1251.420749] hid-generic 0003:1532:011F.000B: input,hidraw4: USB HID v1.11 Keyboard [Razer Razer DeathStalker Essential 2014] on usb-0000:00:1a.0-1.4/input1
[ 1251.424328] input: Razer Razer DeathStalker Essential 2014 as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4/1-1.4:1.2/0003:1532:011F.000C/input/input27
[ 1251.424498] hid-generic 0003:1532:011F.000C: input,hidraw5: USB HID v1.11 Mouse [Razer Razer DeathStalker Essential 2014] on usb-0000:00:1a.0-1.4/input2
[ 1251.424530] usbcore: registered new interface driver usbhid
[ 1251.424531] usbhid: USB HID core driverThis bothers me:
[ 1250.977548] hid-generic 0003:1532:0020.0008: input,hidraw1: USB HID v1.11 Keyboard [Razer Razer Abyssus 1800] on usb-0000:00:1a.0-1.3/input1This is a mouse, not a keyboard.
Am I on the right track? Some tips?
Offline
I don't think it has anything to do with this mouse. More likely Windows leaves the keyboard in some non-default state and Linux driver doesn't know about this.
It seem that Linux can be made to reset a USB port and force connected device to reattach. This doesn't always ensure full device reset but may be sufficient. See here.
If not, it's possible to power cycle a USB port. This will reliably reset everything that doesn't have battery ![]()
Offline
Thanks mich41!
Neither worked.
![]()
USBReset says it went right but nothing changes, my multimedia keys still doesn't work.
Hubpower was giving me segfault. Including <string.h> it runs.
This is my lsusb:
Bus 002 Device 003: ID 1532:0506 Razer USA, Ltd
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 001 Device 005: ID 1532:011f Razer USA, Ltd
Bus 001 Device 004: ID 1532:0020 Razer USA, Ltd
Bus 001 Device 003: ID 045e:0291 Microsoft Corp. Xbox 360 Wireless Receiver for Windows
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 hubI've tried hubpower 001:005 power and I get an error message saying that this device isn't a hub.
So I've tried hubpower 001:001 and all my usb devices went off. I can't turn it on again cause I can't write because my mouse and keyboard is gone.
I know that 001:005 is my keyboard because this on dmesg:
[ 1.498478] input: Razer Razer DeathStalker Essential 2014 as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4/1-1.4:1.0/0003:1532:011F.0003/input/input3
[ 1.549694] hid-generic 0003:1532:011F.0003: input,hidraw2: USB HID v1.11 Keyboard [Razer Razer DeathStalker Essential 2014] on usb-0000:00:1a.0-1.4/input0
[ 1.553844] input: Razer Razer DeathStalker Essential 2014 as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4/1-1.4:1.1/0003:1532:011F.0004/input/input4
[ 1.606331] hid-generic 0003:1532:011F.0004: input,hidraw3: USB HID v1.11 Keyboard [Razer Razer DeathStalker Essential 2014] on usb-0000:00:1a.0-1.4/input1
[ 1.610270] input: Razer Razer DeathStalker Essential 2014 as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4/1-1.4:1.2/0003:1532:011F.0005/input/input5
[ 1.610406] hid-generic 0003:1532:011F.0005: input,hidraw4: USB HID v1.11 Mouse [Razer Razer DeathStalker Essential 2014] on usb-0000:00:1a.0-1.4/input2Anything more I should try?
This is a lot more complicated that I expected. ![]()
Thanks for the help guys, I mean it.
Offline
USBReset says it went right but nothing changes, my multimedia keys still doesn't work.
Either USBReset didn't work or the keyboard reconnected but still didn't change its internal state. You can find out in dmesg.
I've tried hubpower 001:005 power and I get an error message saying that this device isn't a hub.
That's OK, keyboard is not a hub indeed ![]()
So I've tried hubpower 001:001 and all my usb devices went off. I can't turn it on again cause I can't write because my mouse and keyboard is gone.
OK, so you managed to power down all ports on the root hub of your bus 1, that's some progress ![]()
You need to figure out which port to switch exactly. Run lsusb -t, this will print connections between devices and hub port numbers in addition to normal output. So if the keyboard turns out to be on, say, port 3 of hub 1:1, you need:
hubpower 1:1 power 3 off ; hubpower 1:1 power 3 onThat's two commands, but when dealing with a keyboard it's a good idea to put them on one line ![]()
Offline
No success yet but maybe I'm doing something wrong.
So I've tried:
sudo hubpower 1:1 power 1 off ; sudo hubpower 1:1 power 1 onAnd got:
Port 1 status: 0503 High Speed Power-On Enabled Connected
Port 1 status: 0507 High Speed Power-On Suspended Enabled ConnectedI had to take a photo with my cellphone because it froze all my peripherals again.
This is my lsusb -t:
lsusb -t
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/6p, 480M
|__ Port 6: Dev 3, If 0, Class=Audio, Driver=snd-usb-audio, 12M
|__ Port 6: Dev 3, If 1, Class=Audio, Driver=snd-usb-audio, 12M
|__ Port 6: Dev 3, If 2, Class=Audio, Driver=snd-usb-audio, 12M
|__ Port 6: Dev 3, If 3, Class=Human Interface Device, Driver=usbhid, 12M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 2: Dev 3, If 0, Class=Vendor Specific Class, Driver=xpad, 12M
|__ Port 2: Dev 3, If 1, Class=Vendor Specific Class, Driver=, 12M
|__ Port 2: Dev 3, If 2, Class=Vendor Specific Class, Driver=xpad, 12M
|__ Port 2: Dev 3, If 3, Class=Vendor Specific Class, Driver=, 12M
|__ Port 2: Dev 3, If 4, Class=Vendor Specific Class, Driver=xpad, 12M
|__ Port 2: Dev 3, If 5, Class=Vendor Specific Class, Driver=, 12M
|__ Port 2: Dev 3, If 6, Class=Vendor Specific Class, Driver=xpad, 12M
|__ Port 2: Dev 3, If 7, Class=Vendor Specific Class, Driver=, 12M
|__ Port 3: Dev 4, If 0, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 3: Dev 4, If 1, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 4: Dev 6, If 0, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 4: Dev 6, If 1, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 4: Dev 6, If 2, Class=Human Interface Device, Driver=usbhid, 12MMy first attempt was with:
sudo hubpower 1:1 power 4 off ; sudo hubpower 1:1 power 4 onThis is where I think my keyboard is and somehow it is because it froze my mouse and keyboard too.
This was the message:
sudo ./hubpower 1:1 power 4 off ; sudo ./hubpower 1:1 power 4 on
Invalid port number: 4
Invalid port number: 4I'm sorry to ask but I'm clueless. ![]()
Offline
Sorry, you need to additionally run "hubpower xx bind" at the end. It seems that the first thing "hubpower power" does is unbinding (disabling) Linux drivers for all devices on the hub and "hubpower bind" reverses this.
However, a bad news is that your root hub seems to ignore power-off requests - it still says "Power-On" after the first command. But, it seems that there is another hub (Dev 2) sitting between port 1 of the root hub and actual USB ports on the motherboard. So, you can try "hubpower 1:2 power 4 off ; ..." - maybe this second hub supports power switching.
Or maybe not, frankly I've never used this tool, just found it yesterday because this whole issue got me curious whether it's possible to reset USB devices by software. Maybe it's a standard nobody actually supports.
Offline
I don't mind to be your rat lab mich41 hahahah. We're making progress here.
Good news, your curiosity is right, it is possible! But it doesn't resolve my problem.
After running:
sudo ./hubpower 1:2 power 4 off ; sudo ./hubpower 1:2 power 4 on ; sudo ./hubpower 1:2 bind
Port 4 status: 0000 Power-Off
Port 4 status: 0101 Power-On Connected
Bind-driver request sent to the kernelI can guarantee that this make my ports go off cause my mouse and keyboard lights went off too.
Another thing, don't run it unstoppable, sometimes they don't come back on. ![]()
So, this is dmesg after run hubpower:
[ 260.816551] usb 1-1.2: USB disconnect, device number 3
[ 260.872678] usb 1-1.3: USB disconnect, device number 4
[ 260.988946] usb 1-1.4: USB disconnect, device number 5
[ 261.365917] hub 1-1:1.0: USB hub found
[ 261.366132] hub 1-1:1.0: 4 ports detected
[ 261.632223] usb 1-1.2: new full-speed USB device number 6 using ehci-pci
[ 262.221268] input: Razer Razer Kraken 7.1 as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2:1.3/0003:1532:0506.0007/input/input22
[ 262.272573] hid-generic 0003:1532:0506.0007: input,hiddev0,hidraw0: USB HID v1.11 Device [Razer Razer Kraken 7.1] on usb-0000:00:1a.0-1.2/input3
[ 262.345528] usb 1-1.3: new full-speed USB device number 7 using ehci-pci
[ 262.434083] input: Razer Razer Abyssus 1800 as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.3/1-1.3:1.0/0003:1532:0020.0008/input/input23
[ 262.434211] hid-generic 0003:1532:0020.0008: input,hidraw1: USB HID v1.11 Mouse [Razer Razer Abyssus 1800] on usb-0000:00:1a.0-1.3/input0
[ 262.435020] input: Razer Razer Abyssus 1800 as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.3/1-1.3:1.1/0003:1532:0020.0009/input/input24
[ 262.485814] hid-generic 0003:1532:0020.0009: input,hidraw2: USB HID v1.11 Keyboard [Razer Razer Abyssus 1800] on usb-0000:00:1a.0-1.3/input1
[ 262.552216] usb 1-1.4: new full-speed USB device number 8 using ehci-pci
[ 262.642751] input: Razer Razer DeathStalker Essential 2014 as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4/1-1.4:1.0/0003:1532:011F.000A/input/input25
[ 262.712384] hid-generic 0003:1532:011F.000A: input,hidraw3: USB HID v1.11 Keyboard [Razer Razer DeathStalker Essential 2014] on usb-0000:00:1a.0-1.4/input0
[ 262.715094] input: Razer Razer DeathStalker Essential 2014 as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4/1-1.4:1.1/0003:1532:011F.000B/input/input26
[ 262.765926] hid-generic 0003:1532:011F.000B: input,hidraw4: USB HID v1.11 Keyboard [Razer Razer DeathStalker Essential 2014] on usb-0000:00:1a.0-1.4/input1
[ 262.767993] input: Razer Razer DeathStalker Essential 2014 as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4/1-1.4:1.2/0003:1532:011F.000C/input/input27
[ 262.768263] hid-generic 0003:1532:011F.000C: input,hidraw5: USB HID v1.11 Mouse [Razer Razer DeathStalker Essential 2014] on usb-0000:00:1a.0-1.4/input2I'm thinking again about conflict among my peripherals it's causing my problem.
Another thing, it's odd cause I said to turn off/on just port 4, right? But all my ports went off/on.
Offline
I'm afraid that your motherboard only lies about supporting power switching. If disconnection/reconnection helps then power cycling also should. The blinking of lights may have been caused merely by driver undbinding and binding, especially in the case of this mouse on port 3.
Well, maybe try adding "; sleep 3 ;" between "power off" and "power on" to switch it off for 3 seconds? If this doesn't work, I can't imagine what would.
Do you have some dumb, passive device like a USB powered LED lamp or beer refrigerator to really verify this power switching thing? FWIW, I tested my desktop motherboard using an LED lamp and it didn't work.
Offline
You we're right again, it dind't went off.
Test 1: My mouse light keeps on even when my computer is off and at "sleep 3" it kept on. It just blinks in the end.
Test 2: Another test was to just turn the port off and plug my cellphone. It started to charge.
Test 3: Unplug my mouse and plug it again at the same port. Light went off. (Don't know why but this test is screwed.)
Well, I give up too. Unplug and plug seems fine for me after all this time hahaha.
I've sent an e-mail to hubpower writer and I will do some other tests but I think that's it.
Thanks mich41! I'l pay you a beer someday! ![]()
Offline