Input Device Troubleshooting

Quick Diagnosis

# Check if kernel sees the device
sudo dmesg | tail -20
sudo dmesg | grep -i "input\|mouse\|keyboard\|usb"

# List input devices
cat /proc/bus/input/devices

# List via libinput (Wayland/Hyprland)
sudo libinput list-devices

# Watch events in real-time
sudo libinput debug-events

# Hyprland specific
hyprctl devices

Symptom: Mouse Not Detected

Quick Check

# Is it in /proc?
cat /proc/bus/input/devices | grep -A 5 -i mouse

Decision Tree

Check Result Action

dmesg | grep -i usb

No USB device added

USB port/cable issue → Resolution: Physical USB Issue

lsusb shows device

Yes

Driver issue → Resolution: Driver Issue

lsusb shows device

No (device not listed)

Hardware failure or USB issue → Symptom: USB Device Issues

Different USB port

Works

USB port failure, use working port

Resolution: Physical USB Issue

# Try different port
# Check dmesg when plugging in
sudo dmesg -w &
# Plug in device and watch output
# Ctrl+C to stop

# Reset USB controller (nuclear option)
echo 1 | sudo tee /sys/bus/usb/devices/usb*/authorized

Resolution: Driver Issue

# Check if hid module loaded
lsmod | grep hid

# Try loading HID modules
sudo modprobe usbhid
sudo modprobe hid-generic

# For specific mice (Logitech, etc.)
sudo modprobe hid-logitech
sudo modprobe hid-logitech-hidpp

Symptom: Cursor Visible But Not Moving

This often indicates the compositor/display server isn’t receiving events.

Quick Check

# Are events being generated?
sudo libinput debug-events
# Move mouse - you should see output

Decision Tree

Check Result Action

libinput debug-events

Shows movement events

Compositor config issue → Resolution: Compositor Configuration

libinput debug-events

No events shown

Driver/hardware issue → Resolution: Driver Issue

hyprctl devices (Hyprland)

Mouse listed

Hyprland config → Resolution: Hyprland-Specific Mouse Issues

hyprctl devices

Mouse NOT listed

Device not reaching Hyprland → Resolution: Compositor Configuration

Resolution: Compositor Configuration

Hyprland
# Check Hyprland devices
hyprctl devices

# Check if mouse is bound
grep -i mouse ~/.config/hypr/hyprland.conf
grep -i input ~/.config/hypr/hyprland.conf

Check your ~/.config/hypr/hyprland.conf:

input {
    kb_layout = us
    follow_mouse = 1
    sensitivity = 0

    touchpad {
        natural_scroll = false
    }
}

# Should NOT have device-specific overrides blocking mouse
# If you have per-device config, verify mouse is included:
device {
    name = logitech-gaming-mouse-g502
    sensitivity = -0.5
}

Reload Hyprland config:

hyprctl reload
sway
# Check sway input config
swaymsg -t get_inputs

# In config (~/.config/sway/config):
input "type:pointer" {
    accel_profile "flat"
    pointer_accel 0
}

# Reload
swaymsg reload
X11
# List X input devices
xinput list

# Check device properties
xinput list-props "Device Name"

# Enable device if disabled
xinput enable "Device Name"

Resolution: Hyprland-Specific Mouse Issues

# Full device list with details
hyprctl devices -j | jq

# Check if device has a keyboard grab preventing input
hyprctl clients

# Reload config
hyprctl reload

# Nuclear: restart Hyprland (will close session)
# Better: check logs
cat /tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/hyprland.log | tail -100

Symptom: Keyboard Not Working

Quick Check

# Check if seen by system
sudo dmesg | grep -i keyboard
cat /proc/bus/input/devices | grep -A 5 -i keyboard

# Test events
sudo libinput debug-events
# Press keys - should see output

Decision Tree

Check Result Action

dmesg shows keyboard

No

USB/hardware issue → Symptom: USB Device Issues

libinput debug-events

Shows key events

Compositor issue → Resolution: Keyboard Compositor Config

libinput debug-events

No events

Driver issue → Resolution: Keyboard Driver

Only some keys work

-

Keymap issue → Resolution: Keymap Issues

Resolution: Keyboard Compositor Config

Hyprland
# Check keyboard in device list
hyprctl devices | grep -i keyboard

# Verify input config in hyprland.conf
input {
    kb_layout = us
    kb_variant =
    kb_model =
    kb_options =
    kb_rules =
}

# Reload
hyprctl reload
X11
# List keyboards
xinput list

# Check if keyboard is enabled
xinput list-props "AT Translated Set 2 keyboard"

# Set keyboard layout
setxkbmap us

Resolution: Keyboard Driver

# Check HID modules
lsmod | grep hid

# Load keyboard module
sudo modprobe atkbd        # PS/2 keyboard
sudo modprobe usbhid       # USB keyboard
sudo modprobe hid-generic

