Skip to content

Feature/system76 power integration#313

Open
mati-fp wants to merge 1 commit into
dmitry-s93:mainfrom
mati-fp:feature/system76-power-integration
Open

Feature/system76 power integration#313
mati-fp wants to merge 1 commit into
dmitry-s93:mainfrom
mati-fp:feature/system76-power-integration

Conversation

@mati-fp

@mati-fp mati-fp commented Apr 10, 2026

Copy link
Copy Markdown
  • Add system76-power daemon as a power profile backend for the "Follow system's power profile" feature
  • system76-power is prioritized over PPD when both are available, falling back to PPD if system76-power is not found
  • Complete pt_BR translation (80/80 strings)

Additionally, system76-power registers a PPD compatibility layer on D-Bus (net.hadess.PowerProfiles), which made connectToPowerProfiles() succeed — but the compatibility layer does not emit PropertiesChanged signals when the profile changes, so the shift mode was never updated. That's why I added native system76-power D-Bus integration via com.system76.PowerDaemon service, listening to the PowerProfileSwitch signal, then changed the connection priority: try system76-power first (native), then fall back to PPD

  • Profile mapping: Performance → High Performance, Balanced → Balanced, Battery → Super Battery

Changes

  • src/powermonitor.h — Added system76-power methods and slot declarations
  • src/powermonitor.cpp — Implemented connect/disconnect/query/signal handler/parser for system76-power
  • src/mainwindow.cpp — Prioritize system76-power over PPD, added disconnect calls
  • src/i18n/MControlCenter_pt_BR.ts — Completed pt_BR translation (80/80 strings)

@mati-fp

mati-fp commented Apr 10, 2026

Copy link
Copy Markdown
Author

I tried to keep the pattern made with the PPD, when creating the backend for the system76-power. Reason for me to do this PR was I LOVED the ideia of automatics switches in the MSI User Mode when the Power Profile is changed. I'm not using PPD (of course kk) so if someone with PPD wants to make a feedback if still working in your system, great!

@mutchiko , tried to not break nothing you did.

@mutchiko

mutchiko commented Apr 24, 2026

Copy link
Copy Markdown
Collaborator

the compatibility layer does not emit PropertiesChanged

maybe you should tell them to add it, since they are trying to replace PPD they could at least try to replicate it's behavior

@mutchiko

mutchiko commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

can you at least make a separate PR for the translation? since different from the main idea of this PR

@mati-fp

mati-fp commented Jul 9, 2026

Copy link
Copy Markdown
Author

Yes, i can do that.

The 'Follow system's power profile' option now tries the native
com.system76.PowerDaemon D-Bus interface first and falls back to
Power Profiles Daemon/TuneD when system76-power is not available.
Translation catalogs refreshed with lupdate.
@mati-fp mati-fp force-pushed the feature/system76-power-integration branch from fe72148 to 4991c90 Compare July 9, 2026 03:43
@mati-fp

mati-fp commented Jul 9, 2026

Copy link
Copy Markdown
Author

Hi! I've reworked the branch into a single clean commit — could you take a look and let me know if it's good now?

A note on the translation files: although 16 .ts catalogs show up as modified, this PR doesn't actually add any translations. The changes are just the output of running lupdate to sync the catalogs with the source code:

  • the new source string introduced by this PR ("Couldn't connect to a power profile service…") is added to every catalog as an untranslated type="unfinished" placeholder;
  • two obsolete entries whose source text no longer exists in the code (the old "…restart the app." messages) are removed;
  • a few strings from Charger Detection + PPD Integration #307 that had never been synced into the non-English catalogs ("Follow system's power profile", "On Charger:", "On Battery:", …) are picked up, also as untranslated placeholders.

The only real translation included is the pt_BR entry for the new error message, since that string is introduced by this PR. I'll submit the full pt_BR catalog update as a separate PR to keep this one focused on the system76-power integration.

@mati-fp mati-fp changed the title Feature/system76 power integration and complete pt_BR translation Feature/system76 power integration Jul 9, 2026
@mutchiko

mutchiko commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Looking at this PR again, you should fix the system76-power compatibility layer instead of fixing this app. also we cannot implement methods for each power management solution on linux. PPD protocol is the main one, if others expose compatibility layers, they should behave like the original and send PropertiesChanged signal, just like how tuned-PPD layer does.

So i highly recommend that you open an issue there and tell them about it, you can even link to this repo as a proof.

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.

2 participants