How to Stop Ubuntu from Automatically Activating Num Lock

The Login Screen Confusion

When you boot up an Ubuntu system, especially on a laptop that lacks a dedicated ten-key number pad, the behavior of the “Num Lock” key can be incredibly frustrating. On many systems, Ubuntu is configured to automatically activate the Num Lock state as soon as it hits the GDM3 login screen. If you are typing your password on a standard laptop keyboard, having Num Lock silently activated means half of your letter keys (like U, I, O, J, K, L) will type numbers instead. Your password will fail repeatedly until you realize the OS has hijacked your keyboard layout behind the scenes.

Disabling Boot-Time Num Lock

To ensure your keyboard behaves predictably and stop Ubuntu from automatically activating Num Lock during the boot sequence, you must modify the GDM3 (GNOME Display Manager) configuration settings.

You cannot change this in the standard GUI settings; you must use the terminal. Open a terminal (Ctrl+Alt+T). You need to switch to the `gdm` user to modify its specific settings. Type sudo -i to become root, then type su - gdm -s /bin/bash to switch to the GDM user. Now, you will use the `gsettings` command to alter the configuration. Type the following command exactly: gsettings set org.gnome.settings-daemon.peripherals.keyboard numlock-state 'off' and press Enter. This explicitly tells the login screen to force Num Lock to the “off” state. Type exit to leave the GDM user, and exit again to leave root. Restart your computer. When you reach the login screen, your keyboard will now type standard letters by default.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.