Purism power optimisations service fails after recent update

So, I installed a large batch of PureOS updates yesterday, and when I booted today I noticed that as soon as I plugged in the power cable my Librem 13v3’s fan started revving up and wouldn’t turn off until I disconnected the power cable and restarted.

I’ve seen other threads discussing the fan issue, but it had never affected my Librem until now (still on Coreboot 4.6). I checked my logs and found the culprit:

“purism-power-optimisations.service: Failed at step EXEC spawning /usr/lib/pureos-power-optimisations/apply: No such file or directory”

“Failed to start Power/battery optimisations for Purism devices.”

I check my logs fairly regularly and have never had this error previously, and have never had the issue of the fan running wild. Any ideas for a fix?

1 Like

I have not been following the issues, but I noticed a few items in Phabricator related to this package. You may want to start here, even though there is no detailed information in the text. The item mentions that package being removed?

Not having used Linux regularly for quite a while may i ask if you could give infos on how to find the logs you mentioned (filename)? Would like to digg a bit deeper into that topic as i had fan-issues, too. Thanks in advance.

Seeing the same issue as @thegoat (thanks for reporting).

@ajlok Logs are in the X-Gnome-Utilities folder in your PureOS list of applications. Lots of helpful info in there.

@jonatack Glad I’m not the only one seeing this. Rebooted a few times and haven’t had the fan issue since, so they could be unrelated. Still seeing the error messages tho.

@thegoat can’t find anything regarding “X-Gnome-Utilities” folder - not within my librem, nor searching google. closest might have been an app called (german) “Protokolle” - but it shuts down when i try to choose an option.

can you provide a path or something like that to shed a bit more light on it? thanks in advance.

@ajlok Are you using GNOME on PureOS? If so, click the Activities button in the upper left side of your screen, then hit Show Applications at the bottom. On the second page of apps (depending on how many you have installed), you should see the X-Gnome-Utilities folder. Logs is inside.

same issue with my 13v2 since upgrade. will try rebbot and see if that clears it.

yep, re-booted and its all calmed down. Thanks @jonatack and @thegoat

@thegoat Found it. Also had it before. But wasn’t able to realize as it always breaks down. If i choose one of the lefthand-options the whole window is suddenly gone. But thanks for pointing me into the right direction.

I’m still getting some strange behavior even after a few reboots. I’ve definitely noticed a decrease in battery life since this update, and when my laptop is plugged in, the fan runs on high all the time. Here’s the result from journalctl -xe ;

Jun 24 11:26:06 CLANK systemd[1]: Starting Power/battery optimisations for Purism dev
– Subject: Unit purism-power-optimisations.service has begun start-up
– Defined-By: systemd
– Support: https://www.debian.org/support

– Unit purism-power-optimisations.service has begun starting up.
Jun 24 11:26:06 CLANK systemd[11045]: purism-power-optimisations.service: Failed to e
Jun 24 11:26:06 CLANK systemd[11045]: purism-power-optimisations.service: Failed at s
– Subject: Process /usr/lib/pureos-power-optimisations/apply could not be executed
– Defined-By: systemd
– Support: https://www.debian.org/support

– The process /usr/lib/pureos-power-optimisations/apply could not be executed and fa

– The error number returned by this process is 2.
Jun 24 11:26:06 CLANK systemd[1]: purism-power-optimisations.service: Main process ex
Jun 24 11:26:06 CLANK systemd[1]: purism-power-optimisations.service: Failed with res
Jun 24 11:26:06 CLANK systemd[1]: Failed to start Power/battery optimisations for Pur
– Subject: Unit purism-power-optimisations.service has failed
– Defined-By: systemd
– Support: https://www.debian.org/support

– Unit purism-power-optimisations.service has failed.

– The result is RESULT.

Hi,

brief question to the people affected in this thread. I just
started a possibly related thread ‘Fan full blast after sleep …’
(Fan full blast after sleep, coreboot and Intel ME), and it’s not fully clear whether the two things are
the same: Could you check the frequency at which your CPU
runs. When my fan goes haywire, the CPU runs at the lowest
possible clock speed (400MHz), regardless whether there is
load or not.

(cat /proc/cpuinfo | head # check for 'cpu MHz)

If things are normal, I see values between 900 Mhz to 2.5 GHz,
depending on what I do)

Thanks,

Stefan

Can confirm fan locking on and cpu being stuck at 400Mhz after resuming from suspend with power plugged in. If I suspend, remove power, and then resume the cpu is running at 1600MHz and fan is quiet.

Dito. Same here. 400Mhz - cat /proc/cpuinfo | head # check for ‘cpu MHz’, but without power plugged in.

  • CPU Mhz @ 400
  • htop showing all 4 cores close to 100%

sending it to sleep again, i receive

  • no fan
  • 1.699 MHz
  • all cores close to zero

I was able to replicate exactly the same thing with my Librem 13 that ajlok found

Yeah, I’ll drop the idea that it’s connected to being on ac vs battery power. I’ve experienced the issue a few times regardless of the power situation and cycling it through suspend/resume seems to fix it most times.

OK, so the CPU frequency issue is confirmed – this was reported
on yet another thread, where I got the idea in the first place.

Question: has Purism taken note of the issue? Has anyone reported
an issue / opened a support ticket? I grant them that this may be the fallout from some kernel regressions etc.; on the other hand, they control both the software and hardware; it also seems like something that is easy to reproduce on the newer Librems.

Thanks,

Stefan

I’m seeing the following in /var/log/boot.log:

[FAILED] Failed to start Power/battery optimisations for Purism devices.
See 'systemctl status purism-power-optimisations.service' for details.

