21

Is there a special reason why NUMLOCK is disabled/turned off by default?

It feels like (when searching the internet) most users (including me) wants to enable it by default.

Maythux
  • 82,867
  • 54
  • 239
  • 271
Ben
  • 752
  • 1
  • 10
  • 29
  • 1
    are you looking for a reason or do you want to enable it on log-on? – Ron May 07 '15 at 07:31
  • It is a bios setting on my machine ;-) – Rinzwind May 07 '15 at 07:56
  • i just want a good **reason**. i found out how to enable..but many people were asking how to enable...so i don't understand why it is disabled. – Ben May 07 '15 at 08:00
  • @rinzwind: this is also **activated** in my bios. but after KDE/LXDE starts, it is turned off. – Ben May 07 '15 at 08:05
  • Maybe just not to light the LED ... Indeed it sounds reasonable to have everything that lights a LED default to the off state – Hagen von Eitzen May 07 '15 at 10:47
  • In KDE you can change this in the keyboard settings. LXDE is a bunch of text files and some GUIs on top, and I haven't explored any recent versions so I can't help there. You can, however, set KDE up so it turns it on on login. – JimmyC866 May 12 '15 at 21:36
  • 1
    It may not be the answer, but a curious related thing: once I read an article by a college professor talking about ecology and how much energy it would save if all keyboards in the world didn't have the leds on by default... – Ricardo Mar 30 '17 at 18:15

1 Answers1

21

To enable it do those commands (install package called numlockx)

sudo apt-get update
sudo apt-get -y install numlockx
sudo sed -i 's|^exit 0.*$|# Numlock enable\n[ -x /usr/bin/numlockx ] \&\& /usr/bin/numlockx on\n\nexit 0|' '/etc/rc.local'

check this community wiki https://help.ubuntu.com/community/NumLock for more information

Why numlock is disabled by default?

I think because of some laptops and netbooks keyboards require numlock to be disabled to function all keys.

For example look at this laptop keyboard, When enabled, NumLock lets you use the 7-8-9, u-i-o, j-k-l and m keys as a numeric keypad.

enter image description here

Maythux
  • 82,867
  • 54
  • 239
  • 271
  • i think it is possible to identify/detect the keyboard-layout (number of keys). based on this, the default could be changed. (see Windows) – Ben May 07 '15 at 08:08
  • sure it's possible but i think this is case why numlock is disabled by default – Maythux May 07 '15 at 08:10
  • 7
    Further: Why is Ubuntu not using BIOS Setting as default? – Ben May 07 '15 at 08:24
  • 2
    @NewUSer can you fix the `sed` command (last line in the answer above)? It looks truncated (e.g. single quote not closed). Thanks. – arielf May 08 '15 at 18:49
  • 2
    Although you can determine the type of keyboard, bear in mind that people often add a second USB keyboard. In those cases, there is no way for the system to predict which keyboard the user will use. I have seen just this problem with someone who was using a Windows computer and two keyboards; he would have been fine with Ubuntu. – Paddy Landau May 12 '15 at 06:39
  • @PaddyLandau Good point – Maythux May 12 '15 at 06:40
  • @PaddyLandau: That would be another reason, why NUMLOCK should be turned on by default (when not using BIOS default), because the 2nd Keyboard will likely have a NUMPAD.especially in case of notebooks. – Ben May 12 '15 at 22:34
  • @Ben, that is an assumption. Not all second keyboards have such a pad; indeed, I have a neighbour whose second keyboard is just so because she needs it to be small. Turning on the Numlock by default would be confusing, frustrating and obstructive, just as happened to my friend with the Windows computer that made the same assumption. – Paddy Landau May 13 '15 at 07:51