19

When the battery is low, the screen gets dimmed after a few seconds already.

This appears to be some special power-saving mode, and might be related to the time in org.gnome.settings-daemon.plugins.power.time-low (1200 seconds (20 minutes) the default).

While this seems to get triggered by gnome-settings-daemon, I wonder what else Ubuntu does when this happens (e.g. via DBus listeners), or other event listeners that look for a "low battery" state.

It seems like something in this regard causes Ubuntu / X / the system to behave more sluggish afterwards (when the laptop is on AC again), and I would like to look into what might be causing this.

I could not find anything related via dconf-editor, e.g. in org.gnome.settings-daemon.plugins.power.

It appears to get setup via idle_configure in plugins/power/gsd-power-manager.c, but it's probably something more related to something that listens on the DBus interface, which gets notified via e.g.:

    if (!g_dbus_connection_emit_signal (manager->priv->connection,
                                        NULL,
                                        GSD_POWER_DBUS_PATH,
                                        "org.freedesktop.DBus.Properties",
                                        "PropertiesChanged",
                                        props_changed,
                                        &error))

I could imagine that some "power saving" property gets set, but not unset when AC is available anymore and/or the battery is not low anymore.

I have looked at the CPU governor setting (/sys/devices/system/cpu/cpu*/cpufreq/scaling_governor), but it was ondemand.

I am using gnome-settings-daemon with awesomeWM on Ubuntu 14.04.

gnome-settings-daemon=3.8.6.1-0ubuntu11.1

I've also compared gsd's plugins/power/gsd-power-manager.c with the one from Debian's gnome-settings-daemon-3.12.1, but could not find anything obvious that might have been fixed/changed in this regard.

I have managed to trigger the gnome-power-manager's gnome-settings plugin (which dims the screen etc), by patching upower and use it after killing the system's upower daemon. (note that it's probably only energy that is being used by gpm to calculate it by itself).

It does not make the system become sluggish..

OTOH I have not heard the speaker's beeping, which might come from the BIOS, which might be involved here, too - or other programs using the kernel's interface on /sys/class/power_supply/BAT0/.

--- src/linux/up-device-supply.c.orig   2014-06-07 16:48:32.735920661 +0200
+++ src/linux/up-device-supply.c    2014-06-07 16:48:39.391920525 +0200
    @@ -821,6 +821,9 @@
        supply->priv->energy_old_first = 0;
    }

+   percentage = 3.1f;
+   time_to_empty = 3*60;
+   energy = 5;
    g_object_set (device,
              "energy", energy,
              "energy-full", energy_full,
6
  • You might also wish to examine acpi events: this appears to be related: askubuntu.com/questions/33062/…
    – Elder Geek
    Jul 14, 2014 at 20:56
  • This is interesting as well cat /usr/share/acpi-support/policy-funcs
    – Elder Geek
    Jul 14, 2014 at 20:58
  • @ElderGeek I only have /usr/share/acpi-support/state-funcs on my system. policy-funcs is available in acpi-support-base (but only for Debian).
    – blueyed
    Jul 17, 2014 at 1:04
  • 1
    This page features intersting script, power.d hook: help.ubuntu.com/community/PowerManagement/ReducedPower Aug 24, 2014 at 12:39
  • 1
    Not a direct answer, but you should look into tlp and tlp-rdw, and what they can have Ubuntu do when there is low power.
    – earthmeLon
    Sep 21, 2014 at 21:21

1 Answer 1

1

If you look at the "Power" tab in System Settings, you have the option to choose what happens when the battery reaches a critically low level. You can, with standard Ubuntu, make it power off when critically low. If you have hibernation enabled (Check out this link for instructions: How to enable hibernation?), you can also make the computer hibernate. If in doubt about the difference between suspend and hibernate, look at this: http://ubuntuforums.org/showthread.php?t=1660436

I hope that I have been of service.

-Mario3D13

2
  • 1
    That is the standard user-facing stuff / settings, which are not related to the problem I am/was seeing. I have noticed this issue (sluggish / slower) lately, when the laptop was suspended while on battery and then resumed on AC. But it is not reproducible and might only be related in the symptoms.
    – blueyed
    Aug 21, 2015 at 8:10
  • Ok. Sorry. Concernig your complete question, I can't really answer it (I'm still not an all-out power user, still have stuff to learn)
    – Mario3D13
    Sep 4, 2015 at 20:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .