[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#596775: Xmodmap pointer setting lost across removal/reinsertion of psmouse



Package: xserver-xorg
Version: 1:7.3+20

On my system, I run an xmodmap which contains
   pointer = 1 3 2
This swaps right and middle button which I find useful.

If I do this
   rmmod psmouse
   modprobe psmouse
then when the X server regains its ability to use the mouse, the
pointer setting has been forgotten.

I noticed this on my IBM Thinkpad R50p, on which I'm using an ancient
copy of some hibernation tools which had psmouse in the blacklist for
hibernation: the effect was that hibernation lost my mouse settings.
(Luckily the psmouse driver seems to be good for hibernation nowadays
so I can remove it from the blacklist.)

I think the X server should not forget the mappings in this situation.
Nor should it forget other parts of its configuration (such as
keyboard mappings, key repeat configuration or bell settings).

I think this bug likely shares its underlying cause with:
 #568868  key repeat for caps lock goes away after suspend/resume
 #582566  bell settings (xset -b) not preserved after suspend/resume
 #541388  xserver-xorg: Xmodmap settings lost across suspend/hibernate

I'm guessing that the data set by xset and xmodmap is nowadays hung
off driver-specific stuff in the X server, and gets reinitialised when
the devices X is talking to go away and come back.  This is not
correct of course: from a theoretical point of view xmodmap and xset
settings are properties of the server as a whole, and from a practical
point of view many systems need to unload and reload drivers during
suspend/resume or hibernate/resume.

This underlying bug is probably also responsible for the race that I
experience on another system, where /etc/X11/Xmodmap_local does not
work: it is run too early and the xmodmap sees no keys at all, and
apparently X finds the keyboard later but by that time the xmodmap is
over and forgotten.  I think I reported this to the BTS but I can't
find the bug number right now.

Thanks,
Ian.



Reply to: