how to set numlock on startup

Asked by tadiv

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:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

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

Revision history for this message
tadiv (tadiv-comcast) said :
#2

That did not work...

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

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

Revision history for this message
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"

Revision history for this message
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