Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Jun 2014 15:16:20 +1000 (EST)
From:      Ian Smith <smithi@nimnet.asn.au>
To:        Anthony Jenkins <Anthony.B.Jenkins@att.net>
Cc:        Bykov Vladislav <envolyse@gmail.com>, freebsd-acpi@freebsd.org
Subject:   Re: Impossible shutdown
Message-ID:  <20140627143031.P50382@sola.nimnet.asn.au>
In-Reply-To: <53AC07A3.7070904@att.net>
References:  <20140625222911.GA34447@hellgate.Dlink> <53AC07A3.7070904@att.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 26 Jun 2014 07:44:35 -0400, Anthony Jenkins wrote:
 > On 06/25/2014 18:29, Bykov Vladislav wrote:
 > > Hello.
 > >
 > > I have a problem with ACPI on HP Envy 4 that causes in impossible shutdown. It
 > > reaches an error while prepairing to shutdown, and reboots the machine.
 > >
 > > I already did sent a bug report about 2-3 months ago, but things doesn't seems
 > > to move on.
 > >
 > > Here's an error when booting the machine:
 > >
 > > 	ACPI Error: No handler for Region [RCM0] (0xfffffe0002b0f800) [SystemCMOS] (20110527/evregion-421)
 > > 	ACPI Error: Region SystemCMOS (ID=5) has no handler (20110527/exfldio-310)
 > > 	ACPI Error: Method parse/execution failed [\134_SB_.WMID.ESDT] (Node 0xfffffe0002aee440), AE_NOT_EXIST (20110527/psparse-560)
 > > 	ACPI Error: Method parse/execution failed [\134_SB_.PCI0.LPCB.EC0_._Q42] (Node 0xfffffe0002b16d40), AE_NOT_EXIST (20110527/psparse-560)
 > > 	acpi_ec0: evaluation of query method _Q42 failed: AE_NOT_EXIST
 > >
 > > And here's the one when I'm trying to shut it down:
 > >
 > > 	usbus2: Controller shutdown complete
 > > 	ACPI Error: No handler for Region [RCM0] (0xfffffe0002b15900) [SystemCMOS] (20110527/evregion-421)
 > > 	ACPI Error: Region SystemCMOS (ID=5) has no handler (20110527/exfldio-310)
 > > 	ACPI Error: Method parse/execution failed [\_SB_.WMID.ESDT] (Node 0xfffffe0002af5800), AE_NOT_EXIST (20110527/psparse-560)
 > > 	ACPI Error: Method parse/execution failed [\_PTS] (Node 0xfffffe0002af86c0), AE_NOT_EXIST (20110527/psparse-560)
 > > 	acpi0: AcpiEnterSleepStatePrep failed - AE_NOT_EXIST
 > > 	Rebooting...
 > >
 > > I've tried FreeBSD 9, FreeBSD 10, and -CURRENT. All have the same problem.
 > 
 > Here's a case where my patch to implement the SystemCMOS region 
 > handler should help; it allows my HP Envy to power down and allows it 
 > to suspend/resume except the LCD backlight doesn't come back when 
 > resuming.  Biggest problem with the patch IMHO is I'm stealing 
 > ("borrowing") from the real time clock (RTC) I/O region, but I don't 
 > think we have an "actual" FreeBSD driver for that.
 > 
 > Reposting here, or search this list for "Naive implementation of 
 > AcpiExCmosSpaceHandler", let me know if it doesn't apply cleanly to 
 > your version of FreeBSD .  I've posted it upstream to the acpica 
 > mailing list, but no response.
 > 
 > diff --git a/source/components/events/evhandler.c b/source/components/events/evhandler.c

Interesting.  I wonder if this is needed for reading the RTC for the 
time on boot, and writing it back on shutdown - which I would have 
thought too generic to have left out on any machine?  Or is this perhaps 
retrieving at boot then restoring at shutdown some other system-specific 
information in NVRAM?

If the latter, then the usage in /sys/dev/acpi_support/acpi_ibm.c 
revealed below might illustrate another way of dealing with this?

% find /sys/ -type f -exec egrep -H 'rtcin|writertc' {} \; | grep -v drm_mode_set_crtcinfo

shows everything using the rtcin() and writertc() functions, implemented 
for x86 at least in /sys/x86/isa/atrtc.c .. but I have no idea whether 
you can access those functions from where / when you're tinkering here.

Yours looks more likely portable for upstream acpica, but it also looks 
potentially quite dangerous 'in the wrong hands' :)

cheers, Ian



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140627143031.P50382>