You press F5 to refresh, and instead your music pauses. You press F2 to rename a file, and brightness changes. If you use a Logitech keyboard on Linux, you know this frustration.
Logitech keyboards ship in media mode by default. The top row prefers volume, play, and brightness over real F1 to F12 keys. On Windows, Logitech software flips it. On Linux, you need a different fix — and there are several good ones.
Quick Answer
To fix Logitech function keys acting as media keys on Linux, press Fn + Esc to toggle Fn Lock if your keyboard supports it, or install Solaar and turn off the “Swap Fx function” setting for your keyboard. For a permanent low-level fix on many models, use the hid_apple fnmode style parameter where supported, or remap with a udev hwdb rule. The Solaar method is the most reliable for Logitech wireless keyboards connected via USB receiver or Bluetooth.
Why Logitech Keyboards Behave This Way
Most buyers use volume and brightness more than F keys, so Logitech sets media actions as the primary layer. The real F key only fires when you hold Fn at the same time. Developers, spreadsheet users, and anyone using F2, F5, or F12 shortcuts feel the pain immediately.
Unlike a simple BIOS setting on laptops, external Logitech keyboards store this preference in the keyboard itself or rely on host software. That is why the same keyboard can behave differently on two computers. You need to change the setting on the keyboard or intercept the keys in Linux.
Models affected include the K380, K400, K800, MX Keys, MX Keys Mini, Craft, ERGO K860, and many others. Wired and wireless models differ slightly in which fix works best.
Fix 1: Use Fn Lock — The 10-Second Test
Try this before installing anything. Many Logitech keyboards have a built-in Fn Lock.
- Find the
Esckey. On many models it has a small lock or Fn icon printed on it. - Hold
Fnand pressEsconce. - Release both keys and test: press F5 alone in a browser. If the page refreshes instead of pausing media, Fn Lock is now on.
- Press
Fn + Escagain anytime to switch back.
On MX Keys, the F-Lock indicator behavior is similar. On some compact models like the K380, Fn Lock does not exist as a hardware toggle — the setting lives in software, so move to Solaar below. If Fn Lock works but resets after the keyboard sleeps or reboots, you also need Solaar to make it stick.
Fix 2: Use Solaar — The Best Fix for Wireless Keyboards
Solaar is the open source Linux manager for Logitech devices. It talks directly to the Unifying, Bolt, or Bluetooth connection and changes the keyboard’s own function key setting. This is the fix most Linux users should use.
The project is maintained on the official Solaar project page on GitHub, with model support lists and the latest releases.
Install Solaar
- On Ubuntu, Debian, and Linux Mint:
sudo apt install solaar - On Fedora:
sudo dnf install solaar - On Arch Linux:
sudo pacman -S solaar - Plug in your receiver or pair the keyboard via Bluetooth, then open Solaar from the app menu.
- Select your keyboard in the left panel. If it does not appear, unplug and replug the receiver, then click the refresh icon.
Change the Function Key Setting in Solaar
- With your keyboard selected, look for the setting named “Swap Fx function”, “Function keys” or “F1-F12 as standard function keys”, depending on model and Solaar version.
- Turn it On. This means F1 to F12 act as standard keys, and media actions need
Fnplus the key. - Test immediately in a terminal or browser — no reboot needed.
- Enable Solaar to start at login: in Solaar preferences, or add it in Startup Applications, so it reapplies the setting after sleep.
- For Bolt and Unifying receivers, also install the udev rules if prompted, then reboot once so device permissions are correct.
Solaar also shows battery level and manages pairing. Set the option per keyboard — mice are unaffected. Our tutorial on how to remap keyboard keys and shortcuts on Linux covers non-Logitech boards too.
Fix 3: Kernel Parameter for Supported Keyboards
Some Logitech keyboards handled by the Apple HID driver compatibility layer, and many laptop-style keyboards, respect a module parameter that forces F keys first.
- Test it temporarily: check if
cat /sys/module/hid_apple/parameters/fnmodeexists. If the file is not there, skip this fix — it does not apply to your driver. - If it exists, values mean: 0 = disabled, 1 = media keys first with Fn for F keys, 2 = F keys first.
- Set it now with
echo 2 | sudo tee /sys/module/hid_apple/parameters/fnmodeand test. - Make it permanent by creating
/etc/modprobe.d/hid_apple.confwith the lineoptions hid_apple fnmode=2. - Reboot and confirm the value is still 2.
Do not force this on pure Logitech HID++ devices if the file does not exist. For those, Solaar is the correct path. Forcing wrong module options does nothing useful and confuses later troubleshooting.
Fix 4: Remap with hwdb or Keyd When Nothing Else Works
If your exact model has no Fn Lock and Solaar lists no swap option — common on some Bluetooth-only compact boards — remap the keys at the system level.
Option A: Check Current Mapping
- Install
evtest:sudo apt install evtest - Run
sudo evtest, select your keyboard, and press F5. Note whether Linux seesKEY_F5or a media code likeKEY_NEXTSONG. - This tells you whether the keyboard sends media codes at hardware level or the OS is interpreting them.
Option B: Use Keyd for Reliable Remapping
- Install
keydfrom your distro packages or its project page. - Create
/etc/keyd/default.confmapping each media code on the top row to the matching F key, and the Fn layer back to media if you want both. - Enable the service:
sudo systemctl enable --now keyd - Test each F key one by one.
Remapping is more work, but it survives without Solaar running. Keep a second keyboard or on-screen keyboard nearby while testing, in case you mis-map Enter or Esc.
For background reading, the keyboard configuration guide on the Arch Wiki explains hwdb, Xorg, and evdev layers clearly and applies to most distros.
Fix for Specific Popular Models
Logitech MX Keys and MX Keys Mini
Use Solaar and enable the function key swap. Also try Fn + Esc — MX Keys supports Fn Lock with an indicator. In Solaar, disable “Backlight” related power saving if the setting resets after sleep, and let Solaar autostart.
Logitech K380 and K480
These have no true hardware Fn Lock on all revisions. Solaar is essential. Select the keyboard, enable the F key swap, and ensure Solaar starts at login. On Bluetooth, wake the keyboard before logging in so Solaar can apply the profile.
Logitech K400 Plus (TV and Media PC Use)
The K400 is media-focused by design. Solaar still exposes the swap on most units. If you use it mainly for media, consider leaving media mode on and holding Fn for rare F key presses.
Common Mistakes and Useful Tips
- Only changing GNOME or KDE shortcut settings: Desktop shortcuts cannot fix this. The keyboard sends media codes before the desktop sees them. Fix it at keyboard or driver level.
- Installing Logitech Options on Linux: Logitech Options and Options+ are Windows and macOS only. Solaar is the Linux equivalent — do not waste time searching for an official Linux download.
- Forgetting Solaar autostart: If your fix works until reboot or sleep, Solaar is not reapplying it. Enable autostart and check the tray icon after login.
- Confusing Fn Lock with Caps Lock indicators: Test with a clear action — F5 refresh in a browser versus a volume overlay — rather than guessing from a light.
- Testing only in one app: Some apps capture F keys themselves. Test in a terminal with
xevorevtestplus a browser to be sure. - Tip: On dual-boot systems, set the preference in Solaar on Linux and in Options+ on Windows to the same mode, so the keyboard feels identical on both.
- Tip: If you code, also map
Fnlayer media keys in your editor — you do not lose volume control, it just moves to Fn plus the key, which is the standard trade-off.
Conclusion
Logitech keyboards acting as media keys first is a default choice, not a Linux bug. Start with Fn + Esc for a quick toggle, then use Solaar for a proper, persistent fix on wireless models. Reach for kernel parameters or key remapping only when your model needs it. Within minutes, F2 will rename, F5 will refresh, and volume will wait for Fn — exactly as a standard keyboard should behave.
Frequently Asked Questions
Does Solaar work with Bluetooth or only the USB receiver?
Solaar works with Unifying receivers, Bolt receivers, and direct Bluetooth connections on most modern Logitech keyboards. Bluetooth support depends on the model exposing the HID++ protocol over Bluetooth. If your keyboard appears in Solaar over Bluetooth, the function key swap will work.
Why does Fn Lock reset after my keyboard sleeps?
Some models store Fn Lock only in volatile memory. When the keyboard sleeps or loses power, it returns to media mode. Running Solaar at login and on wake reapplies standard F keys automatically, which is why autostart matters.
Will this fix affect the Fn keys on my laptop’s built-in keyboard?
No. Solaar and Logitech settings apply only to the selected Logitech device. Your laptop’s internal keyboard has its own BIOS or Fn Lock setting, usually in BIOS setup or with its own Fn plus Esc toggle.
I have no Swap option in Solaar for my keyboard. What now?
Update Solaar to the latest version first, as model support grows often. If the option is still absent, your firmware may not expose it. Use the keyd or hwdb remapping method in this guide, which works regardless of firmware features.
Can I keep media keys easily accessible after the fix?
Yes. After swapping, media actions move to Fn plus the top-row key — for example Fn + F11 for volume down on many models. You lose nothing; you only change which layer needs the Fn hold.


Leave a Reply