Ubuntu

Intrepid: Xmodmap needs to be run again after resume from hibernate/suspend

Reported by Frank Groeneveld on 2008-10-27
96
This bug affects 12 people
Affects Status Importance Assigned to Milestone
gnome-settings-daemon (Ubuntu)
Wishlist
Ubuntu Desktop Bugs
Nominated for Intrepid by Frank Groeneveld
xserver-xorg-input-evdev (Ubuntu)
Undecided
Unassigned
Nominated for Intrepid by Frank Groeneveld

Bug Description

I need some xmodmap stuff to use my keyboard the way I want (it's a mac keyboard, and I map the command key to control for example). This always worked great. After switching to Intrepid I needed to change some keycodes (because of the switch to evdev). However, if I suspend my computer and resume again, the mappings are gone. Before using evdev this wasn't the case. It's a bit anoying to run xmodmap again by hand.
I found out the values are "forgotten" because the evdev module is unloaded on suspend/hibernate.

tonfa (bboissin) wrote :

I second that. This also affect people who changed the default (system) configuration via the gnome-keyboard-properties.
If I do a suspend/resume, the configuration is "lost" (but only for the external keyboard of my laptop, plugged via usb).

Workaround: change the system settings with `dpkg-reconfigure console-setup`, and update the default setup accordingly.

I don't know where it should be fixed ? xserver ? gnome-settings-daemon ? hal ? udev ?

I can confirm this bug in Intrepid. It worked in Hardy. Now after each sleep/wake-up I have to run `xmodmap ~/.Xmodmap` to get the *external* keyboard work properly. The internal notebook keyboard keeps it layout and shows no problem.

Amir Vadai (amirva) wrote :

I can confirm it on Intrepid too. It worked in Hardy.
after sleep/wake-up I can't switch keyboard layout through the gnome-keyboard-applet.
Only USA layout is shown in the applet context menu under Group.
When selection "keyboard preferences"->Layouts - I see the missing layout (hebrew keyboard).
Only after adding a layout or removing - I can switch layouts again.

tonfa (bboissin) wrote :

Btw, I've talked with Xorg developpers. From what I understood the bug is likely to get fixed if you configured your keyboard via gnome. Currently there's no plan to fix it for people using xmodmap (you can re-run xmodmap when going out of suspend anyway).

The change is due to the switch to evdev, after the suspend/resume the keyboard is viewed as a new keyboard.

So there are two problems caused by this bug, and I found following workarounds work for me:

1. The workaround for Xmodmap is to create a /etc/acpi/resume.d/50-xmodmap.sh script
that runs `xmodmap /home/me/.Xmodmap`on every wake up.

2. The second problem is that layouts and layout switcher is broken after the wake up for the external keyboard. You have either to restart the computer(!) or to right click on keyboard indicator -> keyboard preferences -> Layout -> add new layout or remove existing layout -> close. Then the layouts are repaired again. Very annoying.

And together with numerous other bugs and regressions in Ubuntu 8.10 (bluetooth, network and standby issues) it is really unusable for serious work. Since update from 8.04 I am only dealing with Ubuntu every day/evening instead of focusing on my daily tasks/interesting things.

Bryce Harrington (bryce) wrote :

[This is an automated message]

Hi frankgroeneveld,

Thanks for including an image to demonstrate the issue. Could you also please attach the output of `lspci -vvnn`, and attach your /var/log/Xorg.0.log file from after reproducing this issue. If you've made any customizations to your /etc/X11/xorg.conf please attach that as well.

Changed in xserver-xorg-input-evdev:
status: New → Incomplete
Bryce Harrington (bryce) wrote :

We're closing this bug since it is has been some time with no response from the original reporter. However, if the issue still exists please feel free to reopen with the requested information. Also, if you could, please test against the latest development version of Ubuntu, since this confirms the bug is one we may be able to pass upstream for help.

Changed in xserver-xorg-input-evdev:
status: Incomplete → Invalid
Martin Tuzinsky (mato-tuzo) wrote :

it was probably fixed. after one of the latest updates of interpid this does not occur anymore.

Sebastien Bacher (seb128) wrote :

the issue is similar to bug #280148 which has been fixed in intrepid updates and jaunty

Changed in gnome-settings-daemon:
assignee: nobody → desktop-bugs
importance: Undecided → Wishlist
Paulo J. S. Silva (pjssilva) wrote :

I have the same problem. I am running Intrepid with last updates.

I use a laptop with the US International keyboard layout. Since I am Brazilian, when I attach an external keyboard to it I use a Brazilian keyboard (ABNT2 model/layout). Untill 8.04 I simply had to add the keyboard applet, configure both layouts and switch between them as appropriate.

Now, in Interpid, if the external keyboard in unplugged and then replugged (physically or by supending), the layout is restored to US(intl). Sometimes the Bra label in the applet also changes to the label "??". Worse, the keyboard applet become nonfunctional (sometimes it freezes, in the sense that a mouse click over it doesn't change the layout or it starts to switch between USA and ?? layouts - but it doesn't actually change the keyboard behavior). To make the applet wake up again I have to issue a

% killall gnome-settings-daemon; sleep 1; gnome-settings-daemon

Paulo

DaveAbrahams (boostpro) wrote :

My workaround for this problem is at http://wiki.github.com/techarcana/ubuntu-config.
The workaround should shed a little light on the reasons for the problem.

Sebastien Bacher (seb128) wrote :

the bug could be fixed one libxklavier uses xinput, see bug #363169

Sebastien Bacher (seb128) wrote :

xmodmap support has been dropped in GNOME3 which deprecate that bug report, closing it

Changed in gnome-settings-daemon (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers