Skip to content

Fix power profile synchronization and add one-click scripts#320

Open
Ishtiaqe wants to merge 1 commit into
dmitry-s93:mainfrom
Ishtiaqe:fix/power-sync-and-installer
Open

Fix power profile synchronization and add one-click scripts#320
Ishtiaqe wants to merge 1 commit into
dmitry-s93:mainfrom
Ishtiaqe:fix/power-sync-and-installer

Conversation

@Ishtiaqe

Copy link
Copy Markdown

This PR improves power profile synchronization, resolves the startup/close overwrite issues, and simplifies the build and installation process with top-level scripts.

Changes:

  1. Robust D-Bus Property Access:

    • Refactored queryPowerProfile() and queryChargerState() in PowerMonitor to use Qt's native iface.property() instead of raw D-Bus Get calls.
    • Handled variant unpacking (adding .canConvert<QDBusVariant>() checks) to ensure compatibility on different D-Bus architectures.
  2. Wildcard Signal Connections:

    • Updated D-Bus property signal connections to match any sender (passing "" service name wildcard), resolving signal delivery failures caused by unique name or alias resolution mismatches.
  3. Low-power Mode Mappings Conflict Resolution:

    • In on_PowerProfileChange, if the reported system profile is PowerSaver, it keeps either Silent or Super Battery mode if the hardware is already configured in one of those low-power modes, preventing the UI from overriding the user's manual preference.
  4. Startup Overwrite Prevention:

    • Modified loadSettings() in Operate to check if autoPPD or autoAcDc are enabled on startup. If auto-profiles are active, it skips applying the saved "UserMode" to the EC, allowing the system's power state to be checked and synchronized bidirectionally on launch.
  5. Top-level One-click Installer and Uninstaller:

    • Added install.sh and uninstall.sh at the repository root to clean, build, and deploy all binary components, system D-Bus configurations, and shortcuts in a single step.

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