Skip to content

fix(hw): a missing libusb-1.0 means no lighting, not a crash loop - #34

Merged
I4cTime merged 1 commit into
mainfrom
fix/elc-no-libusb
Nov 12, 2026
Merged

I4cTime merged 1 commit into
mainfrom
fix/elc-no-libusb

Conversation

@I4cTime

@I4cTime I4cTime commented Nov 12, 2026

Copy link
Copy Markdown
Owner

Summary

Without the system libusb-1.0, pyusb raises NoBackendError when cryod looks for the AlienFX lighting controller. That exception is a ValueError, not a USBError, so nothing caught it: cryod exited with status 1 and systemd restarted it every three seconds, forever. On a machine that is simply unsupported this also hid the real answer (exit status 78).

The lookup now treats a missing libusb as "no lighting controller", the same degraded path as a machine without the device. Lighting is unavailable until libusb is installed; everything else runs.

Type

Bug fix (hw). One file plus a test.

Checklist

  • uv run pytest -q: 138 passed (137 existing, 1 new)
  • No em dashes added

Verification

  • The new test makes usb.core.find raise NoBackendError and requires ElcNotFound, which Effects.available() already turns into "no lighting".
  • Found by installing Cryo in clean Ubuntu, Fedora and Arch containers while building the release installer: on the image without libusb the daemon crash-looped.
  • Not covered: rerunning a container install with this fix applied (the installer work lives on another branch and will pick it up once both are merged).

Breaking changes

None.

🤖 Generated with Claude Code

pyusb raises NoBackendError (a ValueError, not a USBError) when the
system libusb-1.0 is absent. Nothing caught it, so cryod exited with
status 1 and systemd restarted it forever, even on hardware it would
otherwise report as unsupported. It now reads as "no ELC", the same
degraded path as a machine without the controller.

Found while testing the release installer in clean containers.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_0137cahar5LBoYMf2fiDkt4v
@I4cTime
I4cTime merged commit 1ba5f74 into main Nov 12, 2026
1 check passed
@I4cTime
I4cTime deleted the fix/elc-no-libusb branch November 12, 2026 18:45
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