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
Decision Tree
| Check | Result | Action |
|---|---|---|
|
No USB device added |
USB port/cable issue → Resolution: Physical USB Issue |
|
Yes |
Driver issue → Resolution: Driver Issue |
|
No (device not listed) |
Hardware failure or USB issue → Symptom: USB Device Issues |
Different USB port |
Works |
USB port failure, use working port |
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 |
|---|---|---|
|
Shows movement events |
Compositor config issue → Resolution: Compositor Configuration |
|
No events shown |
Driver/hardware issue → Resolution: Driver Issue |
|
Mouse listed |
Hyprland config → Resolution: Hyprland-Specific Mouse Issues |
|
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
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 |
|---|---|---|
|
No |
USB/hardware issue → Symptom: USB Device Issues |
|
Shows key events |
Compositor issue → Resolution: Keyboard Compositor Config |
|
No events |
Driver issue → Resolution: Keyboard Driver |
Only some keys work |
- |
Keymap issue → Resolution: Keymap Issues |
Resolution: Keyboard Compositor Config
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
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
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
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