geekhack

geekhack Community => Keyboards => Topic started by: ozar on Sat, 14 February 2009, 18:12:51

Title: NumLock light On/Off
Post by: ozar on Sat, 14 February 2009, 18:12:51
Do any of you know why the NumLock light remains ON after full system boot (running Linux) with some keyboards such as the Das and the ABS M1, but with other keyboards like the IBM Model M, Customizer, and Scorpius M10 it goes OFF?

In addition, is there any easy way to change this behavior so that they all act the same?
Title: NumLock light On/Off
Post by: tad on Sat, 14 February 2009, 18:29:00
Not sure; perhaps the controllers used in the Das, etc. are programmed to start up in Numlock mode, while others just fully reset on poweroff. You can fix this with a little utility called numlockx, probably available in your package manager. Just add numlockx & to your .xinitrc, or if you're using Gnome, add it to your startup session. KDE 3.5 has this functionality built in, not sure where it is or if KDE 4 has it.
Title: NumLock light On/Off
Post by: ozar on Sat, 14 February 2009, 18:44:06
Thanks, tad... I found the numlockx package in my repo, but after looking at it, this appears to be more for always turning the light ON, whereas I'd really prefer to have it always OFF after system boot with all keyboards.

I'll play with it some to see if it will work both ways.

Thanks again!
Title: NumLock light On/Off
Post by: Eclairz on Sat, 14 February 2009, 21:56:03
Go into your system bios and change the setting to num lock off at boot up. Many of the motherboards i've used often have this feature so im sure your's was switched on
Title: NumLock light On/Off
Post by: ozar on Sat, 14 February 2009, 22:08:12
Quote from: Eclairz;21759
Go into your system bios and change the setting to num lock off at boot up. Many of the motherboards i've used often have this feature so im sure your's was switched on

No, I've checked my BIOS for that on several occasions before, but it doesn't offer an option to enable/disable number lock.

Thanks for the reply, though.
Title: NumLock light On/Off
Post by: cheater1034 on Sun, 15 February 2009, 00:19:13
Try adding this to local or an init script or something:
(somewhat taken from gentoo's baselayout-1 numlock script)
Code: [Select]
off_numlock() {
        local dev
                [[ -d /dev/vc ]] \
                && dev=/dev/vc/ \
                || dev=/dev/tty
        for tty in $(seq 1 "63") ; do
                setleds -D -num < ${dev}${tty}
        done
}
off_numlock

I believe this will be ineffective while X is running, but if you run it in the console or as an init script/in local start it should work

Likewise, +num would enable it