Re: [RFC] halt to s4 for WOL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Jan 13, 2016, at 23:18, Rafael J. Wysocki <rjw@xxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux