sanjar-notes / swe-tools

Software engineering culture and tools
0 stars 0 forks source link

Wake on LAN set up, add to repo #22

Open sanjarcode opened 8 months ago

sanjarcode commented 8 months ago

why am I doing this?

I have 2 monitors, and 2 computers (one work + one personal). I use the personal one for gaming. The problem is my desk doesn't have enough space to keep all 4. One laptop's lid has to be closed, I'm thinking of keeping personal laptop lid closed permanently).

To start the personal one, I'd have to open the lid, which would be cumbersome due to the space crunch. WOL with lid closed would solve this.

hw setup

Most modern laptops have sufficient hw. BIOS: go to network and turn on stuff. Available easily on official sites.

Windows

Set up

Device manager, go to network card (Intel 6x in my case),go to 'advanced' and enable all options that feel related to WOL.

Test

Download wol packet sniffer, it's an application. Set UDP port to 9. Keep laptop ON (do nothing). And ping (using wakeonlan or wol) from other device (argument being target mac_address).

Ubuntu

Use the 'iw' package to enable wake on lan. Follow the nixCraft article.

The add code in /etc/rc.local. this is basically a hook that runs the file on each boot. Also in the same article).

Test

Use terminal to enter low power state (use command from article) or do systemctl services suspend. Ping using another device to check.

ChatGPT conversation - conv link

annoyances

note

The default wakeonlan ports is 9.