Showing posts with label laptop. Show all posts
Showing posts with label laptop. Show all posts

Thursday, July 21, 2016

Turning Off Wake-On-LAN on Linux Laptops

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 -s wol d

[Install]
WantedBy=multi-user.target

Then run: sudo systemctl enable wol.service

Run sudo ethtool and check it shows "Wake-on: d" after reboot to ensure it has worked.