Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: SDDM and Num Lock

  1. #1
    Join Date
    Sep 2008
    Posts
    2,997

    Default SDDM and Num Lock

    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?

  2. #2

    Default Re: SDDM and Num Lock

    Quote Originally Posted by I_A View Post
    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.
    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...)
    Last edited by wolfi323; 19-Nov-2016 at 18:23.

  3. #3
    Join Date
    Sep 2008
    Posts
    2,997

    Default Re: SDDM and Num Lock

    Quote Originally Posted by wolfi323 View Post
    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).


    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

  4. #4
    Join Date
    May 2016
    Location
    Chennai, TN, India
    Posts
    76

    Default Re: SDDM and Num Lock

    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.

  5. #5
    Join Date
    Jun 2009
    Location
    Mangfall, Germany
    Posts
    1,500

    Default Re: SDDM and Num Lock

    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

  6. #6
    Join Date
    Sep 2008
    Posts
    2,997

    Default Re: SDDM and Num Lock

    Quote Originally Posted by linlen View Post
    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.
    This is my current sddm.conf
    Code:
    [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
    Quote Originally Posted by keellambert View Post
    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
    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 Numlock=on to sddm.conf did the trick my sddm.conf now reads
    Code:
    [Autologin]
    Relogin=false
    Session=plasma5.desktop
    User=
    
    [General]
    HaltCommand=
    RebootCommand=
    Numlock=on
    
    [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
    and I don't have to re-hit the num lock to make sure I enter my password properly
    @linlen tanks

  7. #7

    Default AW: Re: SDDM and Num Lock

    Quote Originally Posted by I_A View Post
    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
    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/showthre...fig-editor-kdb
    Last edited by wolfi323; 08-Dec-2016 at 10:19.

  8. #8

    Default Re: SDDM and Num Lock

    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...

  9. #9
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    2,555

    Default Re: SDDM and Num Lock

    Quote Originally Posted by wolfi323 View Post
    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:
    Code:
    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:
    Code:
    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?

    By the way, in a KDE4 Plasma Konsole session, the setleds output is as follows (expected behaviour -- Konsole is not a VT):
    Code:
     > setleds
    KDGKBLED: Unpassender IOCTL (I/O-Control) für das Gerät
    Error reading current flags setting. Maybe you are not on the console?
     >

  10. #10
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    2,555

    Default Re: SDDM and Num Lock

    Further testing (AMD FX(tm)-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.

    Leap 42.2 behaviour with a Laptop will be described shortly.

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •