Bug 385141 - Numlock always enabled on login
Summary: Numlock always enabled on login
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: xorg-x11-drv-keyboard
Version: 10
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Peter Hutterer
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-11-15 18:06 UTC by David Cantrell
Modified: 2018-04-11 11:01 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-01-15 07:10:45 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
xorg log as requested earlier (78.90 KB, text/plain)
2008-10-16 19:03 UTC, Luis Villa
no flags Details
out.xkb as requested (49.57 KB, text/plain)
2008-10-23 04:48 UTC, Luis Villa
no flags Details

Description David Cantrell 2007-11-15 18:06:11 UTC
Happens in rawhide and in F-8.  I have a Thinkpad T42.

On login, numlock becomes enabled _somehow_.  The LED turns on.  You can disable
numlock by pressing Shift+NumLk/ScrLk on the keyboard.  The functionality will
be disabled, but the LED is still enabled.

The system runs fine otherwise.  Numlock becomes re-enabled at different points,
most notably when the screen saver starts.

Comment 1 Luis Villa 2008-04-23 13:57:47 UTC
This is happening to me too all of the sudden- never seen it before yesterday,
now it is happening randomly, including after resuming from suspend.

Note also that the numlock light on the machine no longer seems to bear any
relationship to whether or not numlock is on.

[This is with latest F8 including updates-testing; Thinkpad X41 tablet.]

Comment 2 Bug Zapper 2008-05-14 03:54:41 UTC
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 3 Peter Hutterer 2008-07-21 02:44:49 UTC
Is this still an issue? the keyboard driver has seem some changes regarding this
upstream and it should have trickled down by now.

If so, can you please provide an Xorg log so I can have a look at what driver
you're using. Thx.

Comment 4 Matěj Cepl 2008-09-07 19:41:07 UTC
Reporter, could you please reply to the previous question? If you won't reply in one month, I will have to close this bug as INSUFFICIENT_DATA. Thank you.

Comment 5 Luis Villa 2008-09-08 13:29:15 UTC
Not happening here any more, as far as I can tell. Fine by me if it is closed.

Comment 6 Matěj Cepl 2008-09-08 14:15:42 UTC
Thanks for letting us know.

Comment 7 Luis Villa 2008-10-16 19:01:30 UTC
I guess I can't reopen, but I'm seeing just this again.

* numlock light no longer reflects state of numlock key
* numlock turned on after every reboot or return from sleep/hibernate.

Will attach xorg.log.

Comment 8 Luis Villa 2008-10-16 19:03:46 UTC
Created attachment 320595 [details]
xorg log as requested earlier

Please reopen the bug. :)

Comment 9 Matěj Cepl 2008-10-16 23:57:35 UTC
I love reopening bugs ;-). Grrr.

Comment 10 Peter Hutterer 2008-10-22 03:37:57 UTC
hmm, no success in reproducing this issue, neither with F9 nor F10. down to guesswork.

can you toggle the numlock light at all? 
please attach the xev output when toggling numlock, the output of setxkbmap -print and the out.xkb file after running xkbcomp -xkb :0 out.xkb

does the numlock (and the led) change state when VT switching?

is there a BIOS option to turn numlock on at start?

