Numlock

Mike A. Harris mharris at redhat.com
Tue Sep 16 05:10:17 UTC 2003


On Mon, 15 Sep 2003, Charles Bronson wrote:

>> I think they mean having numlock be on by default at startup. 
>
>I asked this question on the RedHat-List a month ago or so and was told the 
>change would have to come from upstream (i.e. the Gnome developers).
>
>For what it is worth I would like it if the kernel would just recognize what the 
>state the BIOS sets it to at startup then just have Gnome accept that setting.

The kernel is hard coded to disable numlock on startup.  Years
back when this annoyed me as I wanted numlock to default to the
BIOS defined setting as well, I was told on the linux-kernel
mailing list that the kernel defaulted to disabling numlock so
that Linus' laptop came up ready to type, rather than having 
numlock enabled and having to turn it off in order to type.

I don't know if that is the true reason or not, but that's what I 
was told years ago.  Needless to say, it annoyed me, so I patched 
keyboard.c in 2.2.x to force numlock to come on unconditionally, 
which is how I wanted it to be.  That worked great for forcing 
all of the default VCs to have numlock turned on by default, and 
IMHO is a more sane default setting, as the majority of users 
have keyboards with separate cursor keys and numpad, so it makes 
sense IMHO to boot up with both cursor keys AND numbers ready to 
type, rather than 2 sets of cursor and navigation keys by 
default.

IMHO, defaulting to the BIOS default state would be best, and 
second to that defaulting to numlock on.  However, I have no 
faith that the upstream kernel would ever change the current 
default, or it'd have been done years ago by now.  I'm sure every 
possible argument in either direction have all been completely 
exhausted long ago, including my own above.  ;o)

Off the top of my head, I don't recall if XFree86 defaults to 
enabling numlock, disabling numlock, or leaving numlock to the 
default state it was in the tty X was started from.  I'd have to 
doublecheck to be sure.

So, without modifying the kernel and/or X server, you'll have to 
run setleds, or xset for X.  I dunno if the kernel guys are open 
to the idea of patching the kernel to be sane for numlock by 
default or not, but I'd consider doing it for X, especially if 
someone else writes the patch and submits it in bugzilla.  ;o)



-- 
Mike A. Harris     ftp://people.redhat.com/mharris
OS Systems Engineer - XFree86 maintainer - Red Hat





More information about the fedora-test-list mailing list