Skip to content

Better handling when keyboard device is "busy" #2

Description

@uplg
time=2026-01-13T00:07:04.520-05:00 level=INFO msg="asahi-map starting" version=dev layout=qwerty-mac
time=2026-01-13T00:07:04.520-05:00 level=INFO msg="loaded layout" name="QWERTY Mac" description="US QWERTY keyboard for Mac - Option key special characters" path=/etc/asahi-map/layouts/qwerty-mac.yaml
time=2026-01-13T00:07:04.725-05:00 level=INFO msg="found keyboard" name="Apple SPI Keyboard" path=/dev/input/event1
time=2026-01-13T00:07:04.764-05:00 level=ERROR msg="failed to grab keyboard" name="Apple SPI Keyboard" error="grabbing device /dev/input/event1: device or resource busy"

Help user / add information for the user to allow asahi-map to grab device if busy (used by another process).

Workaround :

# 1. Add user to the input group (avoid sudo)
sudo usermod -aG input $USER
# Then logout/login back

# 2. Check if another process is using keyboard
sudo lsof /dev/input/event1
# OR
sudo fuser -v /dev/input/event1

# 3. Kill process that is using the keyboard
pkill XXX

# 4. Restart asahi-map
./asahi-map

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions