Package Details: system76-power 1.1.21-2

Git Clone URL: https://aur.archlinux.org/system76-power.git (read-only, click to copy)
Package Base: system76-power
Description: System76 Power Management
Upstream URL: https://github.com/pop-os/system76-power
Licenses: GPL
Submitter: ebobby
Maintainer: tleydxdy
Last Packager: tleydxdy
Votes: 11
Popularity: 0.48
First Submitted: 2018-07-05 23:47 (UTC)
Last Updated: 2022-05-24 13:34 (UTC)

Latest Comments

tleydxdy commented on 2022-05-24 13:12 (UTC)

Yeah, sorry about this. I should have printed a warning during install. I thought Alias= would also make you be able to enable units via the name, but apparently not. only after enable does the alias start to work.

spastorino commented on 2022-05-24 12:43 (UTC) (edited on 2022-05-24 12:43 (UTC) by spastorino)

Aur packaging may need to be fixed for 1.1.21, in order to get it working I needed to:

# rm /etc/systemd/system/multi-user.target.wants/system76-power.service
# systemctl enable com.system76.PowerDaemon.service
# systemctl start com.system76.PowerDaemon.service

solarmarten commented on 2022-04-13 23:07 (UTC) (edited on 2022-04-14 12:47 (UTC) by solarmarten)

For anybody wondering how to fix this issue (Getting stuck on compute mode), check /etc/modules-load.d/, /etc/modprobe.d/, and /usr/lib/modules-load.d/ for any files that load nvidia-utils. For me, the problem was fixed by deleting nvidia-utils.conf in /usr/lib/modules-load.d/, setting the graphics back to integrated, and then rebooting.

Related GitHub issue: https://github.com/pop-os/system76-power/issues/252

Vektor82 commented on 2022-03-20 13:50 (UTC)

@hossamdash Hello, thanks for the reply. I am on pure Arch, with no other switching method. Maybe i need another package, aside from system76-power?

hossamdash commented on 2022-03-20 09:31 (UTC)

@Vektor82 if you're on manjaro ( or any distro that ships the mhwd script ) check to see if there are any files generated by that script that load the nvidia kernel module. paths to check are /etc/modules-load.d/ /usr/lib/modules-load.d/

and maybe /etc/modprobe.d/ /usr/lib/modprobe.d/

delete that file and re run the system76-power command and you should be golden

Vektor82 commented on 2022-03-19 21:19 (UTC)

For me it's not working. I am unable to switch to integrated mode. there are no errors. It simply sets integrated, and after a reboot, the laptop starts in compute mode.

echo commented on 2022-01-15 14:18 (UTC)

@tleydxdy I don't have enough of an understanding of rust to know exactly why, but it seems to be related rusts linker-plugin-lto or LLVM not working correctly with the devtools implementation. devtools probably has a flag enabled that either just breaks things or requires rust to have additional arguments to work properly. Alternatively, makechrootpkg might spawn in such a way that rust's linker is unable to find what is needed to successfully link.

The aurutils issue reference from earlier makes use of makechrootpkg, which is what the Convenience Way of Building in a clean chroot does. I did test both ways and only the classic way worked.

Sources: (Solved) Can't link any Rust program linker-plugin-lto stopped working in Rust 1.45.0 -Clinker-plugin-lto doesn't work without extra manual work Regression on nightly since LLVM 8 upgrade: thread sanitizer doesn't compile anymore

tleydxdy commented on 2022-01-07 02:42 (UTC)

@echo can you explain a little more about the issue? lto seems like a nice to have, why is it not working in this particular case?

echo commented on 2022-01-07 01:55 (UTC)

Rust fails to link (error: linking with 'cc' failed: exit status: 1) when using devtools due to lto being enabled by default. Adding options=(!lto) to PKGBUILD allows it compile.

Issue Reference

yochananmarqos commented on 2021-09-19 19:13 (UTC)

@tleydxdy: Ah, I didn't see that commit earlier.

I just built it without that just fine, odd.

tleydxdy commented on 2021-09-19 18:19 (UTC)

@yochananmarqos it is how it was done upstream, this is just a temporary hack before they make the next release. 1.1.18 has a mistake in it and won't actually build

yochananmarqos commented on 2021-09-19 18:16 (UTC)

@tleydxdy: Why are you specifying a static toolchain version? Just use:

export RUSTUP_TOOLCHAIN=stable

See Rust package guidelines

tleydxdy commented on 2021-06-20 08:13 (UTC)

@hossamdash pushed a fix

hossamdash commented on 2021-06-19 23:13 (UTC)

@tleydxdy yes i just checked out the commit that was 7 weeks ago and installed it. it works fine and the service starts without any problems.

tleydxdy commented on 2021-06-19 22:44 (UTC)

@hossamdash does reverting back to the old package fixes it? did you reboot? it does read like a transient issue looks similar to, nothing substantial changed in the package afaik.

hossamdash commented on 2021-06-19 22:12 (UTC)

can confirm that this package is no longer working for me after upgrade to this latest version 1.1.16.4 here's what i get when i try to start the system76-power.service via doas systemctl status system76-power.service

Job for system76-power.service failed because the control process exited with error code.
See "systemctl status system76-power.service" and "journalctl -xeu system76-power.service" for details.

and here's the output of systemctl status system76-power.service

× system76-power.service - System76 Power Daemon
     Loaded: loaded (/usr/lib/systemd/system/system76-power.service; disabled; vendor preset: disabled)
     Active: failed (Result: exit-code) since Sun 2021-06-20 00:10:32 EET; 20s ago
    Process: 10187 ExecStart=/usr/bin/system76-power daemon (code=exited, status=1/FAILURE)
   Main PID: 10187 (code=exited, status=1/FAILURE)
        CPU: 29ms

Jun 20 00:10:32 arch-boii systemd[1]: system76-power.service: Scheduled restart job, restart counter is at 5.
Jun 20 00:10:32 arch-boii systemd[1]: Stopped System76 Power Daemon.
Jun 20 00:10:32 arch-boii systemd[1]: system76-power.service: Start request repeated too quickly.
Jun 20 00:10:32 arch-boii systemd[1]: system76-power.service: Failed with result 'exit-code'.
Jun 20 00:10:32 arch-boii systemd[1]: Failed to start System76 Power Daemon.

kucksdorfs commented on 2021-06-19 22:11 (UTC)

My bad... I updated my my comment below with the text tag.

yochananmarqos commented on 2021-06-19 21:32 (UTC) (edited on 2021-06-19 21:33 (UTC) by yochananmarqos)

@kucksdorfs: That's really hard to read. Markdown is supported here (sort of). You can use three bacticks to format terminal output:

```

text

```

kucksdorfs commented on 2021-06-19 21:30 (UTC) (edited on 2021-06-19 22:01 (UTC) by kucksdorfs)

@yochananmarqos, I ran that and rebooted a few times.

When I did the upgrade, yay told me there were some merge conflicts, so I had it do a clean build (rm -rf the directory and does a fresh git clone).

Below are results of systemctl status and the full journalctl.

> systemctl status system76-power.service 
× system76-power.service - System76 Power Daemon
     Loaded: loaded (/usr/lib/systemd/system/system76-power.service; enabled; vendor preset: disabled)
     Active: failed (Result: exit-code) since Sat 2021-06-19 14:52:46 CDT; 1h 33min ago
   Main PID: 1205 (code=exited, status=1/FAILURE)
        CPU: 53ms

Jun 19 14:52:46 laptop systemd[1]: system76-power.service: Scheduled restart job, restart counter is at 5.
Jun 19 14:52:46 laptop systemd[1]: Stopped System76 Power Daemon.
Jun 19 14:52:46 laptop systemd[1]: system76-power.service: Start request repeated too quickly.
Jun 19 14:52:46 laptop systemd[1]: system76-power.service: Failed with result 'exit-code'.
Jun 19 14:52:46 laptop systemd[1]: Failed to start System76 Power Daemon.
>sudo journalctl -xeu system76-power.service
Jun 19 14:52:46 laptop system76-power[1205]: [INFO] 0000:01:00.0: Removing
Jun 19 14:52:46 laptop system76-power[1205]: [INFO] 0000:01:00.3: Removing
Jun 19 14:52:46 laptop system76-power[1205]: [INFO] 0000:01:00.1: Removing
Jun 19 14:52:46 laptop system76-power[1205]: [INFO] Initializing with the balanced profile
Jun 19 14:52:46 laptop system76-power[1205]: [INFO] Registering dbus name com.system76.PowerDaemon
Jun 19 14:52:46 laptop system76-power[1205]: Connection ":1.25" is not allowed to own the service "com.system76.PowerDaemon" due to security policies in the configuration file
Jun 19 14:52:46 laptop systemd[1]: system76-power.service: Main process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ An ExecStart= process belonging to unit system76-power.service has exited.
░░ 
░░ The process' exit code is 'exited' and its exit status is 1.
Jun 19 14:52:46 laptop systemd[1]: system76-power.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ The unit system76-power.service has entered the 'failed' state with result 'exit-code'.
Jun 19 14:52:46 laptop systemd[1]: Failed to start System76 Power Daemon.
░░ Subject: A start job for unit system76-power.service has failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ A start job for unit system76-power.service has finished with a failure.
░░ 
░░ The job identifier is 1815 and the job result is failed.
Jun 19 14:52:46 laptop systemd[1]: system76-power.service: Scheduled restart job, restart counter is at 5.
░░ Subject: Automatic restarting of a unit has been scheduled
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ Automatic restarting of the unit system76-power.service has been scheduled, as the result for
░░ the configured Restart= setting for the unit.
Jun 19 14:52:46 laptop systemd[1]: Stopped System76 Power Daemon.
░░ Subject: A stop job for unit system76-power.service has finished
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ A stop job for unit system76-power.service has finished.
░░ 
░░ The job identifier is 1947 and the job result is done.
Jun 19 14:52:46 laptop systemd[1]: system76-power.service: Start request repeated too quickly.
Jun 19 14:52:46 laptop systemd[1]: system76-power.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ The unit system76-power.service has entered the 'failed' state with result 'exit-code'.
Jun 19 14:52:46 laptop systemd[1]: Failed to start System76 Power Daemon.
░░ Subject: A start job for unit system76-power.service has failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ A start job for unit system76-power.service has finished with a failure.
░░ 
░░ The job identifier is 1947 and the job result is failed.

yochananmarqos commented on 2021-06-19 21:21 (UTC)

@Kucksdorfs: I can't reproduce that. Did you restart the service after updating? Nothing really changed. Sometimes systemctl daemon-reload might be necessary as well.

kucksdorfs commented on 2021-06-19 20:01 (UTC)

I just upgraded this package and now it fails to start system76-power.service.

I get the following when I run journalctl -xeu system76-power.service:

"system76-power[1205]: Connection ":1.25" is not allowed to own the service "com.system76.PowerDaemon" due to security policies in the configuration file"

There are other lines, but that seems the most relevant.

tleydxdy commented on 2021-06-19 03:39 (UTC)

@yochananmarqos good question, I guess the PKGBUILD was originally written when the Makefile is not there or something. fixed

yochananmarqos commented on 2021-06-15 18:02 (UTC) (edited on 2021-06-15 18:03 (UTC) by yochananmarqos)

@tleydxdy: Why not just use the Makefile?

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  make sysconfdir=/usr/lib DESTDIR="${pkgdir}" install
}

tleydxdy commented on 2021-04-30 01:42 (UTC)