can you create a test user and log in as test user. is the issue still present then? (this is to make sure there aren't any stale settings)

Comment 11 Luis Villa 2008-10-23 04:47:44 UTC
/can you toggle the numlock light at all?/

No. At least, not in any obvious way.

/is there a BIOS option to turn numlock on at start?/

I don't think so.

/does the numlock (and the led) change state when VT switching?/
Numlock and the LED appear to work correctly when in a VT instead of in X. If I turn the LED off in the VT, when I return to X the LED stays off, and then I can't turn it back on (unless I go back to a VT.)

/can you create a test user and log in as test user. is the issue still present
then? (this is to make sure there aren't any stale settings)/

I can check that later, but I doubt it, as this worked, then broke, then work, then re-broke, with no relevant changes of user setting- just upgrades of packages. Like I said I'll check, though.

/xev/

KeyPress event, serial 30, synthetic NO, window 0x3c00001,
    root 0x89, subw 0x0, time 574561506, (172,-10), root:(176,13),
    state 0x0, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 30, synthetic NO, window 0x3c00001,
    root 0x89, subw 0x0, time 574566188, (172,-10), root:(176,13),
    state 0x1, keycode 77 (keysym 0xfef9, Pointer_EnableKeys), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 30, synthetic NO, window 0x3c00001,
    root 0x89, subw 0x0, time 574566306, (172,-10), root:(176,13),
    state 0x1, keycode 77 (keysym 0xfef9, Pointer_EnableKeys), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

PropertyNotify event, serial 30, synthetic NO, window 0x3c00001,
    atom 0x183 (XKLAVIER_STATE), time 574566308, state PropertyNewValue

KeyRelease event, serial 30, synthetic NO, window 0x3c00001,
    root 0x89, subw 0x0, time 574566738, (172,-10), root:(176,13),
    state 0x1, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

[louie@towel ~]$ setxkbmap -print
xkb_keymap {
	xkb_keycodes  { include "xfree86+aliases(qwerty)"	};
	xkb_types     { include "complete"	};
	xkb_compat    { include "complete"	};
	xkb_symbols   { include "pc+us+inet+inet(pc105)"	};
	xkb_geometry  { include "pc(pc105)"	};
};

Comment 12 Luis Villa 2008-10-23 04:48:57 UTC
Created attachment 321241 [details]
out.xkb as requested

Note that numlock (and LED) were off (via the VT) when I got this file.

Comment 13 Peter Hutterer 2008-10-23 05:14:34 UTC
Oh, I think I got it. Please run "setxkbmap -model ibm_spacesaver" and try again.

(In reply to comment #11)
> KeyPress event, serial 30, synthetic NO, window 0x3c00001,
>     root 0x89, subw 0x0, time 574566188, (172,-10), root:(176,13),
>     state 0x1, keycode 77 (keysym 0xfef9, Pointer_EnableKeys), same_screen YES,
>     XLookupString gives 0 bytes: 
>     XmbLookupString gives 0 bytes: 
>     XFilterEvent returns: False

You should be getting Num_Lock here, not Pointer_EnableKeys. However, with the T42 keyboard, you have to hit shift + numlock which never sends the Num_Lock keysym. This is due to numlock being on the same phys. key as ScrollLock. This should be avoidable by using Fn instead of Shift for numlock or setting the model to ibm_spacesaver.

Comment 14 Luis Villa 2008-10-23 05:19:33 UTC
Hrm. That setxkbmap invocation doesn't seem to make it work here, nor does using Fn instead of shift. I should probably try it with a clean reboot.

[Note that this is F9, not rawhide, if that matters.]

Comment 15 Peter Hutterer 2008-10-23 05:26:14 UTC
Run xkbcomp :0, then edit the newly created server-0.xkb and replace the line 

    key <NMLK> {         [        Num_Lock, Pointer_EnableKeys ] };
with
    key <NMLK> {         [        Num_Lock, Num_Lock ] };

then load the file with xkbcomp server-0.xkb :0
if you run xkbcomp :0 again, the server-0.xkb should now be just as you edited it (this is for verification)
If it doesn't work, please attach the xev output again.

Comment 16 Luis Villa 2008-10-23 05:43:00 UTC
(In reply to comment #15)
> then load the file with xkbcomp server-0.xkb :0

At this point X segfaults. ;) 

Alternative suggestions to test/fix the numlock problem, and/or how to get decent debug information on the segfault?

Comment 17 Peter Hutterer 2008-10-23 06:15:34 UTC
wow. impressive, but that wasn't quite part of the plan. Could you open another bug please with the backtrace if you get one. If you're running a display manager, the backtrace should be in /var/log/Xorg.0.log.old

Ideally you could install the debuginfo packages and attach gdb (over ssh from a second machine) to get a detailed backtrace.

btw, what's your xserver and xkeyboard-config versions? I got 1.5.0-3 and 1.3.1, respectively.
Can you select the space saver keyboard through gnome-keyboard-properties (under IBM in the model selector)?

Comment 18 Luis Villa 2008-10-26 02:46:39 UTC
I'll try to gdb and file another bug some time this week.

xserver I get 1.5.0-2 and xkeyboard-config 1.2-4. (Checking koji both appear to be the latest available for FC9.)

g-k-p does not show a space saver option under IBM; I'm using Generic 105-key (Intl) PC with US+inet layout, which I think was recommended many moons ago in another bug to resolve volume control problems (which have also cropped up again, but that is another bug; bug 321421 IIRC.)

Comment 19 Matěj Cepl 2008-11-24 09:25:30 UTC
(In reply to comment #18)
> I'll try to gdb and file another bug some time this week.

ping

Comment 20 Matěj Cepl 2008-11-24 09:26:20 UTC
sorry, wrong victim of my NEEDINFO.

Comment 21 Luis Villa 2008-12-01 02:52:59 UTC
Note that I'm seeing this in F10 as well.

Comment 22 Peter Hutterer 2008-12-03 03:37:33 UTC
actually, there's gnome setting that might be at fault there:

- In gconf-editor, un-check 
/desktop/gnome/peripherals/keyboard/host-HOSTNAME/0/numlock_on. This 
disables numlock.
- In gconf-editor, un-check 
/desktop/gnome/peripherals/keyboard/remember_numlock_state. With this 
setting, gnome remembers the numlock state from the last session. 
Without, numlock is always off when starting.

You said numlock was on - is this before or after login? Or has F10 changed the behaviour of the numlock light completely anyway?
I'm not 100% sure anymore on the exact symptoms now, they seem to have changed a few times.

Comment 23 Sam Tygier 2009-01-12 10:25:57 UTC
i am also seeing this on F10 since last week on a thinkpad x31.

at boot or after resuming from suspend numlock gets switched on (so some letter keys become numbers).

i shall try some of the remedies mentioned.

Comment 24 Peter Hutterer 2009-01-12 22:01:29 UTC
setting the needinfo flag, Sam, Luis, if you could try the gnome settings that'd be much appreciated.

Comment 25 Sam Tygier 2009-01-14 20:05:20 UTC
the gconf settings do the job. the keyboard layout seems to have no effect on the problem.

thanks

Comment 26 Peter Hutterer 2009-01-15 07:10:45 UTC
closing this as NOTABUG, this is a configuration issue.


Note You need to log in before you can comment on or make changes to this bug.