how to set numlock on startup

Asked by tadiv on 2020-05-17

Friday I upgraded to 20.04 and ever since, on startup (reboot or from cold) the system is defaulting to the number pad not set to numbers so I have to press Num Lock" before I enter numbers - I would lile it to default tothat key selected on startup - how do I fdo that?

Thanks,
Tom

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
tadiv
Solved:
2020-05-20
Last query:
2020-05-20
Last reply:
2020-05-18

Is it not a setting in BIOS?

You can add a startup item to run:

setleds -D -num

If you make a /etc/rc.local then it'll run at boot. Remember to add:

exit 0

As the last line and mark as executable. I believe Ubuntu still honours this file even if it isn't present by default

tadiv (tadiv-comcast) said : #2

That did not work...

If you run the command with the numlock off, does it turn on....?

tadiv (tadiv-comcast) said : #4

No - it complains "setleds: Error reading current flags setting. Maybe you are not on the console?: ioctl KDGKBLED: Inappropriate ioctl for device"

tadiv (tadiv-comcast) said : #5

Thanks to this video:

https://www.youtube.com/watch?v=IycAYQ-ieSk

I installed numlockx

sudo apt install numlockx

then setup a startrup application with "numlockx on" as the command