This has been bugging me for a while is there a way to set Num Lock to on when logging in?
I looked in System Settings->Login Screen (SDDM) I can’t find an option for the Num Lock.
When ever I log out the Num Lock is set to off even if the keyboard led display is on the number keys don’t work until I hit the Num Lock button
Can somebody else confirm this?
It’s not exposed in the GUI, you have to configure it in /etc/sddm.conf directly.
See “man sddm.conf”.
Or /etc/sysconfig/keyboard, that’s independent of SDDM (and can also be set via YaST->System->System Keyboard Layout).
When ever I log out the Num Lock is set to off even if the keyboard led display is on the number keys don’t work until I hit the Num Lock button
Can somebody else confirm this?
Works fine here, I’m still on 13.2 though.
On one system with an USB keyboard I had to set KBD_NUMLOCK to “yes” though, “bios” does not work at all there. (Actually the BIOS doesn’t even manage to turn it on for the grub menu, so it’s rather a BIOS or keyboard issue…).
Likely not your problem though if it only happens when you logout.
Explicitly telling SDDM to turn it on may indeed help in that case. (or not, as the xorg startup scripts actually do that according to the /etc/sysconfig/keyboard setting when the login screen is restarted, I think, but maybe SDDM does it differently…)
this does not work I do believe it’s an sddm bug or feature?
in Yast I set num lock to always on, when I try to relogon the num lock led is on but sddm doesn’t accept input from the num pad until I re-press the Num Lock key
I modified the code in /etc/sddm.conf as below:
General]
HaltCommand=
RebootCommand=
Numlock=on
I switched off Numlock and logged off. Once you log-out and log-in screen appears, Numlock sets on automatically. After logging in also, Numlock is ON.
if number lock is required to be on within a terminal,
in the terminal use the cmd to set it permanently
setleds -D +num
this sets and remembers the number lock status
to permanently switch it off again use cmd
setleds -D -num
to see the status use the cmd
setleds
JFI
This is my current sddm.conf
[Autologin]
Relogin=false
Session=plasma5.desktop
User=
[General]
HaltCommand=
RebootCommand=
[Theme]
Current=breeze-openSUSE
CursorTheme=Breeze_Snow
[Users]
MaximumUid=65000
MinimumUid=1000
[XDisplay]
DisplayCommand=/etc/X11/xdm/Xsetup
MinimumVT=7
ServerPath=/usr/bin/X
SessionCommand=/etc/X11/xdm/Xsession
I’ll add Numlock=on to it and see if it helps
sddm is not a terminal app, and the Num Lock key led is on yet the keypad can’t be used which causes confusion
as far as I remember this didn’t happen on 42.1 which also used sddm I noticed this behavior with 42.2 it might be sddm.conf related that file might have changed in sle 12sp1 upstream
edit
adding [FONT=monospace] Numlock=on to sddm.conf did the trick my sddm.conf now reads
[Autologin]
Relogin=false
Session=plasma5.desktop
User=
[General]
HaltCommand=
RebootCommand=
**[FONT=monospace][FONT=monospace]Numlock=on[/FONT]**
[Theme]
Current=breeze-openSUSE
CursorTheme=Breeze_Snow
[Users]
MaximumUid=65000
MinimumUid=1000
[XDisplay]
DisplayCommand=/etc/X11/xdm/Xsetup
MinimumVT=7
ServerPath=/usr/bin/X
SessionCommand=/etc/X11/xdm/Xsession
[/FONT] [/FONT]and I don’t have to re-hit the num lock to make sure I enter my password properly
@linlen tanks
No, there hasn’t been any change in sddm or the default sddm.conf.
The default sddm.conf does not (and never did) contain the NumLock option, in which case sddm doesn’t touch the numlock state at all.
So apparently the system service that should set the numlock state does not work for you. (actually this is done by systemd for the text mode consoles and an xinit script for X).
There is another thread about problems with this:
https://forums.opensuse.org/showthread.php/521540-Strange-problem-with-etc-sysconfig-editor-kdb
PS, for completeness, because I wrote it works fine here:
It does work fine here (with 13.2) for the login screen, but not in text mode.
In text mode I see a similar behavior than what you described, i.e. the numlock led is on, but numlock is actually off.
And IIRC this was also the case in previous versions, 13.1 at least, but I cannot remember since when that’s broken…
Same here on a 13.2 system – BIOS set to NumLock ON:
KDE4 Plasma mostly as needed (NumLock On) but, the LED tends to flip off and then on when changing login sessions;
In a VT session, initially wrong (NumLock Off) and the Numeric Pad keys do not type numbers (NumLock “off” behaviour), despite the NumLock LED being on:
Current default flags: NumLock off CapsLock off ScrollLock off
Current flags: NumLock off CapsLock off ScrollLock off
Current leds: NumLock off CapsLock off ScrollLock off
Toggling the NumLock key gives the following “setleds” output and, the Numeric Pad keys type numbers:
Current default flags: NumLock off CapsLock off ScrollLock off
Current flags: NumLock on CapsLock off ScrollLock off
Current leds: NumLock on CapsLock off ScrollLock off
If the NumLock in a specific VT has been toggled once, all subsequent sessions logged into that VT exhibit correct NumLock behaviour.
If another VT is selected, back to square one.
Who’s going to raise the Bug Report?
[HR][/HR]By the way, in a KDE4 Plasma Konsole session, the setleds output is as follows (expected behaviour – Konsole is not a VT):
> setleds
KDGKBLED: Unpassender IOCTL (I/O-Control) für das Gerät
Error reading current flags setting. Maybe you are not on the console?
>
Further testing (AMD FX™-4100 Quad-Core Processor) has revealed that, for the case of 13.2 and KDM (not SDDM), if in /etc/sysconfig/keyboard the variable KBD_NUMLOCK=“bios” and, in /usr/share/kde4/config/kdm/kdmrc the variable ‘NumLock’ is commented out (default value is “Keep”) and, in BIOS the Key Pad NumLock is set to “On”, during booting the NumLock LED stays off until the KDM Greeter appears. If there are numbers in the user’s password password, entering them via the Key Pad works as expected without an error.
The VTs behave as in the rest of this Post.
One piece of additional information: in a VT, after the KDM Greeter appeared, the NumLock LED is on but, the Key Pad can not be used to enter any numbers in the user’s password and, once the user has logged in, the Key Pad cannot be used to enter any numbers. Pressing the “Num” key once enables the NumLock – the NumLock LED remains on. The “setleds” output is as previously described.
[HR][/HR]Leap 42.2 behaviour with a Laptop will be described shortly.
Leap 42.2 AMD A10-5750M Quad-Core APU system – Lenovo G505s Laptop – no options for Key Pad NumLock in the UEFI BIOS.
In /etc/sysconfig/keyboard following setting: KBD_NUMLOCK=“bios”.
Added “Numlock=on” to the “[General]” section of /etc/sddm.conf. The Key Pad NumLock switched on during the system boot and, worked as expected for a user login.
Only one annoying thing, root sessions in the Konsole intermittently switch the NumLock off.
The NumLock behaviour of the VT sessions are as expected for UEFI BIOS with the Key Pad NumLock set to “off”.