This Time Self-Hosted
dark mode light mode Search

Laptop policies on a workstation

As I bought the new UPS, I now have quite some time to work with it while I’m without power, as the two UPSes can keep the system online for about one hour without any kind of interruptions, included network access. This is quite nice, but there is one thing I was thinking of today…

When the workstations are running on UPS’s battery power, it’s comparable to a laptop running on battery, so I could be just using the same method laptops use: reduce the frequency of the CPU. At least Enterprise is able of CPU frequency scaling, so I’ve configured it to switch to power saving profile when the onbattery event is received by apcupsd.

It was actually quite simple, first of all apcupsd runs as root (although it should drop all privileges, but I’m not sure about it), and I have powersave installed and configured to handle this, so I just changed the /etc/apcupsd/onbattery and /etc/apcupsd/offbattery scripts to add a call to powersave binary, with -e Powersave on the onbattery event and -e Performance on the offbattery event; unfortunately I don’t think there is anything else beside slowing the CPU speed during UPS battery supply that can be done on a Workstation 🙁

Now I’m going to look to split the connection of the power cables in my home office so that the hardware that would just go in standby while I’m sleeping would be connected to a single multi-socket, which can be disconnected at once, to avoid leaving the hardware consuming power without any reason. I’d like to be able to do the same with the monitors (that otherwise would remain in standby as they can’t be shut down. If I wasn’t using the same UPS for both networking and monitors, I could probably use the UPS to shut them down and turn them back on at my command.

Sigh, I’m afraid there will be a looot of work to do, and I’m sealing envelopes, once again 🙁

Comments 2
  1. You now only scale down the CPU-frequencies during battery-time. You might consider doing this all the time as your CPUs are probably doing nearly nothing ~99% of the time anyway.This saves you quit some energy without any noticable side-effects as the CPU’s are a big powerdrain (how noticable it is depends a bit on the minimum CPU-speed that you set).I use the kernel ondemand governor for it on my desktop systems as that is all that is needed in my amazing that you actually need a UPS in Italy. I don’t even remember having a power-outage for the last 5-6 years.

  2. Well, the performance profile is not an always-on profile, it’s actually a dynamic one, so yeah during both day and night the CPU is at 1 GHz, although I often compile (xine most of the times) and then I’m usually playing video or music.And yes, it’s absurd, but my UPSes are actually doing quite a bit of work, especially because of line under-voltage, which usually breaks computers quite a bit. Sigh 🙁

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.