Hot answers tagged

3

I stumbled across an answer that seems to have worked. Too bad there is not a cleaner way to do this than to alter the default settings. Would rather the System Settings|Power setting worked. I edited the file '/etc/systemd/logind.conf' sudo vi /etc/systemd/logind.conf Then I uncommented the line (removed the beginning #) containing ...


3

In Dconf editor go to org.gnome.settings-daemon.plugins.power


3

The AC adaptor is showing online, and the battery is discharging at zero rate. The battery charging logic is not under OS control. One of the many independent microcontrollers in your laptop controls the battery (along with a corresponding microcontroller in the battery itself) decide when and how to charge. At worst, your OS would not be correctly ...


2

I had a similar problem. There is apparently a bug in the 4.4.0 kernel. The problem can be solved when you install the new kernel 4.4.8. You can find instructions to do it here: http://linuxdaddy.com/blog/install-kernel-4-4-on-ubuntu/ Works perfect for me.


2

EDIT In the original answer, further below, the countdown window appeared after an arbitrary idle time. Re- reading your question, you might want it permanently. The permanent version is below (which is simpler), the original answer further down. 1a. Version, permanently showing countdown time The solution is a background script, showing a semi- ...


2

This is probably due to changes & regressions introduced in the 4.4.0 kernel such as this with Ubuntu 16.04, but I do have a workaround for 4.4.0: I first added my swap partition to grub, rebooted, and there was no change. Next I installed the Ubuntu kernel packages with TuxOnIce stable and the option to hibernate appeared, but that failed. I later I ...


2

I figured it out so I'm posting an answer for those who are stuck like me. Since pm-suspend worked perfectly for me, I edited this file: /etc/default/acpi-support Looked for this line: SUSPEND_METHODS="dbus-pm dbus-hal pm-utils" Changed it to this: SUSPEND_METHODS="pm-utils" Now it works like it should!


2

What you need to do Install xprintidle, to keep track of the current idle time (defined by lack of keyboard- and mouse events). Create a small background script (further below); copy the script into an empty file and save it as dim_keyboard.sh. Make the script executable and copy it to a location where unauthorized users cannot alter the script (e.g. ...


1

Often, the battery statistics come from a combination of the battery model info read by either the Bios or possibly the operating system and the measured duration of the battery. I don't believe the battery model info is read every time but the metering system will need a calibration run for it to properly guess at the duration time of the replacement ...


1

Install tlp (with commandsudo apt-get install tlp), then under Tunables tab at powertop most parameters should switch to "Good" once the laptop is unplugged (use r to refresh powertop). Open Software & Updates and at the Additional Drivers tab select the proprietary gpu driver if it is available. Also intel-microcode may be a good option if it is also ...


1

You can't install TLP and laptop-mode-tools at the same time (the tlp package conflicts with the laptop-mode-tools package to prevent parallel install). I understand you want to have the equivalent of NOLM_HD_IDLE_TIMEOUT_SECONDS=7200 # 2 hours LM_AC_HD_POWERMGMT=1 NOLM_AC_HD_POWERMGMT=1 This translates to DISK_APM_LEVEL_ON_AC="1" ...


1

The way I have my notifications set up is via script that launches in /etc/rc.local file on every boot. Simply place the full path into that file and call it like so: /home/USERNAME/bin/batmon.sh & What it will do is that it will continuously echo to GUI and to command line that "hey, your battery is draining" till you plug in AC source. The script ...


1

This could solve your problem. I once had this problem and i solved it using this method: Open a terminal: Ctrl + Alt + t Open logind.conf by running command sudo vim /etc/systemd/logind.conf and remove the # before HandleLidSwitch=suspend. You can also change the option suspend to hibernate or poweroff Fix from Launchpad Bug #863834, comment #30: ...


1

Q1. How do I know if pressing the Suspend button in Ubuntu 16.04 will lead to S1, S2, S3, S4, or S5? Ans1: On my system, I found the information in the file /proc/acpi/wakeup. Also, the commands acpitool -w or acpitool -e present the same information as that found in /proc/acpi/wakeup. Q2. Is this (i.e. ACPI Global State) determined by settings in the ...


1

It depends on Ubuntu (and the BIOS capabilities). It couldn't be any other way because the operating system needs to coordinate a great deal of things to enter any state above S2. The BIOS may however inform the operating system that it would like to enter a particular state. There are two suspension modes in Ubuntu, Linux and modern PCs in general: ...


1

You have installed TLP to extend the battery life on your laptop, but are still getting poor battery life. When you look at the output of tlp -stat output you found the error message x86_energy_perf_policy: program for your kernel not installed. When you attempt to install the energy performance policy by sudo apt-get install linux-tools-generic the ...


1

The script bellow uses two calls to dbus and one while loop to poll for the percentage. Very simple and effective setup. Run this when you want to shutdown the laptop once it is charged #!/bin/bash get_percentage() { qdbus org.gnome.SettingsDaemon.Power \ /org/gnome/SettingsDaemon/Power \ org.gnome.SettingsDaemon.Power.Percentage } ...


1

Try this python script. It borrows from Saving work automatically when battery is low #!/usr/bin/env python import subprocess import dbus sys_bus = dbus.SystemBus() ck_srv = sys_bus.get_object('org.freedesktop.ConsoleKit', '/org/freedesktop/ConsoleKit/Manager') ck_iface = dbus.Interface(ck_srv, ...


1

It does not run on my system when I plug and unplug my power adapter. You can check whether it is run or not by looking at /var/log/pm-powersave.log. Type tail -f /var/log/pm-powersave.log and then plug/unplug your power adapter, it will shows what scripts are run and their output. If you got nothing, then it means nothing is run. You can create a new udev ...


1

You are likely experiencing this bug. To fix, try installing a new kernel. Commands for 64 bit system: cd /tmp wget \ kernel.ubuntu.com/~kernel-ppa/mainline/v4.5.2-wily/linux-headers-4.5.2-040502_4.5.2-040502.201604200335_all.deb \ kernel.ubuntu.com/~kernel-ppa/mainline/v4.5.2-wily/linux-headers-4.5.2-040502-generic_4.5.2-040502.201604200335_amd64.deb ...


1

I have no idea why great Ubuntu team did not implemented "power off when lid is closed" option. I have laptop with cooler powered trough the USB and my USB port is always ON when laptop is in suspend state, so suspend is not good option for me. Anyway finally I found solution and is working for me (Ubuntu 16.04 with two internal HDD's and external monitor). ...


1

Edit this file /etc/default/acpi-support (sudo your favorite editor) Change the line SUSPEND_METHODS="dbus-pm dbus-hal pm-utils" to this SUSPEND_METHODS="pm-utils"



Only top voted, non community-wiki answers of a minimum length are eligible