I know this question comes up a lot, and I've seen some answers.

But the thing is, from what I understand numlockx is made for Xorg and does not work on Wayland.

I saw that some implementations of Wayland like Weston have a config file where I can chose the default behavior for numlock. But I haven't been able to find anything similar for the Gnome Shell implementation on Ubuntu 17.10

Also, I have numlock ON on my UEFI, and it is on during GRUB, but after I start Ubuntu it is switched off.

How can I manage to set this behavior without having to change to Xorg?

  • askubuntu.com/a/977793/692175 – user692175 Nov 19 '17 at 2:30
  • 1
    That question was also made by me and does not solve the problem. Just made me understand unlockx wont work on Wayland. – Galvas Nov 19 '17 at 2:38
  • The point was to remind you that there's no point in bringing up weston again. I hope you get an answer soon. – user692175 Nov 19 '17 at 2:42

You need to set it as gdm user via gsettings command

The solution that should work:

  1. Open terminal via Ctrl+Alt+T, then run command to get root privilege:

    sudo -i

  2. Switch to user gdm in the terminal:

    su gdm -s /bin/bash

  3. Finally set ‘Numlock on’ via gdm user:

    gsettings set org.gnome.settings-daemon.peripherals.keyboard numlock-state 'on'

Restart the computer and done


Don't have the reputation to comment so I have to post this this way.

The @bonhomag 's solution does not work for me. The procedure works with the command

gsettings set org.gnome.settings-daemon.peripherals.keyboard numlock-state on

instead of the last command in his answer (same command but no '' around the on).

Using Ubuntu 18.04 LTS.

Found that at ArchWiki.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.