Linux thinks ctrl is held down

For the past few weeks i have had the intermittent problem of the PC thinking the ctrl key is being held down despite there being no input devices plugged in, I have tried using SSH to shutdown KDE connect and unplugging all my devices but has not helped.
I have looked into a few different ways of figuring it out such as apps like “showmethekey” but they don’t show where the input is coming from, I have also tried following this but i don’t know how to read the output or if it would even help.

╭─j@J in ~ as 🧙 took 2ms
 ╰─λ ls -l /dev/input/by-id/*
lrwxrwxrwx 1 root root  9 Apr 25 15:02 /dev/input/by-id/usb-Razer_DSV2Pro_TKL-event-kbd -> ../event8
lrwxrwxrwx 1 root root 10 Apr 25 15:02 /dev/input/by-id/usb-Razer_DSV2Pro_TKL-if01-event-kbd -> ../event12
lrwxrwxrwx 1 root root 10 Apr 25 15:02 /dev/input/by-id/usb-Razer_DSV2Pro_TKL-if02-event-mouse -> ../event13
lrwxrwxrwx 1 root root  9 Apr 25 15:02 /dev/input/by-id/usb-Razer_DSV2Pro_TKL-if02-mouse -> ../mouse1
lrwxrwxrwx 1 root root 10 Apr 25 11:51 /dev/input/by-id/usb-YICHIP_Wireless_Device_b120300001-event-if01 -> ../event29
lrwxrwxrwx 1 root root 10 Apr 25 11:51 /dev/input/by-id/usb-YICHIP_Wireless_Device_b120300001-event-kbd -> ../event15
lrwxrwxrwx 1 root root 10 Apr 25 11:51 /dev/input/by-id/usb-YICHIP_Wireless_Device_b120300001-if01-event-mouse -> ../event19
lrwxrwxrwx 1 root root  9 Apr 25 11:51 /dev/input/by-id/usb-YICHIP_Wireless_Device_b120300001-if01-mouse -> ../mouse6

 ╭─j@J in ~ as 🧙 took 3ms
 ╰─λ cat /proc/bus/input/devices | grep -A3 -B5 event8
I: Bus=0003 Vendor=1532 Product=0298 Version=0111
N: Name="Razer DSV2Pro TKL"
P: Phys=usb-0000:13:00.0-1.2/input0
S: Sysfs=/devices/pci0000:00/0000:00:08.3/0000:13:00.0/usb7/7-1/7-1.2/7-1.2:1.0/0003:1532:0298.000E/input/input50
U: Uniq=
H: Handlers=sysrq kbd leds event8 
B: PROP=0
B: EV=120013
B: KEY=3c0000000000 0 0 0 0 0 0 1000000000007 ff9f207ac14057ff febeffdfffefffff fffffffffffffffe
garuda-inxi
System:
Kernel: 6.8.7-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 13.2.1
clocksource: tsc avail: hpet,acpi_pm
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
root=UUID=f343e266-2bba-4823-826a-311cb6319709 rw rootflags=subvol=@
quiet quiet rd.udev.log_priority=3 vt.global_cursor_default=0
resume=UUID=29f15791-f1dd-436f-902e-804af7e61bb0 loglevel=3 ibt=off
Desktop: KDE Plasma v: 6.0.4 tk: Qt v: N/A info: frameworks v: 6.1.0
wm: kwin_wayland tools: avail: xscreensaver vt: 1 dm: SDDM Distro: Garuda
base: Arch Linux
Machine:
Type: Desktop Mobo: Gigabyte model: B650M AORUS ELITE
serial: <superuser required> uuid: <superuser required> UEFI: American
Megatrends LLC. v: F8c date: 08/16/2023
CPU:
Info: model: AMD Ryzen 5 7600X bits: 64 type: MT MCP arch: Zen 4 gen: 5
level: v4 note: check built: 2022+ process: TSMC n5 (5nm) family: 0x19 (25)
model-id: 0x61 (97) stepping: 2 microcode: 0xA601203
Topology: cpus: 1x cores: 6 tpc: 2 threads: 12 smt: enabled cache:
L1: 384 KiB desc: d-6x32 KiB; i-6x32 KiB L2: 6 MiB desc: 6x1024 KiB
L3: 32 MiB desc: 1x32 MiB
Speed (MHz): avg: 2609 high: 4841 min/max: 400/5453 scaling:
driver: amd-pstate-epp governor: powersave cores: 1: 4456 2: 3685 3: 3865
4: 3706 5: 400 6: 3928 7: 4837 8: 400 9: 4841 10: 400 11: 400 12: 400
bogomips: 112587
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Vulnerabilities: <filter>
Graphics:
Device-1: AMD Navi 22 [Radeon RX 6700/6700 XT/6750 XT / 6800M/6850M XT]
vendor: ASUSTeK driver: amdgpu v: kernel arch: RDNA-2 code: Navi-2x
process: TSMC n7 (7nm) built: 2020-22 pcie: gen: 4 speed: 16 GT/s
lanes: 16 ports: active: DP-2,DP-3 off: HDMI-A-1 empty: DP-1,Writeback-1
bus-ID: 03:00.0 chip-ID: 1002:73df class-ID: 0300
Device-2: AMD Raphael vendor: Gigabyte driver: amdgpu v: kernel
arch: RDNA-2 code: Navi-2x process: TSMC n7 (7nm) built: 2020-22 pcie:
gen: 4 speed: 16 GT/s lanes: 16 ports: active: none empty: Writeback-2
bus-ID: 12:00.0 chip-ID: 1002:164e class-ID: 0300 temp: 32.0 C
Display: wayland server: X.org v: 1.21.1.13 with: Xwayland v: 23.2.6
compositor: kwin_wayland driver: X: loaded: amdgpu
unloaded: modesetting,radeon alternate: fbdev,vesa dri: radeonsi
gpu: amdgpu,amdgpu d-rect: 5760x3240 display-ID: 0
Monitor-1: DP-2 pos: top-right res: 3840x2160 size: N/A modes: N/A
Monitor-2: DP-3 pos: bottom-l res: 1920x1080 size: N/A modes: N/A
API: EGL v: 1.5 hw: drv: amd radeonsi platforms: device: 0 drv: radeonsi
device: 1 drv: radeonsi device: 2 drv: swrast gbm: drv: radeonsi
surfaceless: drv: radeonsi wayland: drv: radeonsi x11: drv: radeonsi
API: OpenGL v: 4.6 compat-v: 4.5 vendor: amd mesa v: 24.0.5-arch1.1
glx-v: 1.4 direct-render: yes renderer: AMD Radeon RX 6750 XT (radeonsi
navi22 LLVM 17.0.6 DRM 3.57 6.8.7-zen1-1-zen) device-ID: 1002:73df
memory: 11.72 GiB unified: no display-ID: :1.0
API: Vulkan v: 1.3.279 layers: 18 device: 0 type: discrete-gpu name: AMD
Radeon RX 6750 XT (RADV NAVI22) driver: mesa radv v: 24.0.5-arch1.1
device-ID: 1002:73df surfaces: xcb,xlib,wayland device: 1
type: integrated-gpu name: AMD Radeon Graphics (RADV RAPHAEL_MENDOCINO)
driver: mesa radv v: 24.0.5-arch1.1 device-ID: 1002:164e
surfaces: xcb,xlib,wayland device: 2 type: cpu name: llvmpipe (LLVM
17.0.6 256 bits) driver: mesa llvmpipe v: 24.0.5-arch1.1 (LLVM 17.0.6)
device-ID: 10005:0000 surfaces: xcb,xlib,wayland
Audio:
Device-1: AMD Navi 21/23 HDMI/DP Audio driver: snd_hda_intel v: kernel pcie:
gen: 4 speed: 16 GT/s lanes: 16 bus-ID: 03:00.1 chip-ID: 1002:ab28
class-ID: 0403
Device-2: AMD Rembrandt Radeon High Definition Audio driver: snd_hda_intel
v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 16 bus-ID: 12:00.1
chip-ID: 1002:1640 class-ID: 0403
Device-3: AMD Family 17h/19h HD Audio vendor: Gigabyte
driver: snd_hda_intel v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 16
bus-ID: 12:00.6 chip-ID: 1022:15e3 class-ID: 0403
API: ALSA v: k6.8.7-zen1-1-zen status: kernel-api with: aoss
type: oss-emulator tools: N/A
Server-1: sndiod v: N/A status: off tools: aucat,midicat,sndioctl
Server-2: PipeWire v: 1.0.5 status: active with: 1: pipewire-pulse
status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
4: pw-jack type: plugin tools: pactl,pw-cat,pw-cli,wpctl
Network:
Device-1: Realtek RTL8125 2.5GbE vendor: Gigabyte driver: r8169 v: kernel
pcie: gen: 2 speed: 5 GT/s lanes: 1 port: e000 bus-ID: 0e:00.0
chip-ID: 10ec:8125 class-ID: 0200
IF: enp14s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
IF-ID-1: virbr0 state: down mac: <filter>
IF-ID-2: virbr1 state: down mac: <filter>
Info: services: NetworkManager, smbd, sshd, systemd-timesyncd
Bluetooth:
Device-1: Realtek Bluetooth Radio driver: btusb v: 0.8 type: USB rev: 1.1
speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 1-2:2 chip-ID: 0bda:8771
class-ID: e001 serial: <filter>
Report: btmgmt ID: hci0 rfk-id: 0 state: up address: <filter> bt-v: 5.1
lmp-v: 10 status: discoverable: no pairing: no class-ID: 6c0104
Drives:
Local Storage: total: 21.4 TiB used: 15.56 TiB (72.7%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Kingston model: SKC3000D2048G
size: 1.86 TiB block-size: physical: 512 B logical: 512 B speed: 63.2 Gb/s
lanes: 4 tech: SSD serial: <filter> fw-rev: EIFK31.6 temp: 25.9 C
scheme: GPT
ID-2: /dev/sda maj-min: 8:0 vendor: Crucial model: CT2000MX500SSD1
size: 1.82 TiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
tech: SSD serial: <filter> fw-rev: 023 scheme: GPT
ID-3: /dev/sdb maj-min: 8:16 vendor: Seagate model: ST8000AS0002-1NA17Z
size: 7.28 TiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
tech: HDD rpm: 5980 serial: <filter> fw-rev: AR15 scheme: GPT
ID-4: /dev/sdc maj-min: 8:32 vendor: Seagate model: ST8000AS0002-1NA17Z
size: 7.28 TiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
tech: HDD rpm: 5980 serial: <filter> fw-rev: RT18 scheme: GPT
ID-5: /dev/sdd maj-min: 8:48 vendor: SanDisk model: SDSSDXPS480G
size: 447.13 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
tech: SSD serial: <filter> fw-rev: 00RL scheme: GPT
ID-6: /dev/sde maj-min: 8:64 vendor: Seagate model: ST3000DM001-1ER166
size: 2.73 TiB block-size: physical: 4096 B logical: 512 B type: USB
rev: 2.1 spd: 480 Mb/s lanes: 1 mode: 2.0 tech: HDD rpm: 7200
serial: <filter> fw-rev: 8105 scheme: GPT
Partition:
ID-1: / raw-size: 1.83 TiB size: 1.83 TiB (100.00%) used: 1.63 TiB (89.1%)
fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
used: 25.8 MiB (8.6%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
ID-3: /home raw-size: 1.83 TiB size: 1.83 TiB (100.00%)
used: 1.63 TiB (89.1%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
ID-4: /var/log raw-size: 1.83 TiB size: 1.83 TiB (100.00%)
used: 1.63 TiB (89.1%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
ID-5: /var/tmp raw-size: 1.83 TiB size: 1.83 TiB (100.00%)
used: 1.63 TiB (89.1%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
Swap:
Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default) zswap: no
ID-1: swap-1 type: zram size: 30.5 GiB used: 1.39 GiB (4.6%) priority: 100
comp: zstd avail: lzo,lzo-rle,lz4,lz4hc,842 max-streams: 12 dev: /dev/zram0
Sensors:
System Temperatures: cpu: 40.0 C mobo: 28.0 C
Fan Speeds (rpm): N/A
GPU: device: amdgpu temp: 44.0 C mem: 40.0 C fan: 0 watts: 8.00
device: amdgpu temp: 33.0 C
Info:
Memory: total: 32 GiB note: est. available: 30.5 GiB used: 11.82 GiB (38.7%)
Processes: 401 Power: uptime: 18m states: freeze,mem,disk suspend: deep
avail: s2idle wakeups: 0 hibernate: platform avail: shutdown, reboot,
suspend, test_resume image: 12.18 GiB services: org_kde_powerdevil,
power-profiles-daemon, upowerd Init: systemd v: 255 default: graphical
tool: systemctl
Packages: 2572 pm: pacman pkgs: 2507 libs: 598 tools: gnome-software,
octopi, pamac, paru, yay pm: flatpak pkgs: 65 Compilers: clang: 17.0.6
gcc: 13.2.1 alt: 12 Shell: garuda-inxi default: Bash v: 5.2.26
running-in: yakuake inxi: 3.3.34
Garuda (2.6.26-1):
System install date:     2023-07-10
Last full system update: 2024-04-25 ↻
Is partially upgraded:   No
Relevant software:       snapper NetworkManager dracut
Windows dual boot:       Probably (Run as root to verify)
Failed units:            run-media-j-480.mount preload.service syncthing.service systemd-vconsole-setup.service dev-disk-by-uuid-29f15791-f1dd-436f-902e-804af7e61bb0.swap
xmodmap
xmodmap:  up to 4 keys per modifier, (keycodes in parentheses):

shift       Shift_L (0x32),  Shift_R (0x3e)
lock        Caps_Lock (0x42)
control     Control_L (0x25),  Control_R (0x69)
mod1        Alt_L (0x40),  Alt_L (0xcc),  Meta_L (0xcd)
mod2        Num_Lock (0x4d)
mod3        ISO_Level5_Shift (0xcb)
mod4        Super_L (0x85),  Super_R (0x86),  Super_L (0xce),  Hyper_L (0xcf)
mod5        ISO_Level3_Shift (0x5c)

Try to edit with xmodmap

im on wayland

Damn, sorry.

1 Like

You don’t happen to remember if an update or the installation of an app/game caused this?

No i think it has been a problem since i first switched to Wayland

Try installing an OSK utility to see if it can be changed using a virtual keyboard. Just FYI onboard does not work on wayland.

1 Like

I had a thing the past month where my kernel thaught i had closed the Lid and send it to sleep but lid was open. I played around with amd-ucode package from git and all is good now. Might be something to look into, some microcode packages have been a little buggy

1 Like

i changed back to X11 and it’s still happening

where did you face this issue? Are you getting the same behaviour in a TTY? How did you check this with no input devices connected? Does this apply to all applications or just to some? Could you try unplugging your usb wireless thingy just in case? Does your mouse have special mappings - maybe second layers or something?

xmodmap does work on wayland as far as I know.

1 Like