Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to change power profile in the battery gui #365

Open
garare992 opened this issue Sep 26, 2024 · 15 comments
Open

Unable to change power profile in the battery gui #365

garare992 opened this issue Sep 26, 2024 · 15 comments

Comments

@garare992
Copy link

garare992 commented Sep 26, 2024

screenshot-2024-09-26-22-48-45

screenshot-2024-09-26-22-46-24

Nothing happens when i press battery or high performance

@garare992
Copy link
Author

I didn't have this issue when I was using the pop-os alpha iso.

@lilyinstarlight
Copy link
Owner

Can you share your NixOS configuration, especially surrounding power settings like power-profiles-daemon or system76-power?

@garare992
Copy link
Author

Can you share your NixOS configuration, especially surrounding power settings like power-profiles-daemon or system76-power?

{
  config,
  lib,
  pkgs,
  ...
}:
{
  services.desktopManager.cosmic.enable = true;
  services.displayManager.cosmic-greeter.enable = true;
  hardware.system76.enableAll = true;
  services.power-profiles-daemon.enable = false;
}

I turned off power-profiles-daemon because I read that it conflicts with system76-power.

@lilyinstarlight
Copy link
Owner

hardware.system76.enableAll = true;

I don't think you're supposed to do that on non-system76 hardware. I'll try to take a look tomorrow though

@RAVENz46
Copy link
Contributor

RAVENz46 commented Oct 2, 2024

I have a same issue when I use system76-power instead of ppd.
It requires root privilege to change power profile. Therefore, it can't be changed from applet.

@lilyinstarlight
Copy link
Owner

I turned off power-profiles-daemon because I read that it conflicts with system76-power.

Can you systemctl status system76-power to ensure that it is running?

Also can you start cosmic-settings from terminal and share terminal output after trying to set a power profile from there?

Thanks!

@garare992
Copy link
Author

I turned off power-profiles-daemon because I read that it conflicts with system76-power.

Can you systemctl status system76-power to ensure that it is running?

Also can you start cosmic-settings from terminal and share terminal output after trying to set a power profile from there?

Thanks!

screenshot-2024-10-03-07-15-36

@lilyinstarlight
Copy link
Owner

I can't tell very well because screenshots are hard to read on mobile (well and also in general), but it looks like you don't actually have a working power profiles daemon?

Can you system76-power profile from command line and copy/paste output?

@garare992
Copy link
Author

I can't tell very well because screenshots are hard to read on mobile (well and also in general), but it looks like you don't actually have a working power profiles daemon?

Can you system76-power profile from command line and copy/paste output?

the System76 power daemon is working in that screenshot.

➜ ~  systemctl status system76-power
● system76-power.service - System76 Power Daemon
     Loaded: loaded (/etc/systemd/system/system76-power.service; enabled; preset: enabled)
     Active: active (running) since Thu 2024-10-03 18:23:34 CDT; 1h 16min ago
 Invocation: 42282389c0434f078c3c919289a5ca90
   Main PID: 1082 (system76-power)
         IP: 0B in, 0B out
         IO: 2.6M read, 0B written
      Tasks: 1 (limit: 33227)
     Memory: 3.5M (peak: 4.3M)
        CPU: 2.166s
     CGroup: /system.slice/system76-power.service
             └─1082 /nix/store/c12fgplkqk6xm4z679sn161sdyhmri4i-system76-power-1.1.23/bin/system76-power daemon

