I'm on Debian Buster/Sid, but I like to compile new vanilla kernels myself, just to try them out. However I face a recurring problem: if I use a Debian packaged kernel, Wake On Lan works correctly and I can wake my pc by sending the magic packet to it. If I use a vanilla kernel I compile myself, it doesn't.
Here is the procedure I use:
$ wget 'https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.0.2.tar.xz'
$ tar xJf linux-5.0.2.tar.xz
$ cd linux-5.0.2/
linux-5.0.2 $ cp /boot/config-4.19.0-2-amd64 .config
linux-5.0.2 $ make oldconfig
[KCONFIG questions omitted] I eventually add something, but I never remove anything
linux-5.0.2 $ CONCURRENCY_LEVEL=20 fakeroot make-kpkg --initrd binary-arch
[...]
linux-5.0.2 $ cd..
$ su -
# dpkg -i linux-image-*.deb linux-headers-*.deb
# reboot
[... the new kernel boots ...]
# init 0
Now I try to send the magic WoL packet from another networked device, but my PC does not start. If I boot it with a Debian packaged kernel (4.19.0-2 which corresponds to upstream 4.19.16) and then shutdown it, then the WoL packet works as expected and my PC starts up.
Here is the output of lsmod, because I've been asked for it:
$ lsmod
Module Size Used by
nft_chain_route_ipv4 16384 1
xt_CHECKSUM 16384 1
nft_chain_nat_ipv4 16384 4
ipt_MASQUERADE 20480 1
xt_conntrack 16384 1
ipt_REJECT 16384 1
nf_reject_ipv4 16384 1 ipt_REJECT
nft_counter 16384 34
xt_tcpudp 20480 2
nft_compat 20480 27
devlink 73728 0
nf_tables 147456 188 nft_chain_route_ipv4,nft_compat,nft_chain_nat_ipv4,nft_counter
nfnetlink 16384 2 nft_compat,nf_tables
tun 57344 5
bridge 188416 0
stp 16384 1 bridge
llc 16384 2 bridge,stp
binfmt_misc 24576 1
nls_ascii 16384 1
nls_cp437 20480 1
vfat 24576 1
fat 81920 1 vfat
edac_mce_amd 28672 0
kvm_amd 102400 0
ccp 94208 1 kvm_amd
rng_core 16384 1 ccp
snd_hda_codec_realtek 122880 1
snd_hda_codec_hdmi 61440 1
kvm 733184 1 kvm_amd
snd_hda_codec_generic 90112 1 snd_hda_codec_realtek
ledtrig_audio 16384 2 snd_hda_codec_generic,snd_hda_codec_realtek
irqbypass 16384 1 kvm
crct10dif_pclmul 16384 1
snd_hda_intel 45056 6
amdgpu 3928064 17
crc32_pclmul 16384 0
ghash_clmulni_intel 16384 0
snd_hda_codec 155648 4 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_realtek
joydev 28672 0
aesni_intel 372736 0
aes_x86_64 20480 1 aesni_intel
snd_hda_core 98304 5 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek
crypto_simd 16384 1 aesni_intel
chash 16384 1 amdgpu
cryptd 24576 3 crypto_simd,ghash_clmulni_intel,aesni_intel
eeepc_wmi 16384 0
asus_wmi 32768 1 eeepc_wmi
snd_hwdep 20480 1 snd_hda_codec
sparse_keymap 16384 1 asus_wmi
snd_pcm 118784 4 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_core
rfkill 32768 2 asus_wmi
gpu_sched 36864 1 amdgpu
glue_helper 16384 1 aesni_intel
ttm 114688 1 amdgpu
snd_timer 45056 1 snd_pcm
drm_kms_helper 204800 1 amdgpu
video 49152 1 asus_wmi
pcc_cpufreq 20480 0
pcspkr 16384 0
snd 98304 20 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_pcm
drm 487424 12 gpu_sched,drm_kms_helper,amdgpu,ttm
evdev 24576 31
sg 36864 0
soundcore 16384 1 snd
i2c_algo_bit 16384 1 amdgpu
sp5100_tco 20480 0
efi_pstore 16384 0
k10temp 16384 0
efivars 20480 1 efi_pstore
fam15h_power 16384 0
button 16384 0
acpi_cpufreq 28672 0
wmi_bmof 16384 0
mxm_wmi 16384 0
iptable_nat 16384 0
nf_nat_ipv4 16384 3 ipt_MASQUERADE,nft_chain_nat_ipv4,iptable_nat
nf_nat 36864 1 nf_nat_ipv4
nf_conntrack 159744 4 xt_conntrack,nf_nat,ipt_MASQUERADE,nf_nat_ipv4
nf_defrag_ipv6 24576 1 nf_conntrack
nf_defrag_ipv4 16384 1 nf_conntrack
ecryptfs 122880 0
parport_pc 32768 0
ppdev 24576 0
nfsd 425984 13
lp 20480 0
auth_rpcgss 69632 1 nfsd
nfs_acl 16384 1 nfsd
lockd 118784 1 nfsd
parport 61440 3 parport_pc,lp,ppdev
grace 16384 2 nfsd,lockd
sunrpc 421888 18 nfsd,auth_rpcgss,lockd,nfs_acl
efivarfs 16384 1
ip_tables 28672 1 iptable_nat
x_tables 49152 7 xt_conntrack,nft_compat,xt_tcpudp,ipt_MASQUERADE,xt_CHECKSUM,ipt_REJECT,ip_tables
autofs4 49152 2
ext4 733184 2
crc16 16384 1 ext4
mbcache 16384 1 ext4
jbd2 126976 1 ext4
fscrypto 36864 1 ext4
dm_mod 151552 3
hid_generic 16384 0
usbhid 61440 0
hid 147456 2 usbhid,hid_generic
raid10 65536 1
sd_mod 53248 13
raid456 176128 0
async_raid6_recov 24576 1 raid456
async_memcpy 20480 2 raid456,async_raid6_recov
async_pq 20480 2 raid456,async_raid6_recov
async_xor 20480 3 async_pq,raid456,async_raid6_recov
async_tx 20480 5 async_pq,async_memcpy,async_xor,raid456,async_raid6_recov
xor 24576 1 async_xor
raid6_pq 122880 3 async_pq,raid456,async_raid6_recov
libcrc32c 16384 3 nf_conntrack,nf_nat,raid456
crc32c_generic 16384 0
raid1 49152 1
raid0 24576 1
multipath 20480 0
linear 20480 0
md_mod 167936 8 raid1,raid10,raid0,linear,raid456,multipath
ohci_pci 20480 0
ahci 40960 9
libahci 40960 1 ahci
xhci_pci 20480 0
ohci_hcd 57344 1 ohci_pci
ehci_pci 20480 0
libata 278528 2 libahci,ahci
crc32c_intel 24576 3
r8169 90112 0
xhci_hcd 258048 1 xhci_pci
realtek 20480 1
ehci_hcd 94208 1 ehci_pci
libphy 86016 2 r8169,realtek
i2c_piix4 28672 0
usbcore 286720 7 xhci_hcd,ohci_hcd,ehci_pci,usbhid,ehci_hcd,xhci_pci,ohci_pci
scsi_mod 241664 3 sd_mod,libata,sg
wmi 36864 3 asus_wmi,wmi_bmof,mxm_wmi
And here are the modules configurations in /etc/modprobe.d/
:
blacklist microcode
blacklist radeon
options md_mod start_ro=1
options cirrus modeset=1
options mgag200 modeset=1
What am I missing?
As you are using the Realtek module (
r8169
), I believe this is expected behavior before commit fa6821c (r8169: improve WoL handling). After a bit of back and forth, the driver ended up delegating the choice to userspace, with only the referred last commit restoring previously known behavior:Meaning with the version you are using, your systemd sees WoL as already setup, when it might still have to request that.
So you just need to test WoL after this manual step. Replace
g
if you are using a different wakeup packet, replaceenp1s0
if your network interface as a different name:If this manual setup works with your current 5.0.2 build, you can expect a future kernel version (or HEAD, right now) to reflect your systemd configuration as well.