Doing that:

root@melanobombus:/home/alex# systemctl status purism-power-optimisations.service
● purism-power-optimisations.service - Power/battery optimisations for Purism devices
   Loaded: loaded (/lib/systemd/system/purism-power-optimisations.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Thu 2018-08-02 16:27:34 CEST; 32s ago
     Docs: https://source.puri.sm/pureos/packages/purism-power-optimisations
  Process: 713 ExecStart=/usr/lib/pureos-power-optimisations/apply (code=exited, status=203/EXEC)
 Main PID: 713 (code=exited, status=203/EXEC)

Aug 02 16:27:34 melanobombus systemd[1]: Starting Power/battery optimisations for Purism devices...
Aug 02 16:27:34 melanobombus systemd[713]: purism-power-optimisations.service: Failed to execute command: No such file or directory
Aug 02 16:27:34 melanobombus systemd[713]: purism-power-optimisations.service: Failed at step EXEC spawning /usr/lib/pureos-power-optimisations/apply: No such file or directory
Aug 02 16:27:34 melanobombus systemd[1]: purism-power-optimisations.service: Main process exited, code=exited, status=203/EXEC
Aug 02 16:27:34 melanobombus systemd[1]: purism-power-optimisations.service: Failed with result 'exit-code'.
Aug 02 16:27:34 melanobombus systemd[1]: Failed to start Power/battery optimisations for Purism devices.

I’ll note that I have /usr/lib/purism-power-optimisations/purism-power-optimisations but nothing like the path mentioned in the message above:

$ sudo ls /usr/lib/pureos*
ls: cannot access '/usr/lib/pureos*': No such file or directory

This is a Librem 13v2, I think. This doesn’t seem to affect my fan. I don’t seem to notice anything negative at all, actually. It’s just that error message while booting.

1 Like

I decided to investigate. First, find the file name:

# systemctl list-unit-files purism-power-optimisations.service
...
# locate purism-power-optimisations
/etc/systemd/system/multi-user.target.wants/purism-power-optimisations.service
...

Checking it out:

# grep -i exec /etc/systemd/system/multi-user.target.wants/purism-power-optimisations.service
ExecStart=/usr/lib/pureos-power-optimisations/apply

OK, so that’s the file it wants to start, which doesn’t exist on my system!

# ls /usr/lib/pureos*
ls: cannot access '/usr/lib/pureos*': No such file or directory

I wonder whether the simple thing we need to do is change that line and use /usr/lib/purism-power-optimisations/purism-power-optimisations instead. If I run it:

# /usr/lib/purism-power-optimisations/purism-power-optimisations 
vm.dirty_writeback_centisecs = 6000
modprobe cpufreq_stats failedLoaded 217 prior measurements
RAPL device for cpu 0
RAPL Using PowerCap Sysfs : Domain Mask f
RAPL device for cpu 0
RAPL Using PowerCap Sysfs : Domain Mask f
Devfreq not enabled
To show power estimates do 8 measurement(s) connected to battery only
Leaving PowerTOP

I have no idea if this is what we want to do. On the last line, it calls powertop --auto-tune. That doesn’t sound too bad! :slight_smile:

What do you think?

OK, so now I’m wondering where this error originates. I have a file on the disk and a different file that is wanted. Let’s look at the packages involved.

# dpkg -S /usr/lib/purism-power-optimisations/purism-power-optimisations 
purism-power-optimisations: /usr/lib/purism-power-optimisations/purism-power-optimisations
root@melanobombus:/home/alex# apt show purism-power-optimisations
Package: purism-power-optimisations
Version: 0.5.0
Priority: optional
Section: misc
Source: purism-device-config
Maintainer: PureOS Developers <pureos-project@lists.puri.sm>
Installed-Size: 425 kB
Depends: dmidecode, iw, powertop
Homepage: https://source.puri.sm/pureos/packages/purism-device-config
Download-Size: 11.8 kB
APT-Manual-Installed: no
APT-Sources: https://repo.puri.sm/pureos green/main amd64 Packages
Description: Power/battery optimisations for Purism devices
 Installing this package will apply a number of power/battery optimisationson
 system start.
 .
 Purism laptops are specifically detected; installing this package on a
 non-Purism device will succeed but will do nothing at boot time.

OK, perhaps I can just reinstall this package and it’ll fix itself?

root@melanobombus:/home/alex# apt install --reinstall purism-power-optimisations
...
Setting up purism-power-optimisations (0.5.0) ...
Job for purism-power-optimisations.service failed because the control process exited with error code.
See "systemctl status purism-power-optimisations.service" and "journalctl -xe" for details.

Same problem!

So how about the systemd service?

# for f in $(locate purism-power-optimisations.service); do dpkg -S $f; done
dpkg-query: no path found matching pattern /etc/systemd/system/multi-user.target.wants/purism-power-optimisations.service
purism-power-optimisations: /lib/systemd/system/purism-power-optimisations.service
dpkg-query: no path found matching pattern /var/lib/systemd/deb-systemd-helper-enabled/purism-power-optimisations.service.dsh-also
dpkg-query: no path found matching pattern /var/lib/systemd/deb-systemd-helper-enabled/multi-user.target.wants/purism-power-optimisations.service

OK, so /lib/systemd/system/purism-power-optimisations.service is the file that’s provided by the same package. This should match. So, does it have the right ExecStart in there? Nope:

# grep -i exec /lib/systemd/system/purism-power-optimisations.service
ExecStart=/usr/lib/pureos-power-optimisations/apply

Still the wrong target. This is a bug in purism-power-optimisations and I’m going to file a bug.

3 Likes