Most recent kernel where this bug did not occur: ? Distribution: Debian - mainline kernel Hardware Environment: 0000:00:00.0 Host bridge: VIA Technologies, Inc. VT8377 [KT400/KT600 AGP] Host Bridge (rev 80) 0000:00:01.0 PCI bridge: VIA Technologies, Inc. VT8237 PCI Bridge 0000:00:09.0 Ethernet controller: 3Com Corporation 3c940 10/100/1000Base-T [Marvell] (rev 12) 0000:00:0a.0 VGA compatible controller: ATI Technologies Inc 3D Rage II+ 215GTB [Mach64 GTB] (rev 9a) 0000:00:0d.0 Unknown mass storage controller: Promise Technology, Inc. PDC20318 (SATA150 TX4) (rev 02) 0000:00:0f.0 RAID bus controller: VIA Technologies, Inc. VIA VT6420 SATA RAID Controller (rev 80) 0000:00:0f.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06) 0000:00:10.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81) 0000:00:10.1 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81) 0000:00:10.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81) 0000:00:10.3 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81) 0000:00:10.4 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 86) 0000:00:11.0 ISA bridge: VIA Technologies, Inc. VT8237 ISA bridge [K8T800 South] 0000:00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 60) 0000:00:11.6 Communication controller: VIA Technologies, Inc. Intel 537 [AC97 Modem] (rev 80) Software Environment: skge Problem Description: skge doesn't wakeonlan (wol) whilst hibernated Steps to reproduce: If I cause the system to save state to disk then whilst off it no longer responds to g-wol. # wakeonlan cu Sending magic packet to 255.255.255.255:9 with 00:0C:6E:F6:47:EE It works when I use init 0. I applied the patches here: http://www.sisk.pl/kernel/hibernation_and_suspend/2.6.22-rc3/patches/ but that didn't help.
Does your distribution unload modules on hibernate? Some distributions (like Ubuntu) unload the module. WOL is only activated on shutdown or suspend.
I am using Debian but I'm not using any distro features. This is a mainline kernel. skge is actually builtin. The 'hibernate' script is: ethtool -s eth0 wol g sync echo platform > /sys/power/disk echo disk > /sys/power/state sleep 5 ethtool -s eth0 wol g
Can you test the 2.6.23-rc7 kernel with the patches from http://www.sisk.pl/kernel/hibernation_and_suspend/2.6.23-rc7/patches/ applied?
Update: Can you test 2.6.23-rc9 w/ the patches from: http://www.sisk.pl/kernel/hibernation_and_suspend/2.6.23-rc9/patches/ applied?
Been busy :) I just applied ...hibernation_and_suspend/2.6.23-rc9/patches/* This stopped hibernate working... I reverted to 2.6.23-rc9 and hibernate worked (but no WOL) I then bisected your patch list and found that with 01-10 applied, hibernate worked but WOL didn't. When I applied 11-freezer-do-not-send-signals-to-kernel-threads.patch the kernel gave output like this when I did the echo: echo: write error: Device or resource busy and dmesg said: (edited highlights) Freezing user space processes ... Freezing of tasks failed after 20.19 seconds (1 tasks refusing to freeze): runnable tasks: task PID tree-key delta waiting switches prio sum-exec sum-wait sum-sleep wait-overrun wait-underrun ------------------------------------------------------------------------------------------------------------------------ ------------------------------------------ events/0 5 33157216488 -280805469 20000000 409 115 0 0 0 0 0 pdflush 174 33301536444 -136485513 20000000 56 120 0 0 0 0 0 md0_raid5 867 33156228136 -281793821 20000000 97 115 0 0 0 0 0 xfsbufd 869 33181457999 -256563958 20000000 55 115 0 0 0 0 0 xfsbufd 2239 33185795995 -252225962 20000000 46 115 0 0 0 0 0 xfsbufd 2241 33211268666 -226753291 20000000 46 115 0 0 0 0 0 R hibernate 3922 33458021957 20000000 -20000000 128 120 0 0 0 0 0 mysqld
Thanks for testing. Well, we had problems with freezing mysqld in the past. Can you please retest with my series of patches applied, but without mysqld running?
OK, all patches applied: hibernate now succeeds if I stop mysql :) WOL still doesn't work :(
(In reply to comment #7) > OK, all patches applied: > > hibernate now succeeds if I stop mysql :) OK, I'll try to figure out a fix for that. > WOL still doesn't work :( Well, from the "core" code POV all of the necessary bits are there ...
Created attachment 13157 [details] Patch intended to fix the mysqld suspend problem The attached patch hopefully fixes the mysqld suspend problem from Comment #5. Please test.
Please check 2.6.24 when it's out, thanks.
I'd forgotten about this and missed your last request. The machine isn't used much anymore but I upgraded the kernel to mainline 2.6.26 and just tried 2.6.27-rc7 and it still doesn't work. The machine responds to wakeonlan when I do init 0 but not when I do echo disk > /sys/power/state hibernate/resume works fine. (Though mysql is not running on it anymore)
Created attachment 18012 [details] Patch to test Please check if WOL works for you with this patch applied on top of 2.6.27-rc7.
Created attachment 18013 [details] Patch to test (the correct one) Sorry, I've attached a wrong patch. Please try this one on top of 2.6.27-rc7.
:(
Please attach the output of 'lspci' from your system and the contents of /proc/acpi/wakeup before and after you've run 'ethtool -s eth0 wol g' (as text files).
Created attachment 18016 [details] results of lspci and /proc/acpi/wakeup contents Done I powered up (via wol) and did the lspci, then cat /proc/acpi/wakeup then ethtool -s eth0 wol g then cat /proc/acpi/wakeup again They're the same before and after the ethtool command I checked my init scripts (well, grep -R ethtool /etc) and it doesn't appear to be run automatically. I also did a hibernate/manual resume and the contents were the same.
Well, apparently your BIOS doesn't support wake-on-LAN from any sleep states using this network adapter. Is it an add-on card or on-board?
Can you please also attach a boot log for your system?
Created attachment 18017 [details] Clean boot from init 6. It's onboard. I didn't realise that it was entering a sleep-state. I thought hibernate actually did a power-off to the same 'state' as init 0.
Created attachment 18018 [details] resume bootlog Here's a log from a resume in case it helps
(In reply to comment #19) > Created an attachment (id=18017) [details] > Clean boot from init 6. > > It's onboard. > > I didn't realise that it was entering a sleep-state. I thought hibernate > actually did a power-off to the same 'state' as init 0. You can make it do that by echoing 'shutdown' into /sys/power/disk before hibernation.
(In reply to comment #20) > Created an attachment (id=18018) [details] > resume bootlog > > Here's a log from a resume in case it helps Thanks, it does a bit. Clearly, the PME# signal is enabled for the device, but the ACPI part is missing. Is there any switch in the machine's setup enabling wake-on-LAN or something similar?
ah, yes, I didn't explore /sys/power/disk because S2D was mainly working. OK, well this does work: cu:~# ethtool -s eth0 wol g cu:~# echo shutdown > /sys/power/disk cu:~# echo disk > /sys/power/state wol succeeds :) There is a BIOS setting for PCI/WoL which is set. And of course it works most of the time from powered down etc. I had a dig around the BIOS settings when you mentioned them earlier. It all looks rational. There's a suspend to RAM setting that is disabled as I'm not using it... and fiddling with it and things like wake-on-keyboard etc didn't help. If you think this is a BIOS/hardware bug then I'm happy with the echo shutdown > /sys/power/disk approach. OTOH if you think I can help find a hibernate/ACPI problem then I'll keep trying patches and reporting for you.
Well, I don't think it's strictly a bug. The BIOS just doesn't seem to support wake-up by the NIC from the ACPI S3 and S4 sleep states and there's not much we can do about that at the moment. I think it's better to mark the bug as resolved, because the patch from Comment #13 generally works on the systems that provide BIOS support for WOL from S3/S4.
Fine. Thanks a lot for your help :)