# Why is Num Lock ALWAYS an issue with EACH Release?!? It's 2015!!!

I apologize in advance for my mock irritability, but I've dumped a ton of time into this over the years.

The recent F22 is different somehow than previous Fs. Everything I've done in the past (F21 and before) no longer works.

Yes, numlockx is installed

Yes, I have tried multiple scripts

No, there is nothing in the BIOS for numlock

The Number Keys are Labeled as Numbers, why isn't what they are labeled as the Default!?

edit retag close merge delete

Welcome to ask.fedora! Alas, I can't answer your question directly, because I prefer numlock off for various reasons. However, a little research suggests that you need to add it to startx, before the exec statement. How have you been invoking it? (Please respond in a comment, instead of using your only answer for this question.)

( 2015-05-30 21:26:02 -0500 )edit

What happens when you run /usr/bin/numlockx directly? Does journalctl -b show the attempt to execute /etc/X11/xinit/xinitrc.d/numlockx.sh ?

( 2015-05-30 22:19:01 -0500 )edit

Thanks for the responses and the welcome. The strange thing is, if the numlock light is to be believed, the computer starts with it on and stays on almost right up to when the logon screen appears. However, the numlock worked just fine in F21 without the light staying on. Anyway, the numlockx executable is in bin with permission set for read and write for all, although I've never had to do that before -- trying just about anything. I've tried /usr/bin/numlockx on in a few places in /etc/X11/xinit/xinitrc even though the included instructions say place "At the beginning of the file..."

( 2015-05-31 15:42:41 -0500 )edit

I've also done this

At the end of the file you will find a line like

exit 0

Above this line add the following code

if [ -x /usr/bin/numlockx ]; then /usr/bin/numlockx on fi

Through Tweak Tool (using GNOME 3 BTW) I have numlockx included in startup applications - which seems to work, but only after I've logged in and usually already have manually turned it on. I read somewhere about ctrl+shift+numlock and I've tried that at various times and it does nothing for me. Unfortunately, journalctl -b does not show the attempt, so something is missing apparently.

( 2015-05-31 15:45:08 -0500 )edit

numlockx and numlockx.sh shell scripts are in /etc/X11/xinit/xinitrc.d. I've tried one or two other things based on searches but those escape me now but nothing done wasn't reversible. I think that's everything, brain on lock. Thanks for your time.

( 2015-05-31 15:46:44 -0500 )edit

Sort by » oldest newest most voted

On Fedora 22, GDM runs on top of Wayland by default instead of X. And in that case, numlockx will not work. So, for numlockx to work on login screen, you have to force GDM to use Xorg. Edit this file /etc/gdm/custom.conf and uncomment the line WaylandEnable=false. And then activate numlockx on login screen by placing

if [ -x /usr/bin/numlockx ]; then
/usr/bin/numlockx on
fi


at the end of /etc/gdm/Init/Default (after the last fi but before exit 0). This worked for me on Fedora 22, using Gnome 3.16.

more

Alright, Distro Hopping has brought me back here to try again and I can Finally report success. A combination of below did the trick for me.

Edit this file /etc/gdm/custom.conf and uncomment the line WaylandEnable=false. And then activate numlockx on login screen by placing

if [ -x /usr/bin/numlockx ]; then
/usr/bin/numlockx on fi

at the end of /etc/gdm/Init/Default

AND

Typing >> Layout of numeric keypad >> Legacy

For me it has to be Both, as I tried each individually with unsatisfactory results.

Much Thanks to damus and Frttls and everyone else that offered suggestions that might very well work for others.

more

I think I know what's needed: create a shell script that simply runs numlockx, make it executable and run it from /etc/rc.d/rc.local so that it's called at the end of the boot process, but before you log in. My understanding is that systemd will activate the proper service to run that file automatically, as soon as it recognizes that it's there.

more

I know it wasn't listed, but this was one of the many other things I tried. BUT I tried it again and it still didn't work for me. I very much appreciate your assistance, but I'm not wasting anymore time on this. I've used Fedora on the computer I'm typing on now since F17, however, this and the fact that F22 freezes on me regularly along with a couple of other issues... well, obviously to me, it's time to move on to a different distro. Thanks again for your help.

( 2015-06-08 15:54:51 -0500 )edit

One, last thing before you do: check to see if rc-local.service is active by running this: systemctl status rc-local.service I know that it's supposed to be active if /etc/rc.d/rc.local exists and is executable, but it can't hurt to check.

( 2015-06-08 16:43:13 -0500 )edit

It's a tad disheartening that a motivating suggestion is presented after essentially giving up. I still suspect what you mentioned is related to the issue though. There wasn't a rc.local file by default and when I created one, I did so with a grasping at straws mindset after trying other approaches. It seems silly to me now that I didn't do a status check - I guess thinking it would work or it wouldn't. I assure you, I started this believing getting numlock setup would be no big deal and even when that turned out not to be true, for me at least, positivity endured through much of the effort.

( 2015-06-09 14:16:41 -0500 )edit

Well, more time has been used & while I feel I have learned a fair amount, which has value of course, a fix eludes me. When I check the status after various iterations, the best I get is

Loaded: loaded (/usr/lib/systemd/system/rc-local.service; enabled; vendor preset: disabled)
Active: active (exited) since Tue 2015-06-09 13:57:48 EDT; 25min ago
Main PID: 920 (code=exited, status=0/SUCCESS)
..rc.local[920]: Error opening display!


I can't remember all that I've tried now & the reward just isn't enough to justify more time. Yours & randomuser's help has been greatly appreciated

( 2015-06-09 14:18:42 -0500 )edit

Confirmed that

Universal Access > Pointing & Clicking > Mouse Keys Off

is the fix to the problem, had the same issue after upgrading to F26. Upon disabling the problem is fixed.

more

This post is a wiki. Anyone with karma >750 is welcome to improve it.

I solved my NumLock not working / Number Keypad not working issue on my laptop running Fedora 21 by turning off Mouse Keys, found here - All Settings > System > Universal Access > Pointing & Clicking > Mouse Keys Off

more

## Stats

Seen: 3,830 times

Last updated: Jul 21 '17