PDA

View Full Version : [xubuntu] Keep NumLock Enabled



snakyjake
December 30th, 2015, 02:55 AM
How do I keep the keyboard numlock (number lock) enabled when the screen saver is activated or the screen is locked?

There shouldn't be a valid reason why Xubuntu is toggling my numlock. Seems like a bug to me.
I don't want to install anything extra.

Xubuntu 15.10

thorsten-munsch
January 22nd, 2016, 06:57 PM
I can confirm that. At work I have a Debian 8.1 with Xfce 4.10 and the Numlock stays always on.

I have two private machines which are affected on the bug. All Xubuntu 14.04 LTS with Xfce 4.10..one selfmade desktop pc, one hp elitebook.

Dennis N
January 22nd, 2016, 08:36 PM
On Xubuntu 15.10, I find that if Settings > Keyboard > Restore Numlock State on Startup is checked, and Numlock is ON when you shut down, it will be ON after restart and log in. My screensaver is not affecting the numlock state but I do not lock the screen.

speartip
January 23rd, 2016, 10:00 AM
On Xubuntu 15.10, I find that if Settings > Keyboard > Restore Numlock State on Startup is checked, and Numlock is ON when you shut down, it will be ON after restart and log in. My screensaver is not affecting the numlock state but I do not lock the screen.

That's true, but not after locking or suspending the computer.

Nuno_Abreu
January 23rd, 2016, 05:14 PM
Have you tried to use numlockx?

Then you can add this command on rc.local or in a startup script (it might be optional):

numlockx on

speartip
January 24th, 2016, 09:57 AM
Have you tried to use numlockx?

Then you can add this command on rc.local or in a startup script (it might be optional):


Again, the problem isn't numlock being enabled on startup or login. It's when the screensaver is activated, locked or resuming from suspend.

@snakyjake... Is this problem, that the number pad is disabled or just that the numlock light goes out? In my case the pad remains active but the light goes out as if it's disabled.

ggallozz
July 2nd, 2016, 06:14 PM
same problem here.

kernel name is: Linux
kernel-release is: 3.16.0-72-generic
kernel version is: #93~14.04.1-Ubuntu SMP Mon May 16 21:28:40 UTC 2016
machine hardware is: i686
processor type is: i686
h/w platform is: i686
operating system is: GNU/Linux
desktop env. is: xubuntu - XDG_CURRENT_DESKTOP=XFCE
*** OS specs ***
Distributor ID: trusty
Description: Ubuntu
Release: Ubuntu 14.04.4 LTS
Codename: 14.04

pqwoerituytrueiwoq
July 4th, 2016, 02:24 PM
using xubuntu 14.04 and 16.04 i have no issue with this
Since OP wants to not use extra software, i did look for a alt way and dug this up
i managed to find this folder
/sys/class/leds/input3::numlock
Turn LED on
echo 1 | sudo tee /sys/class/leds/input3::numlock/brightness
Turn LED off
echo 0 | sudo tee /sys/class/leds/input3::numlock/brightness
this has no effect on the numlock state only the LED

if it really is turning off randomly just use a cronjob can call numlockx on every minute, very dirty workaround
edit: you mean you don't have numlock at the login screen right?
look at this file: /etc/lightdm/lightdm.conf
you will either need to use greeter-setup-script or display-setup-script not sure which, may work with either

me@A54C-NB91:/sys/class/leds/input3::numlock$ cat /etc/lightdm/lightdm.conf
[SeatDefaults]
greeter-session=lightdm-gtk-greeter
user-session=xubuntu
greeter-setup-script=/usr/bin/numlockx on
#display-setup-script =/usr/bin/numlockx on

i use xscreensaver, not lite-locker, if recall lightlocker uses the login screen for the password prompt, this is not the user session therefore your user numlock setting does not mean anything