Wake on Lan with Linux

Wake on Lan is a great functionality to have if for some reason you have issues accessing the power button of your machine.
Generally, wake on lan works on Linux and Windows with modern machines that support it. Wake on lan also needs a wired connection in order to work.

Here is short guide on how to use wake on lan on Debian based distributions and with Lenovo Ideapad laptop.

Note: On many occasions you will need to also enable wake on lan support on Bios. My Asus desktop (Windows) machine required this. In case of my Lenovo Ideapad, there was no Bios entry at all. However, this Ideapad model still supported wake on lan.

  1. Install ethtool:

    sudo apt install ethtool

    1. Find your lan interface:

    ip a

    For me it was:
    2: enp3s0: mtu 1500 qdisc pfifo_fast state UP group default qlen 1000

    On the very same ip a command you will also locate a MAC address, similar to:

    link/ether 11:a1:11:1c:a1:11

    See if wake on lan is enabled: sudo ethtool enp3s0| grep Wake-on

    When it is enabled you will see something like:

    Supports Wake-on: pumbg
    Wake-on: g

    If you run this command for the very first time, you will more than likely miss the g on Wake-on. To enable wake on lan on the interface(the g letter), execute: ethtool -s enp3s0 wol g

    1. Enable lan interface to support wake on lan on system level during start.

    I did not want to do this every time manually. I created a file called wol.service with the following content:

    ExecStart=ethtool -s enp3s0 wol g

    Then I copied it to right place, enabled it during the system start, and started it on my current session:

    sudo cp wol.service /etc/systemd/system/wol.service
    sudo systemctl enable wol
    sudo systemctl start wol

    4. How to wake on Lan

    I noticed that only systemctl suspend was something that I was able to use and produce a working wake on lan situation. This will likely vary based on your setup.
    In comparison: On Windows hosts, the system needs to be shutdown cleanly and wake on lan will just work.

    On another Debian Linux box you can install: sudo apt install wakeonlan

    Then you can wake the machine with: wakeonlan 11:a1:11:1c:a1:11

    5. Waking with Android or Iphone:

    Wake on lan can also be produced with Android or Iphone. I used Wake On Lan by Mike Webb. You can use that app or something else. I will not directly recommend any applications. I suggest that if you want to use your phone as a wake on lan controller, that you will do some investigation of your own and find out what application is best for your device.

    Saml authentication with SimpleSaml.php

    I did some experiments with the SimpleSaml.php project to see how it functions.

    From these experiments, I created a new repository fork: https://github.com/postman721/docker-simplesamlphp, which contains my own experiments build on top of a well-established Github project. I also made a custom basic theme for SimpleSaml, which is included on my Github source.

    SimpleSaml with a custom basic theme.

    Spin-FM 2.0 RC1 released

    The Python file manager has reached its next version. RC1 brings:

    Moving to Pyside2:

    sudo apt install pyside2-*

    • Close tabs button added: This will always close the latest opened tab.
    • Copy, paste, move to functionalities improved.
    • More tabs added.
    • Green theme added.
    • Removing permanent delete, due to its risks
    • Please notice that on all file & folder actions, the addressbar object name tells what is being processed.
    • Back and forward store only the most recent locations.

    When the content of the folder or location changes and does not seem to refresh, remember to refresh the tree via addressbar navigation. For example: Type /home and hit return/enter from the keyboard.

    Do not paint your selections for copying, moving or deletion with a mouse: This will likely cause issues. Press CTRL and point and click through the objects.

    After selected, right-click and choose a proper menu action.

    For copying and moving: Select for copying or moving. For deletion: Delete objects.

    After copying or moving selection, navigate to your target location and choose Copy to.. or Move to… from the right-click menu.

    Full list of features and the program itself can be found from my Github:


    Finally, here are some screenshots:

    Getting external screen to work on Lenovo Ideapad 1 laptop (Debian based systems)

    External screen might not work out of the box with Lenovo Ideapad 1 laptops.

    The following steps were performed on PostX Gnu/Linux (based on Debian 11) to remedy the situation.

    • Remove nomodest entry from grub config file:

    sudo nano /etc/default/grub
    sudo update-grub

    • Reboot the system.
    • Install arandr to identify & setup the (external) display:

    sudo apt install -y arandr

    • Save configuration to an sh file(screen.sh here) and make it autostart. Openbox as an example:

    nano .config/openbox/autostart

    bash screen.sh &
    exec openbox