protonscr

Steam disables numlock when “setleds -D +num” is used

steamclosed not reproducibleWindow managerDistro Family: Arch
ValveSoftware/steam-for-linux#6977 · opened 2020-03-22 by shoober420 · updated 2020-03-29 · 8 comments · github
Sshoober420 2020-03-22 github

Your system information

  • Steam client version (build number or date): Mar 20 2020, at 18:25:30
  • Distribution (e.g. Ubuntu): Arch
  • Opted into Steam client beta?: [Yes/No] Yes
  • Have you checked for system updates?: [Yes/No] Yes

https://gist.github.com/shoober420/1215c40214cf70e1fabb760b5bd2a341

Numlock key gets disabled when launching Steam. When closing Steam, enabling numlock key, and launching Steam again, it stays on.

Steps for reproducing this issue:

  1. Enable numlock key at boot using “setleds -D +num”
  2. Launch Steam
  3. Numlock gets disabled
Kkisak-valve maintainer 2020-03-22 github

Hello @shoober420, this doesn't read like a Steam issue and I was unable to reproduce this behavior on my Arch test box with KDE 5.18.3 and the 2020-03-20 Steam client beta.

Kkisak-valve maintainer 2020-03-22 github

Right, report this issue to your distribution, it reads like the initial state of the numlock key is out of sync between the hardware and the OS.

Sshoober420 2020-03-22 github

Most distros depend on some form of “setleds -D +num” to activate the numlock key on boot. Whether it be the “systemd-numlockontty” package for Arch, or simply adding “setleds -D +num” to “.xinitrc” like I did.

Note:
Having no scripts or packages installed for numlock activation, and enabling the numlock key manually by hitting it on the keyboard does not reproduce the bug.

Systemd disables numlock at boot if you haven’t noticed.

To reproduce the bug, you have to enable numlock at boot using “setleds -D +num” in a startup script somewhere (“.xinitrc” or “.zshrc”).

Some desktop environments and login managers enable the numlock key using the “setleds -D +num” method as well.

Sshoober420 2020-03-22 github

Regardless, Steam should still have no effect on the numlock key, no matter how the user, Distro, or software chooses to enable numlock. Whether it be via scripts or packages, Steam should not disable numlock.

Sshoober420 2020-03-25 github

@kisak-valve
Have you tried testing this again by chance with all the new info I discovered?

Kkisak-valve maintainer 2020-03-25 github

Hello @shoober420, my previous assessment stands. This isn't a Steam issue.

Sshoober420 2020-03-26 github

For what its worth, I tried various methods listed on the Arch wiki, to enable numlock on boot. I'm going to list the methods I tested and show which ones Steam does not respect.

https://wiki.archlinux.org/index.php/Activating_numlock_on_bootup

Steam disables numlock:

systemd-numlockontty package
getty service (my personal choice)
bash alternative
Steam keeps numlock enabled:

numlockx package
manually enabling numlock by key press before launching Steam

These five methods are the ones I've personally tested, and only the method that truly worked was using the "numlockx" package.

Sshoober420 2020-03-29 github

Some things I thought I should share in case anyone comes across this themselfs and is curious about the numlock key.

It appears that using the “setleds -D +num” method is mainly for activating the numlock at boot in the tty terminals.

Now “numlockx” is specifically made to activate numlock via X.Org Server. I believe that not only does systemd disable numlock at boot by default, X.Org Server also disables numlock by default when launched.

So one will need to use “numlockx” so that the numlock key is truly enabled in X.Org Server.

Nothing extracted yet.