Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Xmodmap periodically resets

Graphical Environments, Managers, Multimedia & Desktop questions.
Post Reply
Message
Author
Hinco
Posts: 21
Joined: 2006-08-19 01:09
Location: Göteborg, Sweden

Xmodmap periodically resets

#1 Post by Hinco »

I have a custom .Xmodmap file to change the keyboard layout. The problem is that sometimes the keyboard layout changes back to the default.

When searching for a solution I found that someone had a similar problem when reconnecting their keyboard. I have seen the lights on the keyboard blink at times, so I tried unplugging and reconnecting the keyboard and yes - that reset the layout. I can see keyboard removed/detected entries in the logs as well, so I guess my keyboard reconnects sometimes, I don't know why. However the solution from the post earlier (to rename the xmodmap file to ~/.Xmodmap) did not help. So is there another default filename I should use? Or do I have to enable xmodmap to run when a keyboard is plugged in somehow?

The only thing I can think of right now is to monitor /var/log/Xorg.0.log for "Adding input device USB Keyboard" and running xmodmap when that happens... but I'm really hoping for a better solution. Any ideas?

update: If I can't fix the xmodmap problem, maybe I can fix the usb disconnects.

I read something about power saving settings for usb. After some digging, I found that those settings are in /sys/bus/usb/devices/.../power/. However, disabling autosuspend for the hub did not seem to help (it was already disabled for the keyboard).

But I found something else in kern.log. Perhaps the keyboard disconnects has something to do with static electricity?

Code: Select all

[ 7078.175830] usb 1-10-port3: disabled by hub (EMI?), re-enabling...
[ 7078.175888] usb 1-10.3: USB disconnect, device number 4
[ 7078.624349] usb 1-10.3: new full-speed USB device number 6 using xhci_hcd
[ 7078.729012] usb 1-10.3: New USB device found, idVendor=04d9, idProduct=0125
[ 7078.729014] usb 1-10.3: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[ 7078.729016] usb 1-10.3: Product: USB Keyboard

Post Reply