Oct 03 18:23:34 nixos system76-power[1082]: [INFO] Disabling NMI Watchdog (for kernel debugging only)
Oct 03 18:23:34 nixos system76-power[1082]: [INFO] Setting automatic graphics power
Oct 03 18:23:34 nixos system76-power[1082]: [WARN] Failed to set automatic graphics power: does not have switchable gr>
Oct 03 18:23:34 nixos system76-power[1082]: [INFO] Initializing with the balanced profile
Oct 03 18:23:34 nixos system76-power[1082]: [INFO] Registering dbus name com.system76.PowerDaemon
Oct 03 18:23:34 nixos system76-power[1082]: [INFO] Adding dbus path /com/system76/PowerDaemon with interface com.syste>
Oct 03 18:23:34 nixos systemd[1]: Started System76 Power Daemon.
Oct 03 18:23:34 nixos system76-power[1082]: [ERROR] fan daemon: platform hwmon not found
Oct 03 18:23:34 nixos system76-power[1082]: [INFO] Handling dbus requests
Oct 03 18:23:34 nixos system76-power[1082]: [ERROR] hid_backlight: no system76_acpi::kbd_backlight led

in cosmic-settings, in the power and battery tab, under power mode it says: Backend not found. Install system76-power or power profiles daemon.


➜ ~  system76-power profile
Power Profile: ?
Backlight amdgpu_bl1: 255/255 = 100%
Keyboard Backlight tpacpi::kbd_backlight: 2/2 = 100%

@lilyinstarlight
Copy link
Owner

lilyinstarlight commented Oct 4, 2024

Ugh, digging in to this it looks like sys76-power is very out of date and packaged wrong in nixpkgs...

Given you aren't on system76 hardware, I'd probably still recommend going with power-profiles-daemon. But otherwise someone might need to fix this in nixpkgs first (if it wasn't packaged so wrong I could just overlay it here to update, but it's erroneously in kernelPackages for some awful and clearly incorrect reason.....)

@garare992
Copy link
Author

Ugh, digging in to this it looks like sys76-power is very out of date and packaged wrong in nixpkgs...

Given you aren't on system76 hardware, I'd probably still recommend going with power-profiles-daemon. But otherwise someone might need to fix this in nixpkgs first (if it wasn't packaged so wrong I could just overlay it here to update, but it's erroneously in kernelPackages for some awful and clearly incorrect reason.....)

Oh, I see. I hope you report it to whoever it concerns so it gets fixed. But yeah, l'll switch to power-profiles-daemon.

Since I'm not using system76 hardware, can I do without hardware.system76.enableAll = true;? Or does cosmic depend on it?

@lilyinstarlight
Copy link
Owner

lilyinstarlight commented Oct 4, 2024

Since I'm not using system76 hardware, can I do without hardware.system76.enableAll = true;? Or does cosmic depend on it?

Yeah that option is intended for system76 hardware and is not associated with cosmic at all

@lilyinstarlight
Copy link
Owner

Oh, I see. I hope you report it to whoever it concerns so it gets fixed.

It looks like there is a PR to fix it upstream that's not been touched (typical nixpkgs experience...): NixOS/nixpkgs#342921

@sjmonson
Copy link

sjmonson commented Oct 8, 2024

Oh, I see. I hope you report it to whoever it concerns so it gets fixed.

It looks like there is a PR to fix it upstream that's not been touched (typical nixpkgs experience...): NixOS/nixpkgs#342921

Hi, I'm the author of the PR. The system76-power package needs an update to work with cosmic. I've been maintaining an out-of-tree patch for it that I will try to get in as soon as that PR merges. However, I believe system76-power is hardware specific and non-system76 machines should use power-profiles-daemon.

@lilyinstarlight
Copy link
Owner

Thank you for that @sjmonson! You might find luck posting your PR to the nixpkgs review requests Matrix room or on one of the PR review requests Discourse threads

(Also, apologies nixpkgs contributions are so difficult to get reviewed and merged, and that it's so luck-based... (I've really been losing faith in nixpkgs as an upstream, despite previously being an active contributor, subsystem maintainer, and committer for years...))

@sjmonson
Copy link

sjmonson commented Oct 8, 2024

Thanks @lilyinstarlight I'll give that a go! And yeah, as someone who has contributed to other distributions before, I've found the nixpkgs experience quite lacking.

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

No branches or pull requests

4 participants