Loading...
 

Edit Section: Ubuntu 16.04 LTS for Human Beans


x
 
!!!# Fixing battery drainage when switched off
Confirmed that problem still exists on a clean install from Ubuntu 13.04 up to 16.04 on a HP Pavillion dv6 i7. I installed the required program to fix the issue with:
{CODE()}
sudo apt-get install ethtool
{CODE}
and we can check the "Wake on lan" current status with:
{CODE(colors="shell")}
user@machine:~$ sudo ethtool eth0 | grep Wake-on
[sudo] password for user: 
    Supports Wake-on: pumbg
    Wake-on: g
{CODE}
If under the option ‘Wake-on:’ it says anything other than ‘__d__’ then it means this feature is enabled.
If it’s enabled then on most occasions it’ll say ‘g’ and you can use the below command to disable it.
{CODE(colors="shell")}
sudo ethtool -s eth0 wol d
{CODE}
You may not have device __eth0__ but __eno1__ or similar (check using command -+ifconfig+- in the command line)
Then enter the previous command to who the status of  ‘Wake-on:’ it should say ‘__d__’.
But the thing is, this setting will be lost as soon as you reboot your computer. So to make Ubuntu permanently save the changes, use the below steps. 
{CODE(colors="shell")}
gksudo gedit /etc/rc.local
{CODE}
Now simply copy and past the below code into that newly opened configuration file (make sure to paste it above the ‘exit 0’ code).
{CODE(colors="shell")}
ethtool -s eth0 wol d
{CODE}
Replace __eth0__ for your own device name if it's different than this (in my case, it's __eno1__).
Since Ubuntu 12.04, you may to do something else. Let’s first copy the original script to the ‘/etc/pm …’ folder, as if we were to edit the file while keeping it on its original location, then it might get overwritten when your OS receives update. So for that, open the terminal window and enter the below command.
{CODE(colors="shell")}
sudo cp /usr/lib/pm-utils/power.d/disable_wol /etc/pm/power.d
{CODE}
Now enter the below command to edit it.
{CODE(colors="shell")}
gksudo gedit /etc/pm/power.d/disable_wol
{CODE}
Once opened locate a code called ‘wol g’ (you can search for it in the editor) as shown below then simply change the letter ‘g’ to ‘d’.
{img src="https://www.hecticgeek.com/wp-content/uploads/2012/09/Editing-the-disable_wol-script-in-Ubuntu-12.04.jpg"}
Then click on the ‘Save’ button’ and close the editor. Now reboot your PC and when you’ve logged into the desktop use the command -+sudo ethtool eth0 | grep Wake-on+- to know if it’s working or not. If it’s working, then under ‘Wake-on’, now it should say ‘d’ (= disabled).
Change HighlighterToggle Highlighter
  • Sitemap
To translate, do not change the language and the content. Instead, create a new translation in the new language.
The namespace for a page is guessed automatically from the page name. However, some exceptions may arise. This option allows to override the namespace.

Search and select what you are looking for from the options that appear.

No matching results.

days
Image Seed: noun \ˈsēd\ : the beginning of something which continues to develop or grow

Knowledge seeds

Switch Language