Linux question-numlock

submitted by

I switched to Linux a during the year of the Linux desktop (tm) and it’s been great but I have one small issue maybe someone knows how to fix.

I have tried 4 different distros so far (currently using bazzite and kachy on two different machines) and they all do this: every time the computer restarts, numlock turns off by default. I use keyboards with a numpad and the numpads do nothing it seems unless I hit numlock first. This is compared to every windows or apple machine used previously where numlock is pressed once after buying the computer then never needs to be again.

Is this the most minor inconvenience ever? Quite possibly. But I still find myself trying to enter numbers often and being frustrated I don’t notice right away. Probably doesn’t help I have a bunch of them in my unlock password after every restart.

Tl:dr; how to get numlock to activate on startup

15
41

Comments are disabled.

15 Comments

Most DEs have their own specific way to do this, so the exact solution will vary.

That said, if you’re looking for a general solution, there’s good odds your computer has a BIOS setting that can be used to set the initial numlock state, and that will work no matter what DE you use. If that’s an option for you, that would be my first choice.

 
31

+1 for the BIOS setting. Very common.

 
10


Try reading this: https://wiki.archlinux.org/title/Activating_numlock_on_bootup

Look at the relevant section depending on your desktop environment

 
22

Best documentation out there generally, no matter the distro.

 
13

How do I find out what desktop environment?

 
0

A simple way, you can take a look

echo "$XDG_CURRENT_DESKTOP"

in the terminal.

Let’s do it faster, to check what is running inside the seat.

Here is a one-liner, just run it in your terminal:

desktop="${XDG_CURRENT_DESKTOP:-${XDG_SESSION_DESKTOP:-}}"; session_type="${XDG_SESSION_TYPE:-}"; info="" session=""; if command -v loginctl >/dev/null 2>&1; then session="${XDG_SESSION_ID:-self}"; info=$(loginctl show-session "$session" -p Desktop -p Type 2>/dev/null) || info=""; if [[ -z "$desktop" ]]; then desktop=$(sed -n 's/^Desktop=//p' <<< "$info"); fi; if [[ -z "$session_type" ]]; then session_type=$(sed -n 's/^Type=//p' <<< "$info"); fi; fi; printf 'DE=%s\n' "${desktop:-unknown}"; printf 'TYPE=%s\n' "${session_type:-unknown}"

It will show something like

DE=KDE
TYPE=wayland
 
5




Settings> keyboard> num lock status

 
10

Yeah, Bazzite and CachyOS use the KDE Plasma desktop environment by default, so this should be the easiest way. Here’s an explainer I found online:

https://itsfoss.com/newsletter/foss-weekly-26-05/#%F0%9F%92%A1-quick-handy-tip

 
5


Isn’t this a bios setting? I always did it that way, even on windows machines.

 
7

Locking for rule 5.

 
2

The trick is to get a keyboard that doesn’t have a numpad, and then you don’t need to worry about it anymore.

 
-7

or, you can just cancel your internet service and then you won’t have to answer to posts you don’t like.

 
7


Insert image

These files are not very private - peachpie.theatl.social admins may review them occasionally.