Skip to content

chore: replace crates.io logind-zbus with trimmed in-tree client - #442

Open
scardracs wants to merge 2 commits into
OpenGamingCollective:mainfrom
scardracs:chore/vendor-logind-zbus
Open

scardracs wants to merge 2 commits into
OpenGamingCollective:mainfrom
scardracs:chore/vendor-logind-zbus

Conversation

@scardracs

@scardracs scardracs commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add a workspace logind-zbus crate with only the org.freedesktop.login1.Manager surface used by asusd and asus-shutdown (inhibit, lid/power properties, prepare-for-shutdown/sleep signals).
  • Point the workspace dependency at the path crate instead of the unmaintained crates.io release, so we can evolve the binding (including a future zbus 6 bump) in-tree.
  • Flatten the public API to the crate root (logind_zbus::{InhibitType, ManagerProxy}).

Rationale

logind-zbus has been abandoned by @flukejones and it's not compatible with future versions of zbus (6+). As we don't need the full code but a small part of it it's better to pick it up ourselves and update alongside the rest of the package instead of waiting for the crate version.

Test plan

  • cargo check -p logind-zbus -p asusd -p asus-shutdown
  • CI build / audit jobs green
  • Smoke: asusd lid/AC handling and asus-shutdown inhibit still talk to logind

Replace the crates.io dependency with a workspace crate that only
exposes the Manager methods asusd and asus-shutdown use, so the
binding can track zbus without an unmaintained upstream release.

Signed-off-by: Marco Scardovi <scardracs@disroot.org>
Drop the unused manager module path so callers import InhibitType and
ManagerProxy directly from logind_zbus.

Signed-off-by: Marco Scardovi <scardracs@disroot.org>
@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: d887f743-7e76-494e-a2d9-6bf1056ec2b0
Commits

Reviewing files that changed from the base of the PR and between f537fca and 1cf486a.

Files ignored due to path filters: 1
  • Cargo.lock is excluded by !**/*.lock
Files selected for processing: 7
  • Cargo.toml
  • asus-shutdown/src/main.rs
  • asusd/src/aura_anime/trait_impls.rs
  • asusd/src/aura_laptop/mod.rs
  • asusd/src/lib.rs
  • logind-zbus/Cargo.toml
  • logind-zbus/src/lib.rs

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.

Recent review details
Context from checks skipped due to timeout: 3
  • GitHub Check: CodeRabbit
  • GitHub Check: cargo build --workspace (Ubuntu / rustc 1.93)
  • GitHub Check: cargo audit (Debian 13 / rustc 1.93)
Additional comments: 6
logind-zbus/Cargo.toml: 1

1-16: LGTM!

logind-zbus/src/lib.rs: 1

9-105: LGTM!

Cargo.toml: 1

33-33: LGTM!

Also applies to: 54-54

asus-shutdown/src/main.rs: 1

11-11: LGTM!

asusd/src/aura_anime/trait_impls.rs: 1

5-5: LGTM!

asusd/src/lib.rs: 1

25-25: LGTM!

Summary

Summary by CodeRabbit

  • Chores
    • Updated the app’s integration with system power-management services. Existing behavior remains unchanged.
    • No user-facing features or behavior changes are included in this update.

The workspace now uses a local logind-zbus package. The package defines InhibitType and a proxy for the login1 Manager interface. Existing consumers import ManagerProxy and InhibitType from the crate root.

Changes: logind-zbus integration

Layer / File(s) Summary
Define the local logind-zbus API
logind-zbus/Cargo.toml, logind-zbus/src/lib.rs
Adds the package manifest, InhibitType string conversions and serialization, and the login1 Manager proxy with inhibition, properties, and preparation signals.
Wire workspace and consumers
Cargo.toml, asus-shutdown/src/main.rs, asusd/src/aura_anime/trait_impls.rs, asusd/src/lib.rs, asusd/src/aura_laptop/mod.rs
Adds logind-zbus to the workspace and uses the crate-root exports in consumer imports. The aura_laptop change does not alter behavior.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Refactor

Suggested labels: asusd

Suggested reviewers: neroreflex, ghoul4500

Merge Risk: Minimal · up to 1cf48

The local client replacement has no identified merge-blocking issue.

Pre-merge checks: Passed 4
Check name Status Explanation
Title check Passed The title clearly identifies the primary change: replacing the crates.io dependency with a trimmed in-tree client.
Description check Passed The description provides a clear summary, rationale, and test plan. It does not include the requested hardware and environment details, issue reference, or complete verification checklist, but it is m…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description provides a clear summary, rationale, and test plan. It does not include the requested hardware and environment details, issue reference, or complete verification checklist, but it is mostly complete and directly related to the changes.

Warning

Some tools did not complete. Review the errors below.

Clippy (1.99.0)

Clippy execution failed

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@coderabbitai coderabbitai Bot added the asusd System Daemon / D-Bus label Nov 2, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

asusd System Daemon / D-Bus

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant