19

How do I make my system keep the numlock turned on at startup?

I am puzzled by this defect, and I want to solve this without having to install an external program as I am convinced that there is a setting somewhere.

So, how can I make my system keep numlock on at boot?

terdon
  • 100,812
Ballie
  • 461
  • 4
    Hi Ballie, thanks for your post, and welcome to the site! If you think you have something valuable to share, you can ask a question and answer it yourself. That way, we keep the Q and A format, which is better for clarity. – Jacob Vlijm Jul 10 '16 at 08:42
  • 3
    I removed the answer to make your question into an actual question. Please post your answer below. – terdon Jul 10 '16 at 09:06

4 Answers4

19

I too was puzzeled by this dilemma. I searched hard and long to find a solution that doesn't require numlockx, as I was convinced it must be a setting in a '.conf' file. Guess what... I found it!

To keep numlock turned on at startup you need to edit the following file:

/etc/sddm.conf

Find the label general and add the following

Numlock=on

Now save your file and reboot. It's as simple as that.

In my case I had already turned on numlock in my BIOS, so I don't know if this works with numlock turned off in your BIOS. I haven't tested that. However, I assume that if you're looking to keep numlock turned on at boot time, you've probably already turned that on.

amc
  • 7,142
Ballie
  • 461
  • 3
    This answer could be improved by explaining what sddm.conf is a configuration file for. In particular, it leaves me wondering whether this answer only applies to a particular WM such as Gnome. –  Jul 10 '16 at 18:24
  • Will this work even before you login? As in for entering your password? – Fiksdal Jul 10 '16 at 19:51
  • @BenCrowell: Any file with the .conf extention is a configuration file. sddm is a configurationfile. In this case for the Simple Desktop Display Manager (SDDM). This is a graphical login program for X11. So in this .conf file you set the behaviour at the login screen. – Ballie Jul 10 '16 at 22:07
  • @Fiksdal: My answer to Ben Crowel should hold the answer to your question. – Ballie Jul 10 '16 at 22:10
  • @Ballie So yes? – Fiksdal Jul 10 '16 at 22:15
  • And if this file doesn't exist? – br3nt Jul 11 '16 at 01:35
  • @br3nt: I would try to create the file myself. See if it works. If it doesn't? Delete it again. If you want I can sent you the contents of this file. In my case it's completely standard except for the Numlock part. – Ballie Jul 11 '16 at 18:47
  • @Fiksdal: In my case? Absolutely... – Ballie Jul 11 '16 at 18:47
  • @Ballie Great. This is useful. – Fiksdal Jul 11 '16 at 18:52
6

The only solution I know of requires the numlockx package. To install it, open a terminal (Alt-Ctrl-T) and type the following lines:

sudo apt update
sudo apt install numlockx

Then edit your Startup Applications and add a new entry. The command for the new entry should be numlockx on.

That's it! If you find a solution that doesn't require the numlcokx package, I'd love to hear about it.

(See also: https://wiki.archlinux.org/index.php/Activating_Numlock_on_Bootup )

  • See "and I want to solve this without having to install an external program " – Jacob Vlijm Jul 10 '16 at 09:14
  • 2
    @JacobVlijm I saw that... hence my disclaimer "The only solution I know of requires the numlockx package." I thought it was better to answer the question to the best of my ability than not to answer at all. On this site, is it preferred that I stay silent if my (working) answer cannot meet every requirement, or is it encouraged to post working answers that work even if they don't meet the original requirements 100%? (I thought that's what voting was for, to sort out the best answers from among many) – Nick Weinberg Jul 10 '16 at 09:17
  • Hi Nick, look into the history of the question, OP had the answer, but posted an "all in one" post. terdon removed the A part to give OP the opportunity to post it as an answer. – Jacob Vlijm Jul 10 '16 at 09:19
  • 3
    I saw the history and that's fine, but the OP is not the only person who might find my answer useful. I find it weird that we're even discussing this; I thought the point of a community Q&A site was to freely contribute questions and answers – Nick Weinberg Jul 10 '16 at 09:20
  • ? You shouldn't take is as an offense, was just checking if you noticed. – Jacob Vlijm Jul 10 '16 at 11:50
  • Yes, I noticed, and decided to contribute my alternate solution anyway in case it could be helpful to someone. Thank you for your concern! – Nick Weinberg Jul 12 '16 at 19:15
  • Then edit your Startup Applications

    Where? In which app?

    – Dogweather Dec 27 '18 at 00:55
0

in ubuntu 18.04 you can

sudo apt install gnome-tweaks

(assuming this are names of menu items in english (added germans in brackets))

'keyboard and mouse' (Tastatur und Maus) /
'additional options' (Zusätzliche Belegungsoptionen) /
x 'various options for compatibility' (Verschiedene Optionen zur Kompatibilität) /
set this checkbox:
O 'Numlock On: Numbers; shift changes to arrows'

gnome tweak installed allows a lot more to "tweak" on the system

0

Simple GUI point and click solution here: This is the case with Cinnamon and I'm pretty sure any Ubuntu flavor.

Go to SYSTEM SETTINGS -> KEYBOARD LAYOUT -> click on the OPTIONS button on the bottom right corner -> look for "misc. compatibility options" and click "default numeric keypad keys" and "numeric keypad keys always enter digits".

At this point you may need to restart your system for it to take full effect and will continue working from then on.

I do not recommend installing numlockx or any other third party extension if you do not need it as this creates additional dependencies and can introduce bugs or security risks.

  • I know about this option, but it doesn't keep numlock on at startup. This option is only activated after first logon. – Ballie Jul 13 '16 at 03:27
  • hmm once I set it my keypad always types numbers. it is a bit odd that i notice that the num lock light is not on but that is ok because the numeric keypad is doing what i want it to do. why anyone would ever want those to be arrows when we also have arrow keys is beyond me and frustrating. – flyingdrifter Jul 15 '16 at 04:02
  • Even after rebooting your PC? Because in my case your option only worked after being logged in, and untill I shutdown my PC. After (re)booting my numlock was turned off again. Not just the led. Numebers were not accepted through the num pad... With the adjustment of sddm.conf everything works just as it should... – Ballie Jul 16 '16 at 15:12
  • @flyingdrifter that num lock light issue is a bug as mentioned in an answer to this post . Please feel free to notify that you too are affected and subscribe to it as it's still unresolved. – Elder Geek Apr 21 '17 at 21:29