* [RFC] halt to s4 for WOL
@ 2016-01-13 16:40 René Rebe
0 siblings, 0 replies; 4+ messages in thread
From: René Rebe @ 2016-01-13 16:40 UTC (permalink / raw)
To: linux-acpi
Hi all,
for some years our old Mac Pro and newer Mac mini used for unit testing and VMs
annoyed me in that we could never get Wake-On-Lan working on them at all.
Some people found some pci config bit poking for some older Mac mini that did not
work on our newer Mac mini, nor on our older Mac Pro.
http://blog.dhampir.no/content/wake-on-lan-on-a-n-intel-mac-mini-with-linux
While we where setting up some new things we finally wanted this solved, and I found
a clever workaround by halting the machine to S4 instead of S5.
While of course this patch can not be applied as it. I just wanted to ask for feedback -
maybe a kernel or sysfs interface can be added to have a halt=S4 or whatever
switch as this might be useful to convince other machines to supply power to the NIC,
too.
--- linux-4.3/drivers/acpi/sleep.c.orig 2015-12-29 15:27:21.100959963 +0000
+++ linux-4.3/drivers/acpi/sleep.c 2015-12-29 15:28:36.828960630 +0000
@@ -811,7 +811,7 @@
static void acpi_power_off_prepare(void)
{
/* Prepare to power off the system */
- acpi_sleep_prepare(ACPI_STATE_S5);
+ acpi_sleep_prepare(ACPI_STATE_S4);
acpi_disable_all_gpes();
acpi_os_wait_events_complete();
}
@@ -821,7 +821,7 @@
/* acpi_sleep_prepare(ACPI_STATE_S5) should have already been called */
printk(KERN_DEBUG "%s called\n", __func__);
local_irq_disable();
- acpi_enter_sleep_state(ACPI_STATE_S5);
+ acpi_enter_sleep_state(ACPI_STATE_S4);
}
int __init acpi_sleep_init(void)
--
ExactCODE GmbH, Lietzenburger Str. 42, DE-10789 Berlin
http://exactcode.com | http://exactscan.com | http://ocrkit.com | http://t2-project.org | http://rene.rebe.de
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFC] halt to s4 for WOL
2016-01-13 22:18 ` Rafael J. Wysocki
@ 2016-01-14 14:30 ` René Rebe
0 siblings, 0 replies; 4+ messages in thread
From: René Rebe @ 2016-01-14 14:30 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: linux-acpi
Hi,
On Jan 13, 2016, at 23:18, Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
> On Wednesday, January 13, 2016 06:06:18 PM René Rebe wrote:
>> Hi all,
>>
>> for some years our old Mac Pro and newer Mac mini used for unit testing and VMs
>> annoyed me in that we could never get Wake-On-Lan working on them at all.
>>
>> Some people found some pci config bit poking for some older Mac mini that did not
>> work on our newer Mac mini, nor on our older Mac Pro.
>>
>> http://blog.dhampir.no/content/wake-on-lan-on-a-n-intel-mac-mini-with-linux
>>
>> While we where setting up some new things we finally wanted this solved, and I found
>> a clever workaround by halting the machine to S4 instead of S5.
>>
>> While of course this patch can not be applied as it. I just wanted to ask for feedback -
>> maybe a kernel or sysfs interface can be added to have a halt=S4 or whatever
>> switch as this might be useful to convince other machines to supply power to the NIC,
>> too.
>
> This potentially has side effects beyond the wakeup devices handling, so I won't
> recommend doing that in general.
>
> Also, this seems to be a policy decision made by the platform designers. Apparently,
> they don't want you to wake up from "off" via WoL.
Yes, this appears to be their policy, however, that does not help us very much.
So far this workaround works here without any issue. E.g. no spurious wakeups
or other side effects that I would notice.
Of course I can happily keep it my private patch collection, the question is
if this would be worth to wire to some halt=s4 codlin option or other alternative
sysfs etc. config option.
René
>> --- linux-4.3/drivers/acpi/sleep.c.orig 2015-12-29 15:27:21.100959963 +0000
>> +++ linux-4.3/drivers/acpi/sleep.c 2015-12-29 15:28:36.828960630 +0000
>> @@ -811,7 +811,7 @@
>> static void acpi_power_off_prepare(void)
>> {
>> /* Prepare to power off the system */
>> - acpi_sleep_prepare(ACPI_STATE_S5);
>> + acpi_sleep_prepare(ACPI_STATE_S4);
>> acpi_disable_all_gpes();
>> acpi_os_wait_events_complete();
>> }
>> @@ -821,7 +821,7 @@
>> /* acpi_sleep_prepare(ACPI_STATE_S5) should have already been called */
>> printk(KERN_DEBUG "%s called\n", __func__);
>> local_irq_disable();
>> - acpi_enter_sleep_state(ACPI_STATE_S5);
>> + acpi_enter_sleep_state(ACPI_STATE_S4);
>> }
>>
>> int __init acpi_sleep_init(void)
>
> Thanks,
> Rafael
>
--
ExactCODE GmbH, Lietzenburger Str. 42, DE-10789 Berlin
http://exactcode.com | http://exactscan.com | http://ocrkit.com | http://t2-project.org | http://rene.rebe.de
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFC] halt to s4 for WOL
2016-01-13 17:06 René Rebe
@ 2016-01-13 22:18 ` Rafael J. Wysocki
2016-01-14 14:30 ` René Rebe
0 siblings, 1 reply; 4+ messages in thread
From: Rafael J. Wysocki @ 2016-01-13 22:18 UTC (permalink / raw)
To: René Rebe; +Cc: linux-acpi
On Wednesday, January 13, 2016 06:06:18 PM René Rebe wrote:
> Hi all,
>
> for some years our old Mac Pro and newer Mac mini used for unit testing and VMs
> annoyed me in that we could never get Wake-On-Lan working on them at all.
>
> Some people found some pci config bit poking for some older Mac mini that did not
> work on our newer Mac mini, nor on our older Mac Pro.
>
> http://blog.dhampir.no/content/wake-on-lan-on-a-n-intel-mac-mini-with-linux
>
> While we where setting up some new things we finally wanted this solved, and I found
> a clever workaround by halting the machine to S4 instead of S5.
>
> While of course this patch can not be applied as it. I just wanted to ask for feedback -
> maybe a kernel or sysfs interface can be added to have a halt=S4 or whatever
> switch as this might be useful to convince other machines to supply power to the NIC,
> too.
This potentially has side effects beyond the wakeup devices handling, so I won't
recommend doing that in general.
Also, this seems to be a policy decision made by the platform designers. Apparently,
they don't want you to wake up from "off" via WoL.
>
> --- linux-4.3/drivers/acpi/sleep.c.orig 2015-12-29 15:27:21.100959963 +0000
> +++ linux-4.3/drivers/acpi/sleep.c 2015-12-29 15:28:36.828960630 +0000
> @@ -811,7 +811,7 @@
> static void acpi_power_off_prepare(void)
> {
> /* Prepare to power off the system */
> - acpi_sleep_prepare(ACPI_STATE_S5);
> + acpi_sleep_prepare(ACPI_STATE_S4);
> acpi_disable_all_gpes();
> acpi_os_wait_events_complete();
> }
> @@ -821,7 +821,7 @@
> /* acpi_sleep_prepare(ACPI_STATE_S5) should have already been called */
> printk(KERN_DEBUG "%s called\n", __func__);
> local_irq_disable();
> - acpi_enter_sleep_state(ACPI_STATE_S5);
> + acpi_enter_sleep_state(ACPI_STATE_S4);
> }
>
> int __init acpi_sleep_init(void)
Thanks,
Rafael
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* [RFC] halt to s4 for WOL
@ 2016-01-13 17:06 René Rebe
2016-01-13 22:18 ` Rafael J. Wysocki
0 siblings, 1 reply; 4+ messages in thread
From: René Rebe @ 2016-01-13 17:06 UTC (permalink / raw)
To: linux-acpi
Hi all,
for some years our old Mac Pro and newer Mac mini used for unit testing and VMs
annoyed me in that we could never get Wake-On-Lan working on them at all.
Some people found some pci config bit poking for some older Mac mini that did not
work on our newer Mac mini, nor on our older Mac Pro.
http://blog.dhampir.no/content/wake-on-lan-on-a-n-intel-mac-mini-with-linux
While we where setting up some new things we finally wanted this solved, and I found
a clever workaround by halting the machine to S4 instead of S5.
While of course this patch can not be applied as it. I just wanted to ask for feedback -
maybe a kernel or sysfs interface can be added to have a halt=S4 or whatever
switch as this might be useful to convince other machines to supply power to the NIC,
too.
--- linux-4.3/drivers/acpi/sleep.c.orig 2015-12-29 15:27:21.100959963 +0000
+++ linux-4.3/drivers/acpi/sleep.c 2015-12-29 15:28:36.828960630 +0000
@@ -811,7 +811,7 @@
static void acpi_power_off_prepare(void)
{
/* Prepare to power off the system */
- acpi_sleep_prepare(ACPI_STATE_S5);
+ acpi_sleep_prepare(ACPI_STATE_S4);
acpi_disable_all_gpes();
acpi_os_wait_events_complete();
}
@@ -821,7 +821,7 @@
/* acpi_sleep_prepare(ACPI_STATE_S5) should have already been called */
printk(KERN_DEBUG "%s called\n", __func__);
local_irq_disable();
- acpi_enter_sleep_state(ACPI_STATE_S5);
+ acpi_enter_sleep_state(ACPI_STATE_S4);
}
int __init acpi_sleep_init(void)
--
ExactCODE GmbH, Lietzenburger Str. 42, DE-10789 Berlin
http://exactcode.com | http://exactscan.com | http://ocrkit.com | http://t2-project.org | http://rene.rebe.de
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-01-14 16:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-13 16:40 [RFC] halt to s4 for WOL René Rebe
2016-01-13 17:06 René Rebe
2016-01-13 22:18 ` Rafael J. Wysocki
2016-01-14 14:30 ` René Rebe
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.