tuxedocomputers / tuxedo-control-center

A tool to help you control performance, energy, fan and comfort settings on TUXEDO laptops.
GNU General Public License v3.0
486 stars 63 forks source link

Feature request: Announce profile changes and some of their configuration through DBus #373

Open brunoais opened 3 months ago

brunoais commented 3 months ago

Note: Discussion about this happened at https://gitlab.com/tuxedocomputers/development/packages/tuxedo-drivers/-/merge_requests/8 which I will summarize what makes sense for this feature request.

What

When a profile changes, emit an event through DBus announcing just that.

Content

In the event list, ideally would be composed of:

  1. Old profile id
    1. To allow prompting for information if needed.
  2. Old profile name
  3. New profile id
  4. New profile name
  5. A set of change reason. E.g.
    1. Changed to battery
    2. Changed to mains
    3. Received through DBus (Most common way is changing the profile in the drop down menu in the tray icon)
    4. User pressed the power mode button.
  6. New system profile
  7. Screen brightness setting (or null if off)
  8. New refresh rate (or null if off)
  9. Fan profile (but not the whole parameters. Just the profile name. If the external program wants more, it needs to request separately.
  10. Number of logical CPU cores active.

Rationale

Allow programs to integrate with TCC to add extra functionality. In my case, I want to change the CPU (Including slow-limit and tctl-temp) and GPU (Including the GPU shader clock) power settings based on the tcc profile chosen, the current system profile and the time of day ("Time of day" in TCC will be requested separately).

Note I requested more information than that because people are awesome and I'm sure someone will come up with awesome ways of using that extra information for make even better integrations and automations.