Power outage behavior

My desktop is connected to a UPC, and there is a USB cable connecting the UPC to my system.  I am running “apcupsd” to manage it, and “gapcmon” to provide a display icon that I can check to see what is happening.  Today, there was an outage that tested things for me.

Previously, when running gnome-2 with this UPC, the gnome power monitor would tell me the status of the UPC.  Now that I am running KDE, I was never sure about that.  The power monitor is not visible.  If I look at the hidden icon, it doesn’t tell me much.  So I wasn’t sure if it was doing anything.  That’s why I have been running “apcupsd” and “gapcmon”.

I have occasionally had power outages, but most were short.  The only long ones were when I was home, so I would manually shut down the computer for safety.  Today, there was an outage.  Actually, there were two outages, both while I was not home.  The first was short and had no effect.  The second was longer, though I don’t know how long – probably not very long, but I cannot tell.

When I got home, I saw that the computer did not appear to be running.  A closer look showed a flashing light, indicating that it was in suspend mode.  I took it out of suspend mode, and was able to resume my session.

I’m pretty sure that the suspend mode came from the KDE power settings.  There is nothing in the “apcupsd” configuration that would suspend, though there is a setting to shutdown when the battery gets low.  So this seems to have been a good test of the KDE power monitor interaction with the UPS.

Sometime later, I noticed that the clock was around 15 minutes slow.  I guess the clock is not updated when the system is suspended.  I have since changed my KDE power settings to “shutdown” instead of suspend, which should avoid that problem.

Shortly after I unsuspended, there was a message from apcupsd that power was back on.  It seems to have noticed that the power was back on, soon after the unsuspend.  The logs show an outage of 13 seconds.  As best I can tell, that indicates that the outage was at most 13 seconds + 15 minutes (the amount the clock was off).  And I must have unsuspended around 15 minutes after it went into suspend mode.

There’s some more strangeness here.  My KDE power settings say that I should be in performance mode when on AC, and in powersave mode when not on AC.  Right now, it shows me in performance mode.  Presumably, it switched to powersave mode, then noticed that my session had been idle for more than the 10 minutes, so immediately took me into suspend.  Yet when I look at the power monitor, it says that the AC is not plugged in, the battery is at 100% and shows me in performance mode.  I’m guessing that it is unable to tell whether the UPS is plugged in, and uses a battery level that is less than 100% to switch to powersave mode.

Advertisements

Tags:

About Neil Rickert

Mathematician and computer scientist who dabbles in cognitive science.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: