Skip to content

Add Linux support: system battery, Bluetooth and USB HID devices - #9

Merged
PyFlat-JR merged 12 commits into
mainfrom
feature/linux-support
Oct 3, 2026
Merged

PyFlat-JR merged 12 commits into
mainfrom
feature/linux-support

Conversation

@PyFlat-JR

Copy link
Copy Markdown
Member

What does this PR do?

Adds Linux x64 as a third platform next to Windows and macOS, and releases it as 1.5.0.

Battery sources on Linux

  • This computer: read from /sys/class/power_supply. Two batteries are reported as one level,
    and a battery held below full by a charge threshold reports an unknown charging state.
  • Bluetooth devices: BlueZ's Battery1 over D-Bus (through busctl, so a systemd-based
    distribution is needed). Only connected devices are listed, under the name the desktop shows. The
    Bluetooth snapshot logic is now shared with the macOS reader.
  • USB HID devices from the catalog: read through hidraw ioctls (LinuxHidraw).
  • Android phone: unchanged, through Macro Deck's adb.

HID access

  • Only root can open /dev/hidraw* by default. packaging/linux/70-device-battery-info.rules grants
    the logged-in user access to each supported product id only, never a whole vendor.
  • docs/linux-setup.md prints the rule line by line instead of downloading it
    as root. A test keeps the rule and the guide in sync.
  • When Linux refuses to open a device, Macro Deck shows an integration issue on the plugin that names
    the device and links to the guide.

Build and release

  • manifest.json gets a linux-x64 entrypoint, and CI now also runs on ubuntu-latest.
  • make pack packs linux-x64 on Linux.
  • make release without VERSION now tags the version already in manifest.json. Both forms refuse
    a version that isn't newer than the latest release tag.

Docs

  • README, AGENTS.md, CONTRIBUTING.md and docs/adding-a-device.md cover Linux.
  • Links now point to docs.macro-deck.app and the moved release page.

Checklist

  • I have read AGENTS.md and CONTRIBUTING.md.
  • dotnet build and dotnet test pass locally (0 warnings, 251 tests).
  • I updated README.md / AGENTS.md if this changes what they describe.
  • If this touches a device backend: I tested it against the real hardware (see below).

Device/hardware tested against (if applicable)

Linux: a Razer DeathAdder V3 Pro over the dongle and the cable. The other catalog devices have not been
tried on Linux yet.

@PyFlat-JR
PyFlat-JR merged commit 6ea08b1 into main Oct 3, 2026
3 checks passed
@PyFlat-JR
PyFlat-JR deleted the feature/linux-support branch October 3, 2026 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant