I noticed my Dell Latitude laptop running Kubuntu 16.04 that even after shutting down completely, the battery was still being drained. The problem is that wake-on-lan is generally turned on by default. Unless you need WOL for some reason — turn it off.
Andi Dittrich has a great article on how to disable wake-on-lan in post 15.10 Ubuntu systems (you need to use a different method if still using versions older than 15.10).
The core method is to create a file named wol.service in /etc/systemd/system/ with:
[Unit]
Description="Disable WOL"
[Service]
Type=oneshot
ExecStart=/sbin/ethtool -swol d
[Install]
WantedBy=multi-user.target
Then run: sudo systemctl enable wol.service
Run sudo ethtool
This works well, but upon suspend/resume, wake-on-lan will be enabled again. To fix this, modify your systemd service file (wol.service) to this instead:
ReplyDelete[Unit]
Description="Disable WOL"
After=suspend.target
[Service]
Type=oneshot
ExecStart=/sbin/ethtool -s wol d
[Install]
WantedBy=multi-user.target suspend.target
Hi Christan,
DeleteThanks for the tip. I rarely use suspend for any length of time, so hadn't noticed that it flips the WOL back on.
Cheers!