# Check for blocked keys (fn lock, etc.)
# Try Fn+Esc or Fn+F1-F12

Resolution: Keymap Issues

# Current keymap
localectl status

# Set keymap (persistent)
sudo localectl set-keymap us
sudo localectl set-x11-keymap us

# Test XKB compile
xkbcomp -xkb $DISPLAY - 2>&1 | head

Symptom: Touchpad Issues

Quick Check

# List touchpads
sudo libinput list-devices | grep -A 10 -i touchpad

# Test events
sudo libinput debug-events
# Touch touchpad - should see output

Common Issues

Touchpad Completely Dead

# Check if detected
cat /proc/bus/input/devices | grep -i touchpad
dmesg | grep -i touchpad

# i2c touchpad (common on laptops)
sudo modprobe i2c-hid
sudo modprobe hid-multitouch

# Synaptics
sudo modprobe psmouse

Touchpad Works But Gestures Don’t

Check libinput configuration:

  • Hyprland

  • sway

  • X11

# ~/.config/hypr/hyprland.conf
input {
    touchpad {
        natural_scroll = true
        tap-to-click = true
        disable_while_typing = true
    }
}

gestures {
    workspace_swipe = true
    workspace_swipe_fingers = 3
}
# ~/.config/sway/config
input type:touchpad {
    tap enabled
    natural_scroll enabled
    dwt enabled
}
# Check libinput config
cat /etc/X11/xorg.conf.d/40-libinput.conf

# Enable tap-to-click
xinput set-prop "Touchpad" "libinput Tapping Enabled" 1

Disable Touchpad While Typing

# Check current setting
libinput list-devices | grep -A 20 "Touchpad" | grep -i dwt

# Hyprland: in input section
disable_while_typing = true

# X11
xinput set-prop "Touchpad" "libinput Disable While Typing Enabled" 1

Symptom: Bluetooth Input Device Issues

Quick Check

# Bluetooth service running
systemctl status bluetooth

# List paired devices
bluetoothctl devices

# Check connection
bluetoothctl info XX:XX:XX:XX:XX:XX

Connection Troubleshooting

# Interactive Bluetooth control
bluetoothctl

# Inside bluetoothctl:
power on
agent on
default-agent
scan on
# Wait for device to appear
pair XX:XX:XX:XX:XX:XX
trust XX:XX:XX:XX:XX:XX
connect XX:XX:XX:XX:XX:XX

Bluetooth Device Connected But Not Working

# Check if HID profile active
bluetoothctl info XX:XX:XX:XX:XX:XX | grep -i uuid

# Remove and re-pair
bluetoothctl remove XX:XX:XX:XX:XX:XX
# Then pair again

# Check for interference (2.4GHz WiFi)
# Try disabling 2.4GHz band temporarily

Symptom: USB Device Issues

Quick Check

# List USB devices
lsusb

# Detailed info
lsusb -v 2>/dev/null | grep -E "^Bus|idVendor|idProduct|bInterfaceClass"

# USB tree view
lsusb -t

# Kernel messages
dmesg | grep -i usb

USB Device Not Recognized

# Watch dmesg while plugging in
sudo dmesg -w

# Check USB power
cat /sys/bus/usb/devices/*/power/control

# Reset USB device
usbreset <bus-id>:<device-id>

# Reset entire USB subsystem (nuclear)
for bus in /sys/bus/usb/devices/usb*; do
    echo 0 > $bus/authorized
    sleep 1
    echo 1 > $bus/authorized
done

USB Device Works Intermittently

# Disable USB autosuspend
echo -1 | sudo tee /sys/module/usbcore/parameters/autosuspend

# Permanent fix in kernel params
# /etc/default/grub
GRUB_CMDLINE_LINUX="usbcore.autosuspend=-1"
# Then: sudo grub-mkconfig -o /boot/grub/grub.cfg

USB Hub Issues

# Check hub power
lsusb -v 2>/dev/null | grep -E "MaxPower|bcdUSB"

# Hub might not provide enough power
# Try powered USB hub or direct connection

Nuclear Options

Use only when all else fails.

Reload All Input Modules

# Remove and reload HID modules
sudo modprobe -r usbhid
sudo modprobe -r hid-generic
sleep 1
sudo modprobe hid-generic
sudo modprobe usbhid

# For PS/2
sudo modprobe -r psmouse
sudo modprobe psmouse

Restart libinput

# Kill any libinput debug processes
pkill -f "libinput"

# Restart compositor (loses session!)
# Hyprland
hyprctl dispatch exit

# sway
swaymsg exit

Full USB Subsystem Reset

# WARNING: Will briefly disconnect all USB devices
echo 1 | sudo tee /sys/bus/usb/devices/usb*/authorized

Check udev Rules

# View udev rules
ls /etc/udev/rules.d/
ls /usr/lib/udev/rules.d/

# Monitor udev events
sudo udevadm monitor

# Reload udev rules
sudo udevadm control --reload-rules
sudo udevadm trigger