@nox404 good catch, thanks! I can add you to the co-maintainer list, I think more people with different devices might be helpful, I only have a galp3 :(

changes are pushed

yochananmarqos commented on 2021-04-29 20:17 (UTC)

@nox404: Nice catch, I missed that. it would follow that polkit is a required dependency as well.

nox404 commented on 2021-04-29 18:43 (UTC) (edited on 2021-04-29 19:00 (UTC) by nox404)

Hello,

The package doesn't install the polkit policy to /usr/share/polkit-1/actions/com.system76.powerdaemon.policy

https://raw.githubusercontent.com/pop-os/system76-power/master/data/com.system76.powerdaemon.policy

The set-charge-thresholds function cannot work without it

You can add this to the PKGBUILD to implement this:

install -Dm755 data/com.system76.powerdaemon.policy "${pkgdir}/usr/share/polkit-1/actions/com.system76.powerdaemon.policy"

Also I'd love to get pointers on how to directly contribute and submit a PR to this or something like that (never packaged anything on arch :P )

mikisman81 commented on 2021-04-22 17:20 (UTC)

This works great even as a stand alone package (without the other S76) for my Lemur and Darter Pro.

After installing make sure of 2 things.

  1. Your user is in the admin group (sudo gpasswd -a $USER adm)

  2. That you have started the system76-power service (sudo systemctl enable --now system76-power)

Might need to reboot, but you should be great. You can test it by dropping to a terminal and doing "system76-power profile"

prodper commented on 2021-03-16 12:46 (UTC) (edited on 2021-03-16 13:02 (UTC) by prodper)

I've installed all deps and optional deps. And also did all necessary from arch wiki: https://wiki.archlinux.org/index.php/NVIDIA_Optimus#Use_NVIDIA_graphics_only

But sudo system76-power graphics integrated doesn't switch off nvidia gpu. It enables compute mode.

What did I miss? Or there are more dependencies that not listed in depends?

yochananmarqos commented on 2021-02-28 15:23 (UTC)

@wfleming: The Pop_OS! package depends on ubuntu-drivers-common which includes usb-utils (libusb).

namcap also agrees:

system76-power I: Link-level dependence (libusb) in file ['usr/lib/libusb-1.0.so.0']
system76-power I: Depends as namcap sees them: depends=(dbus libusb)

wfleming commented on 2021-02-27 22:32 (UTC)

Should libusb be listed as a dependency in the PKGBUILD? I use aurto for managing my aur packages and aurto add system76-power errors saying it can't find libusb:

  thread 'main' panicked at 'Unable to find libusb-1.0: "`\"pkg-config\" \"--libs\" \"--cflags\" \"libusb-1.0\"` did not exit successfully: exit code: 1\n--- stderr\nPackage libusb-1.0 was not found in the pkg-config search path.\nPerhaps you should add the directory containing `libusb-1.0.pc\'\nto the PKG_CONFIG_PATH environment variable\nPackage \'libusb-1.0\', required by \'virtual:world\', not found\n"', /build/.cargo/registry/src/github.com-1ecc6299db9ec823/hidapi-1.2.5/build.rs:65:60

My understanding is that aurto builds packages in a chroot where it only installs necessary packages, so this is easy to miss since I bet a lot of people do generally have libusb installed already.

tleydxdy commented on 2021-02-17 02:05 (UTC)

Sorry, I was having build issues on my machine. btw, I am wondering if system76-acpi-dkms and system76-io-dkms should be listed as optdepends, and if I should move system76-dkms to optdepends, I seems like what is required differ by machine model, but I have yet to find out if this is the case one way or the other.

yochananmarqos commented on 2021-02-16 23:38 (UTC)

@tleydxdy: Are you planning on updating this? I'll take it over if you'd like.

acbaracuda commented on 2021-02-16 20:43 (UTC)

Is "system76-acpi-dkms" or the "acpi" package from the oficial repos needed for this to fully shut down the nvidia graphics card on a non system76 laptop? I know optimus manager uses bbswitch or acpi. I thought maybe this requires something similar.

yochananmarqos commented on 2021-01-11 02:07 (UTC) (edited on 2021-01-11 02:07 (UTC) by yochananmarqos)

@cvolton: No, it shouldn't.

Note: Packages in the AUR assume that the base-devel group is installed, i.e. they do not list the group's members as build dependencies explicitly.

https://wiki.archlinux.org/index.php/Arch_User_Repository#Prerequisites

cvolton commented on 2021-01-11 01:41 (UTC)

Also on an unrelated note I believe pkgconfig should be added to the make dependencies, as it is not included in a base Arch install, yet it is required to compile the package

cvolton commented on 2021-01-11 01:25 (UTC)

So the GPU switching almost works correctly for me... I only use the intel and nvidia modes, I do not tend to use the hybrid mode as it is mostly useless for my use case. However, for some reason, the systemd service just disables power to the nvidia device during boot, which causes my laptop to boot in intel mode even if I set it to nvidia. What I have to do is system76-power graphics power on; modprobe nvidia and then reinitialize my x session. When that is done, my X session is fully running on NVIDIA. Which is good enough for my use case but it is still odd behavior.

tleydxdy commented on 2020-06-11 06:42 (UTC) (edited on 2020-06-11 06:45 (UTC) by tleydxdy)

Unless someone could port over the gpu-manager. Which doesn't seem hard, I just doesn't have a NVIDIA hybrid computer to test this on. I don't think messing with people's X11 config in a hacky way would be a great idea. I've added a note when installing the package to mention this issue. If there's something I missed please let me know.

Also, even if gpu-manager is ported, I'm not sure if it should be set as a dependency, since non NVIDIA users have no use for it (it seems)

alex404 commented on 2020-06-10 20:38 (UTC) (edited on 2020-06-10 20:41 (UTC) by alex404)

I couldn't get gpu switching on my Adder WS to work properly until I added the X11 config file described here.

According to the system76-power maintainer system76-power relies on gpu-manager provided by Ubuntu to generate these configs. It would be nice if there'd be a way to generate the appropriate configs for this package too.

Edit: I see others have already pointed this out. Anyway, maybe investigating gpu-manager would point to a general solution.

tachyon commented on 2020-02-24 10:29 (UTC)

@jcsanyi I tried what you suggested it did not work. The intel mode works perfectly but nvidia mode does not. Somehow /etc/X11/xorg.conf.d/10-nvidia-drm-outputclass.conf got removed on reboot or mode switching!

In intel mode, I verified that the nvidia card is powered down, as there is no entry related to nvidia card in the output of powertop. In the nvidia mode I can see that nvidia card is powered on, in the powertop output but glxinfo | grep -i "OpenGL renderer" shows:

OpenGL renderer string: Mesa DRI Intel(R) UHD Graphics 630 (Coffeelake 3x8 GT2)

Also I could not launch nvidia-settings in nvidia mode.

jcsanyi commented on 2020-02-15 20:16 (UTC)

@tachyon - This works for me with the standard nvidia drivers. I'm on a current gazelle (gaze14) laptop.

[jcsanyi@salem ~]$ pacman -Q | grep 'nvidia\|system76'
gnome-shell-extension-system76-power-git 1.2.0.r4.gf9f05fb-1
nvidia 440.59-7
nvidia-utils 440.59-1
system76-acpi-dkms 1.0.1-1
system76-dkms 1.0.6-1
system76-driver 19.10.2-1
system76-firmware-daemon 1.0.7-1
system76-io-dkms 1.0.1-1
system76-power 1.1.3-1

Make sure you've added the PrimaryGPU configuration option described here: https://wiki.archlinux.org/index.php/NVIDIA_Optimus#Use_NVIDIA_graphics_only

It's not well documented, and broke sometime in the last few months. See here for more details: https://bbs.archlinux.org/viewtopic.php?id=251846

tachyon commented on 2020-02-15 19:31 (UTC)

Can someone tell me which graphics driver to use to make it work? Right now only switching to intel works. But switching to nvidia does not work without prime. In prime mode I can only run individual applications on nvidia card but cannot drive the entire display. So basically my external HDMI and display ports are useless now.

jcsanyi commented on 2019-11-07 18:04 (UTC)

Works perfectly for me now, thanks!

tleydxdy commented on 2019-11-06 21:07 (UTC) (edited on 2019-11-06 21:45 (UTC) by tleydxdy)

done, I have made it so it does not requre git anymore (downloads tar.gz instead), and also added a patch. Please see if it works now.

jcsanyi commented on 2019-11-06 18:22 (UTC)

I was unable to build this package (in a clean env) until I added 'git' to the 'makedepends' list. Can you update the PKGBUILD?

jcsanyi commented on 2019-11-06 18:11 (UTC)

When changing the graphics mode, the daemon updates the mod configs, and then tries to run "update-initramfs -u" to rebuild the initram. On arch, this command does not exist, and the functionality is provided by mkinitcpio instead.

As a temporary workaround, I created a shell script named "update-initramfs" that's just hard-coded to call "mkinitcpio -P", and it now works as intended... but this is a rather unsafe hack, as it completely ignores the parameters passed to the update-initramfs command.

Is this something we should/could be patching as part of the PKGBUILD? It looks like a fairly simple change here: https://github.com/pop-os/system76-power/blob/master/src/graphics.rs#L298

464270342 commented on 2019-06-20 09:48 (UTC)

When I run "system76-power graphics"

It returns:

daemon returned an error message: "The name com.system76.PowerDaemon was not provided by any .service files"

How to deal with this problem?

shalzz commented on 2018-12-18 07:58 (UTC) (edited on 2018-12-18 08:02 (UTC) by shalzz)

Hi, This does not seem to work with dbus-broker. Trying to change the profile does not work. This is the log I see while trying to change the profile: dbus-broker[626]: A security policy denied :1.164 to send method call /com/system76/PowerDaemon:com.system76.PowerDaemon.Battery to :1.13289.

I have an issue created upstream and they think it might be related to the dbus policy file.