Bug 8637
Summary: | skge doesn't wakeonlan (wol) whilst hibernated | ||
---|---|---|---|
Product: | Drivers | Reporter: | David Greaves (david) |
Component: | Network | Assignee: | Stephen Hemminger (stephen) |
Status: | RESOLVED PATCH_ALREADY_AVAILABLE | ||
Severity: | normal | CC: | bunk, david, rjw |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 2.6.22-rc4 | Subsystem: | |
Regression: | --- | Bisected commit-id: | |
Bug Depends on: | |||
Bug Blocks: | 7216 | ||
Attachments: |
Patch intended to fix the mysqld suspend problem
Patch to test Patch to test (the correct one) results of lspci and /proc/acpi/wakeup contents Clean boot from init 6. resume bootlog |
Description
David Greaves
2007-06-16 00:53:39 UTC
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 :) |