fix(asusctl): dynamically resolve D-Bus object path for Slash and XGM LED interfaces - #270
fix(asusctl): dynamically resolve D-Bus object path for Slash and XGM LED interfaces#270scardracs wants to merge 1 commit into
Conversation
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe change centralizes blocking D-Bus interface discovery in ChangesD-Bus discovery migration
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
Comment |
|
This change works, it is now possible to enable and disable the slash bar via asusctl on the G14 (GA403UI) without errors. 20260804_185532.mp4 |
|
@coderabbitai full review |
✅ Action performedFull review finished. |
105ebbd to
726f39d
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
Description
Fixes an unhandled D-Bus
UnknownInterface: Unknown interface 'xyz.ljones.Slash'error when executingasusctl slash setorasusctl slash get.Previously,
slash_cli.rsandxgm_led_cli.rsused static proxy initialization (SlashProxyBlocking::new(&conn)), which directed D-Bus method calls to a hardcoded default path (/xyz/ljones). However,asusdexportsSlashZbusdynamically under/org/asuslinux/aura/slashvia D-BusObjectManager. This causedasusctl slashcommands to fail even on supported hardware models with Slash lighting (e.g. ROG Zephyrus G14GA403), whereasrog-control-centersucceeded because it resolved the object path dynamically usingfind_iface_async.Summary of Changes:
find_iface_blocking<T>(iface_name: &str)helper function torog-dbus(synchronous counterpart tofind_iface_async).slash_cli.rsandxgm_led_cli.rsto resolve proxy object paths dynamically viafind_iface_blocking.find_ifacehelper inasusctl/src/main.rs.println!logs with structuredlog::warn!.list_iface_blocking().Fixes N/A
Tested Hardware & Environment N/A
Verification and testing:
cargo fmt --all -- --check)cargo clippy --all -- -D warnings/cargo check --all-targets)cargo test --all)cargo cranky)Closes: #269