Xmodmap user configuration freezes Pc when Bluetooth device is Connected

Hi, i’m new here and i hope that i’m not breaking too many rules for posting support about the issue.

I’ve been trying to remap some keys for my laptop with Xmodmap, i saw in my .xinitrc that manjaro already checks if the user that logs in has an .Xmodmap file in their $Home directory. So, i just print the info from xmodmap -pke to ~/.Xmodmap with the changes that i want.

Then i reboot the system and test if the changes applied on, so far everything worked as needed. But, when i tried to listen music with my bluetooth headphones, after pairing with the laptop the GUI froze out except for the mouse pointer. After 2 mins the freeze stoped but my keyboard didn’t work.

Tried another reboot, and after login in plasma i tried again to pair my bluetooth device to experience again the freeze, when i shut down the bluetooth device everything went normal.

I’m trying not to be lazy searching documentation about this, but didn’t find anything related to this in KDE. If there’s some directions you could give me to try and fix this i’d appreciate it a lot.

Operating System: Manjaro Linux
KDE Plasma Version: 5.23.4
KDE Frameworks Version: 5.89.0
Qt Version: 5.15.2
Kernel Version: 5.13.19-2-MANJARO (64-bit)
Graphics Platform: X11
Processors: 4 × Intel® Core™ i3-1005G1 CPU @ 1.20GHz
Memory: 7.5 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics


Increase your chances of solving your issue:

You may find some recent threads about bluetooth :wink:

I have had this issue for ages. Unfortunately, no kernels or updates ever solved it. I am actually glad you could link the keyboard freezes due to bluetooth parings to .xmodmap. That makes sense in my case too.

Actually, I do not think it is exclusively related to bluetooth, because it also happens when I plug/unplug mice, keyboards or wifi devices. So, I am thinking it probably has to do with modifying Xmodmap and something going on with the “device manager”? USB drives work fine though.

Another weird issue my modifications of Xmodmap cause is the existence of an extra “ghost” layout, that appears when I cylcle through layouts with hotkeys, but not when I click on the system tray shortcut.

OS: Manjaro 21.2.4 Qonos
Kernel: x86_64 Linux 5.17.0-2-MANJARO
DE: KDE 5.91.0 / Plasma 5.24.2
CPU: Intel Core i7-8550U @ 8x 4GHz
GPU: Intel Corporation UHD Graphics 620 (rev 07)


Actually you are a lifesaver. I haven’t been able point this issue for a year. After seeing this, i deleted xmodmap config and use another alternative for my purpose and bluetooth freezes has stopped. I know this is just a workaround but you have been so helpful by pointing out this issue to xmodmap config. Thanks again.

Thanks for making the connection between the Bluetooth/keyboard freeze and .Xmodmap. I knew the issue started when I was trying to troubleshoot a third-level meta-key issue, but I couldn’t figure out what I had done to provoke it. I had reverted all other changes except the xmodmap config. Deleting that file - which I wasn’t using anyway - resolved the issue.

For me, it manifested as though the Ctrl key was always being held down - so for example if I clicked on multiple files in Dolphin multiple would be selected. If I pressed regular letter keys, the system would interpret it as shortcuts - sometimes anyway, a bit inconsistent.

So yes, deleting xmodmap resolved for me.

OS: Manjaro 5.15.65
DE: KDE Plasma 5.25.5

I also solved my issues. I have found out that any extra items on a list of bindings for a key on an .xmodmap file for two or more languages is going to originate issues connecting peripherals and ghost languages in the keyboard layout switcher. At least for .xmodmap files with a start point of 2 languages.

So, if “key 3 = 1 2 3 4 5 6 7”, you can modify those values, but adding any will result in the aforementioned issues.