Wake-on-LAN doesn't work


#1

Hi!

Have moved hand-maded NAS from Arch to Manjaro. All does work except for WOL. I have

  • replaced r8169 with r8168

      # lsmod | grep 81
      r8168                 483328  0
    
  • added 99-wol.rules with

      ACTION="add", SUBSYSTEM="net", NAME="enp*", RUN+="/usr/bin/ethtool -s $name wol g"
    
  • set N in tlp (but I even don’t start tlp service):

      # cat ./default/tlp | grep -i wol
      ##WOL_DISABLE=Y
      WOL_DISABLE=N
    
  • added magic to networkmanager:

      # nmcli c show "Wired connection 1" | grep -i wake
      802-3-ethernet.wake-on-lan:             64 (magic)
      802-3-ethernet.wake-on-lan-password:    --
    
  • of course, I still have PME Events Wake Up (or something similar) in motherboard BIOS set ot Enabled.

  • have tried two clients inside LAN

So, where to go further?


Something is blocking Wake on Lan on Manjaro
#2

Confusing addition. Just after booting up:

# cat /sys/class/net/enp2s0/device/power/wakeup
disabled

Definitely something is wrong here. Who has killed all my attempts to enable waking up?? :smile:


#3

do you have tlp running? if so disable it then edit its config i do believe that the option for Wake up on lan is disabled in config by default so enable it save, then start tlp and enable tlp go reboot.


#4

I have already mentioned tlp is disabled.
But I have ended up with decision. The problem was Manjaro doesn’t down network interface on shutdown. The way is:

$ sudo cat /etc/systemd/system/net-down\@.service
[Unit]
Description=Turns net interface off

[Service]
Type=oneshot
RemainAfterExit=true
ExecStop=/usr/bin/ifconfig %i down

[Install]
WantedBy=multi-user.target

#5

[quote=“student975, post:4, topic:8997”]

ExecStop=/usr/bin/ifconfig %i down

Sorry for asking stupid questions, but I’m no linux geek. Do I have to replace %i with the name of my network device (in my case enp…) or is this done by the script interpreter with some magic by himself?
Seems, that I run into the same problem as you and I don’t wanna give up after the first try, because the machine’s predessessor did the job quite good - with another distribution.


#6

Yes, you want to use %i as is, and yes, it will be replaced with interface name.


#7

Make sure the command:

/usr/bin/ifconfig %i down

works on your system first.

That is why it is best not to ressurect very old threads. You may find that command has been deprecated on your system.

Rather than necrobumping an old thread the best practice is to open a new thread and link to the relevant section of an outdated thread.


#8

ifconfig belongs to net-tools package.


#9

That is true, you can install that package, but it has been deprecated for a reason. Best to use its replacement.

ip link set eth0 down

Replace eth0 with your adapters designation.


#10

How to know a package is deprecated?


#11

Generally most older Ubuntu threads that people follow on networking issues contain commands for functions that are no longer in use. If you use a command recommended from an Ubuntu thread and it will not run, it is usually an Ubuntu specific command or it has been deprecated.

Most of the currently used modern commands will function in Manjaro OOTB, as most come pre-installed by default.


#12

Not sure why you mention Ubuntu. At any case

ExecStop=/usr/bin/ip link set %i down

can be used the same way instead of ifconfig - have tested just now.


#13

Whoa. Bumping a two-year-old thread and you still get an immediate reply from the OP… :exploding_head:


#14

I only mention it because that’s where most people get all these outdated commands from. Best practice is to use the modern command replacements wherever possible, so that usage of deprecated utilities is not perpetuated.

BTW, I’m not knocking your solution. I love finding ways to solve issues with a systemd service. I was only trying to update the contents to a more modern version.


#15

Thank you for testing that out. That info is much appreciated.


#16

Ha! No, I have got this command from my outdated head as far as am using single boot Linux about 18 years :wink:


#17

Well, it was worth a try at least. And as you can see, a successful one. I simply checked, that the thread opener was still active, before I wrote my question.


closed #18

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.