Announcement

Collapse
No announcement yet.

NUMLOCK on boot

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    NUMLOCK on boot

    Linux insists that I have a laptop and so totally ignores the state for NUMLOCK set by the BIOS and turns NUMLOCK Off. It does this not once, but constantly during the boot process.

    So my question:

    Is there a command that can be given through Grub2 when Ggrub2 invokes Linux that will tell Linux to please leave the NUMLOCK state alone and just assume that the user and BIOS to have set it properly before Linux is started

    Rant deleted !!

    #2
    Re: NUMLOCK on boot

    For me too it turns off Num Lock on boot.

    Go to system settings >> input devices >> Keyboard >> Numlock on KDE startup >> On

    Comment


      #3
      Re: NUMLOCK on boot

      Originally posted by Nayar
      For me too it turns off Num Lock on boot.

      Go to system settings >> input devices >> Keyboard >> Numlock on KDE startup >> On
      Yeah - I did that a long time ago, but it has one drawback that is just as irritating - KDE doesn't turn on the NUMLOCK LED - I'm pretty sure from the behavior that KDE uses it's own internal switch to turn on the numbers instead of trying to turn on the h/w facility, thus the LED doesn't get turned on. Thus the only way I can tell if NUMLOCK is turned on or off is to press one of the keys - spoils the the whole thing. And yes I've tried the utility to turn the LEDS on and off. Turning NUMLOCK on and off with KDE and then the LED separately. Just gets everything out of synch -the LED on/NUMLOC off and LED off/NUMLOCK on - no good and confusing.

      Just wish that the (K)Ubuntu developers wouldn't try and make all fixes global for everybody.

      Comment


        #4
        Re: NUMLOCK on boot

        yep. they need to fix that.

        Comment


          #5
          Re: NUMLOCK on boot

          Well, if you select "Leave unchanged" under the numlock settings, does it still change it?

          Obviously, everyone's BIOS is different but mine has a default setting for numlock and I have "Leave unchanged" selected in KDE and it doesn't change it during boot.

          As far as the LED, just for fun try this in a terminal;

          xset led 1

          I don't have any LEDs on this keyboard, but normally LED 1 is numlock, LED 2 is capslock, and LED 3 is scrolllock. Use a minus to turn off;

          xset led -1

          Alternately, setleds...

          Code:
          setleds [options]
          
          Display or change the LED flag settings (Num Lock, Caps Lock, and Scroll Lock) for the current virtual terminal. With no options, display the current settings for all three flags. Can be used in a startup script to set the initial state of the LEDs.
          
          Options
          
          +num, -num
          Set or clear Num Lock.
          
          +caps, -caps
          Set or clear Caps Lock
          
          +scroll, -scroll
          Set or clear Scroll Lock.
          
          -D
          Change both the current and the default settings. Useful for always having NumLock set, for example.
          
          -F
          Only change the flags (and their settings may be reflected by the keyboard LEDs). The default behavior.
          
          -L
          Change the LEDs but not the flags, so the leds no longer reflect the virtual terminal (VT) flags. Run setleds -L with no other options to restore the default behavior.
          
          -v
          Report the settings before and after the change.
          Once you figure out what works and get your numlock to stay in it's preferred state, then add the LED command (whichever works best) to /etc/rc.local and you should be all fixed up.

          Although I agree this seems a very tiny thing for the devs to fix, it's always better to light a candle...

          Please Read Me

          Comment


            #6
            Re: NUMLOCK on boot

            Originally posted by oshunluvr
            Well, if you select "Leave unchanged" under the numlock settings, does it still change it?

            Obviously, everyone's BIOS is different but mine has a default setting for numlock and I have "Leave unchanged" selected in KDE and it doesn't change it during boot.
            You have a mistaken impression that the trouble is with KDE.

            It is not.

            The trouble is with Linux.

            When Linux boots (long before KDE boots), it insists on turning OFF NUMLOCK and not once, but again and again and again and again and .... I have been told that this is because the (K)Ubuntu developers (or whoever compiles the Linux kernel for (K)Ubuntu) have this total belief that ALL users run on laptops and that it is imperative that the developers save the users from ever having to know what is happening and thus they have set Linux to turn OFF NUMLOCK during boot because otherwise the user's laptop keyboard will enter numerics for what the user thinks are certain alphabetic keys.

            Now most (All ?) desktops have full keyboards which have a separate set of numeric and cursor keys, thus, the actions taken by Linux during the Linux boot are not necessary. Now I sympathize with the developers, but there is one thing I learned over 30 years ago, NEVER hardwire anything into the software. ALWAYS make such decisions ones that the individual user can make. I spent several hours looking over the kernel documentation and there are a gazillion parameters that can be passed to the kernel on boot, but not a single one that I could find that says "Do this with the NUMLOCK state". That state seems to be determined during the compilation stage. So unless I want to learn the compilation process and compile the kernel every time the kernel is updated ..........

            It would seem that software developers are doomed (as all other engineers) to relearn with sad consequences the mistakes of previous generations. Over and Over and Over and Over and.....

            because no matter what you decision you make to hardwire there will be a set of very vocal and dedicated (and powerully connected in the organization) users who can prove that your decisions for the hardwiring are totally wrong.

            Originally posted by oshunluvr
            As far as the LED, just for fun try this in a terminal;

            xset led 1

            I don't have any LEDs on this keyboard, but normally LED 1 is numlock, LED 2 is capslock, and LED 3 is scrolllock. Use a minus to turn off;

            xset led -1

            Alternately, setleds...

            Code:
            setleds [options]
            
            Display or change the LED flag settings (Num Lock, Caps Lock, and Scroll Lock) for the current virtual terminal. With no options, display the current settings for all three flags. Can be used in a startup script to set the initial state of the LEDs.
            
            Options
            
            +num, -num
            Set or clear Num Lock.
            
            +caps, -caps
            Set or clear Caps Lock
            
            +scroll, -scroll
            Set or clear Scroll Lock.
            
            -D
            Change both the current and the default settings. Useful for always having NumLock set, for example.
            
            -F
            Only change the flags (and their settings may be reflected by the keyboard LEDs). The default behavior.
            
            -L
            Change the LEDs but not the flags, so the leds no longer reflect the virtual terminal (VT) flags. Run setleds -L with no other options to restore the default behavior.
            
            -v
            Report the settings before and after the change.
            Once you figure out what works and get your numlock to stay in it's preferred state, then add the LED command (whichever works best) to /etc/rc.local and you should be all fixed up.

            Although I agree this seems a very tiny thing for the devs to fix, it's always better to light a candle...
            As I wrote I have tried all of those options and they do indeed turn the LEDs on/off, but they do not influence the entry by the keys themselves. Thus, the LEDs are not a true indication of the state of the keys.

            Okay - consider the candle as lit for the forums. Now how do I light the candle for the (K)Ubuntu developers

            Comment


              #7
              Re: NUMLOCK on boot

              I agree with your belief that they (the collective developers of all distros) are weighting linux toward laptops, but I also believe that is the way the market is going. Nor can I argue with your logic as to the effect of this on those of us who prefer a machine (or several in my case) with greater power and flexibility.

              I mis-spoke slightly when posting in that I actually don't "blame" KDE but rather meant to reference Kubuntu as a whole and was attempting to keep my post terse.

              I referenced the LED commands with the idea that if you could indeed sort out the numlock setting, you could then also set your LED to the desired state and thus have a de facto correct outcome.

              Alas, since linux is mostly a community driven environment, we sometimes have to accept a less-than-perfect solution.

              Please Read Me

              Comment


                #8
                Re: NUMLOCK on boot

                One option is to install 'numlockx' package, which should turn on numlock automatically when X starts via /etc/X11/Xsession.d/55numlockx.

                Comment


                  #9
                  Re: NUMLOCK on boot

                  Originally posted by oshunluvr
                  I agree with your belief that they (the collective developers of all distros) are weighting linux toward laptops, but I also believe that is the way the market is going. Nor can I argue with your logic as to the effect of this on those of us who prefer a machine (or several in my case) with greater power and flexibility.
                  .............................
                  I also agree that laptops are the way the markets are going ( at least they were, now it is probably smart phones and tablets - can Linux fit on those?? if not then maybe the developers will go back to supporting us poor desktop users ;-) ) or maybe the Linux developers will follow that market and forsake desktop users entirely and maybe, eventually, laptop users (now wouldn't that be irony). Of course if the Linux developers desire to stay on servers, then maybe they will be forced to support desktops.

                  But then as I wrote, I learned a hard lesson over 30 years back that all choices should be coded as choices that the user can set, either on every boot or set once and use thereafter. A default choice is good, but the user must be able to change any choice the software developer/writer makes. Not following this practice makes for disgruntled users which lowers their use of the computer and hence their productivity. Not following this practice can also lead to software developers/writers that do not get promotions or pay increases (this is especially true when management learns to follow this practice) and will eventually lead to the the software developer/writer not being employed. None of this is probably applicable to open source software developers/writers. Good Open source software can be very good, but a lot of open source software developers/writers are not trained in good practices and know nothing of them.

                  Comment


                    #10
                    Re: NUMLOCK on boot

                    Originally posted by kubicle
                    One option is to install 'numlockx' package, which should turn on numlock automatically when X starts via /etc/X11/Xsession.d/55numlockx.
                    Thanks - I tried numlockx. Installed and rebooted. Got some kind of boot error. The error message didn't make a lot of sense to me, but there were instructions to press F10 to boot and then press "Any Key to continue Boot". All of that was rather stressful until I got to the login screen and KDE finally booted and appeared to be 'normal'. Immediately uninstalled numlockx and rebooted and got normal, clean boot.

                    Comment

                    Working...
                    X