Bug 726698

Summary: Num Lock not preserved during boot
Product: [openSUSE] openSUSE 12.1 Reporter: Bryan Webb <howard.bryan.webb>
Component: KernelAssignee: E-mail List <kernel-maintainers>
Status: RESOLVED DUPLICATE QA Contact: E-mail List <qa-bugs>
Severity: Major    
Priority: P5 - None CC: fcrozat, gruber, pswzyu
Version: RC 1   
Target Milestone: ---   
Hardware: i686   
OS: SUSE Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Bryan Webb 2011-10-26 18:44:28 UTC
User-Agent:       Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20100101 Firefox/7.0.1

I've got a dual boot system (same 32bit hardware):  OpenSuse 11.4, and OpenSuse 12.1 RC1.

I've got my BIOS set to assert/enable NumLock upon boot.

I configure my systems to come up in Run Level 3, then run startx manually.

On 11.4, the keyboard NumLock is ON when the login prompt is displayed.
On 12.1RC1, the NumLock is OFF when the login prompt is displayed.

My password has some num chars, I'd rather fix Suse than retrain my "muscle memory" depending on which version of suse I'm booting.

Reproducible: Always

Steps to Reproduce:
1. Boot system in Run Level 3
2. At the login prompt, observe the state of the keyboard NumLock indicator
3.
Actual Results:  
On 12.1 RC1, keyboard NumLock is not asserted/enabled/lit

Expected Results:  
I expect 12.1 to behave the same as 11.4 did with regard to keyboard NumLock upon boot, i.e. at the login prompt it should be asserted/enabled/lit (as I believe it was when grub took over from the BIOS).
Comment 1 Frederic Crozat 2011-10-27 09:50:25 UTC
systemd-vconsole-setup doesn't support restoring numlock (mostly because by default, kernel should restore bios state and we shouldn't workaround it using hwinfo).

some display manager are correctly restoring previous numlock value (gdm for instance).

try to add
touch /var/run/numlock-on in /etc/init.d/boot.local, it should cause X11 script to force numlock to on
Comment 2 Bryan Webb 2011-10-31 23:43:21 UTC
I did try your X11 script parameter tweak on RC1, but I regret to say that it does not solve our problem, because:

The sequence during a Run Level 3 boot is:
1) Boot system
2) System presents user with Logon prompt.
   a) note that X11 script will not have yet been executed
   b) user name and/or especially password will have numeric chars
   c) Num Lock is not enabled (as it was in the past)
3) User successfully logs in  <<< auto Num Lock needed at this point >>>
4) User (eventually) does startx
   a) startx detects /var/run/numlock-on, sets Num Lock
5) X GUI available to user with Num Lock now asserted

I have a couple of questions...

1) Which special piece of software enabled Num Lock in 11.4 that is not doing it now?

2) If the kernel should be preserving/restoring Num Lock, is it a build option that is no longer being done?  (I presume not, just asking)

3) If the kernel should be preserving/restoring Num Lock, does the Torvalds' kernel group acknowledge that this is their responsibility, and should the bug be transferred to them?
Comment 3 Frederic Crozat 2011-11-02 13:41:34 UTC
1/ /etc/init.d/kbd is no longer used when running under systemd
2 - 3/ I guess a bug report should be opened against upstream kernel.
Comment 4 yu zhang 2012-01-03 01:35:18 UTC
This bug effects me~
I set num lock on in yast and see it is really changed to KBD_NUMLOCK="yes" 
in /etc/sysconfig/keyboard 
I've set my bios to force numlock to be turned on on boot, but as the linux kernel starts, the light was off
Comment 5 yu zhang 2012-01-03 01:36:16 UTC
I'm using 12.1 final
Comment 6 Frederic Crozat 2012-01-03 13:08:06 UTC
kernel need to be fixed to not reset numlock value at startup (so we don't try to look at what value it was in the BIOS using hwinfo and ugly memory access.
Comment 7 Jeff Mahoney 2012-03-25 04:26:13 UTC
Duplicate of bnc#746595

*** This bug has been marked as a duplicate of bug 746595 ***