Bug 31436 - Using "clear Lock" in xmodmap causes errors
Summary: Using "clear Lock" in xmodmap causes errors
Status: RESOLVED INVALID
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/Input/Core (show other bugs)
Version: 7.5 (2009.10)
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-07 01:07 UTC by intuited
Modified: 2018-06-12 18:43 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description intuited 2010-11-07 01:07:54 UTC
I'm somewhat expecting to be reprimanded for filing a duplicate bug, since this was noted `downstream`_ back in February.  However, I didn't find anything with my fairly thorough search, so here goes:

Various actions can cause xmodmap to not work.

In my case, the command ``clear Lock`` consistently results in errors like::

    $ xmodmap -e 'clear lock'
    X Error of failed request:  BadValue (integer parameter out of range for operation)
      Major opcode of failed request:  118 (X_SetModifierMapping)
      Value in failed request:  0x17
      Serial number of failed request:  8
      Current serial number in output stream:  8

My current version of xorg is ``7.5+6ubuntu3``; current version of ``x11-xserver-utils``, the package which provides ``xmodmap``, is ``7.5+2ubuntu1``.


.. _downstream: https://bugs.launchpad.net/ubuntu/+source/x11-xserver-utils/+bug/576102
Comment 1 Daniel Stone 2010-11-07 09:03:50 UTC
Hi,

On Sun, Nov 07, 2010 at 01:07:54AM -0700, bugzilla-daemon@freedesktop.org wrote:
> I'm somewhat expecting to be reprimanded for filing a duplicate bug, since this
> was noted `downstream`_ back in February.  However, I didn't find anything with
> my fairly thorough search, so here goes:

Not at all. :) Thanks.

> Various actions can cause xmodmap to not work.
> 
> In my case, the command ``clear Lock`` consistently results in errors like::
> 
>     $ xmodmap -e 'clear lock'
>     X Error of failed request:  BadValue (integer parameter out of range for
> operation)
>       Major opcode of failed request:  118 (X_SetModifierMapping)
>       Value in failed request:  0x17
>       Serial number of failed request:  8
>       Current serial number in output stream:  8

Hmm, works fine for me:
daniels@tempa:~% xmodmap -pm                    
[...]
control     Control_L (0x25),  Control_L (0x42),  Control_R (0x69)
[...]
daniels@tempa:~% xmodmap -e 'clear control'
daniels@tempa:~% xmodmap -pm
control   
daniels@tempa:~% xmodmap -e 'add control = Control_L Control_R'
daniels@tempa:~% xmodmap -pm
control     Control_L (0x25),  Control_L (0x42),  Control_R (0x69)

> My current version of xorg is ``7.5+6ubuntu3``; current version of
> ``x11-xserver-utils``, the package which provides ``xmodmap``, is
> ``7.5+2ubuntu1``.

Hmm, I suspect this is fixed in newer versions; in either case, the
version of xserver-xorg-core is the relevant part.  Are you able to
upgrade to a newer version of Ubuntu to check?
Comment 2 intuited 2010-11-30 06:04:06 UTC
Hmm.  The machine that I was having this issue with is in the shop, so I'm using my "server" as a desktop again.  This machine, it turns out, doesn't display the reported behaviour.  Both boxes are running regularly updated versions of ubuntu 10.10; the broken machine is running 64-bit and the working one is running 32-bit.  I don't believe that any xorg components were updated on either machine since I last tried to do this on the currently broken machine.

Current xorg-xserver-core version on the working machine is shown by aptitude as "2:1.9.0-0ubuntu7".  I think that means the upstream version is 1.9.0, though I don't totally understand aptitude's numbering scheme.  I may be able to provide more info on the broken machine in the future, depending on whether it proves reparable or ends up being replaced.  I'll know more about that in "7-14 business days".
Comment 3 intuited 2010-12-04 16:27:40 UTC
The bug is now happening on my fallback "server" machine.  It started when I enabled keyboard switching.  I did this under xfce, by adding the Keyboard Layouts applet to a panel.  In the dialog that automatically opened, I added Canadian Multilingual as a second keyboard and set "Change layout option" to Alt-CapsLock.

This last was probably a silly move, but anyway it triggered the bug behaviour, or something very similar to it.  I.E. running ``xmodmap -e 'clear Lock'`` will cause the same error message quoted in the original bug report above.  The behaviour persists even after changing the "Change layout option" option to ScrollLock.

I'm not sure what other info would be useful; please let me know if you have some requests/suggestions.
Comment 4 intuited 2010-12-05 10:49:45 UTC
I've discovered that the addition of the Canadian Multilingual keyboard (ca-multix) specifically triggers the bug behaviour.  I.E. If I add it in the properties dialog for xfce's Keyboard Settings applet, I will subsequently be unable to do ``xmodmap -e 'clear Lock'`.  Removing the Canadian Multilingual keyboard as one of the keyboard options will cause that xmodmap command to work again.

The problem does not occur (i.e. xmodmap works correctly) if I instead add the keyboard Canada -> "Multilingual (first part)" (ca-multi).  So this may prove to be a good workaround for myself and perhaps others, and may provide a useful clue to people who can track down this bug.

Also: this issue is `rumoured`_ to be related or identical to `<https://bugs.freedesktop.org/show_bug.cgi?id=20145>`.https://bugs.freedesktop.org/show_bug.cgi?id=20145>`_

.. _rumoured: http://unix.stackexchange.com/questions/4541/diagnosing-xmodmap-errors#comment-5291
Comment 5 Daniel Stone 2010-12-06 07:49:41 UTC
On Sun, Dec 05, 2010 at 10:49:45AM -0800, bugzilla-daemon@freedesktop.org wrote:
> I've discovered that the addition of the Canadian Multilingual keyboard
> (ca-multix) specifically triggers the bug behaviour.  I.E. If I add it in the
> properties dialog for xfce's Keyboard Settings applet, I will subsequently be
> unable to do ``xmodmap -e 'clear Lock'`.  Removing the Canadian Multilingual
> keyboard as one of the keyboard options will cause that xmodmap command to work
> again.
> 
> The problem does not occur (i.e. xmodmap works correctly) if I instead add the
> keyboard Canada -> "Multilingual (first part)" (ca-multi).  So this may prove
> to be a good workaround for myself and perhaps others, and may provide a useful
> clue to people who can track down this bug.
> 
> Also: this issue is `rumoured`_ to be related or identical to
> `<https://bugs.freedesktop.org/show_bug.cgi?id=20145>`.https://bugs.freedesktop.org/show_bug.cgi?id=20145>`_
> 
> ... _rumoured:
> http://unix.stackexchange.com/questions/4541/diagnosing-xmodmap-errors#comment-5291

Nice one, thanks a lot for tracking this down! I'll take a look next
week.
Comment 6 Alan Coopersmith 2011-04-24 14:41:32 UTC
See also bug 35317, for those who find this one searching open bug reports
for mentions of "clear Lock" not working.
Comment 7 Adam Jackson 2018-06-12 18:43:02 UTC
Mass closure: This bug has been untouched for more than six years, and is not obviously still valid. Please file a new report if you continue to experience issues with a current server.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.