Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   ArchLinux General Discussion (http://www.linux-archive.org/archlinux-general-discussion/)
-   -   Problem with suspend (http://www.linux-archive.org/archlinux-general-discussion/350565-problem-suspend.html)

Csomay Mihaly 04-01-2010 09:16 PM

Problem with suspend
 
Hi,

I'm configuring suspend/resume on an Acer 1810TZ, but I have a small
problem.
I already set it up to suspend when I close the lid, I modified
/etc/acpi/actions/lm_lid.sh to this:
#! /bin/sh
DISPLAY=:0 /bin/su csm -c "/usr/bin/i3lock -c 000044"
/usr/sbin/pm-suspend

It works as expected, turns off the wifi, etc., restores fine when I hit
a button.

So I would think that running pm-suspend from a terminal would work
also, but it hangs on /usr/lib/pm-utils/sleep.d/98-smart-kernel-video.
If I move that file away, it suspends, but then the screen isn't
restored on resume, it's blank.

The worst part of it is that it worked from the command line once, but
back then I didn't know that hibernating with kms-enabled intel chips
results in memory corruption, and it killed my root partition so bad I
had to reinstall. And now it's not working. Any suggestions?
Thanks in advance.

csm

Philipp 04-01-2010 09:50 PM

Problem with suspend
 
Excerpts from Csomay Mihaly's message of 2010-04-01 23:16:13 +0200:
> Hi,
>
> I'm configuring suspend/resume on an Acer 1810TZ, but I have a small
> problem.
> I already set it up to suspend when I close the lid, I modified
> /etc/acpi/actions/lm_lid.sh to this:
> #! /bin/sh
> DISPLAY=:0 /bin/su csm -c "/usr/bin/i3lock -c 000044"
> /usr/sbin/pm-suspend

Wow, where can I read more about this?

> It works as expected, turns off the wifi, etc., restores fine when I hit
> a button.
>
> So I would think that running pm-suspend from a terminal would work
> also, but it hangs on /usr/lib/pm-utils/sleep.d/98-smart-kernel-video.
> If I move that file away, it suspends, but then the screen isn't
> restored on resume, it's blank.
>
> The worst part of it is that it worked from the command line once, but
> back then I didn't know that hibernating with kms-enabled intel chips
> results in memory corruption, and it killed my root partition so bad I
> had to reinstall. And now it's not working. Any suggestions?
> Thanks in advance.
>
> csm

For me (on acer extensa 5220) pm-suspend and pm-hibernate (as root) work
just fine, they did pre (intel) kms and they also do work fine with kms.
I didn't need to do anything, so it seem quite strange to me.

Csomay Mihaly 04-02-2010 06:59 AM

Problem with suspend
 
Philipp <hollunder@lavabit.com> writes:

> Excerpts from Csomay Mihaly's message of 2010-04-01 23:16:13 +0200:
>> Hi,
>>
>> I'm configuring suspend/resume on an Acer 1810TZ, but I have a small
>> problem.
>> I already set it up to suspend when I close the lid, I modified
>> /etc/acpi/actions/lm_lid.sh to this:
>> #! /bin/sh
>> DISPLAY=:0 /bin/su csm -c "/usr/bin/i3lock -c 000044"
>> /usr/sbin/pm-suspend
>
> Wow, where can I read more about this?

About suspending when the lid is closed?
http://wiki.archlinux.org/index.php/Acpid

>> It works as expected, turns off the wifi, etc., restores fine when I hit
>> a button.
>>
>> So I would think that running pm-suspend from a terminal would work
>> also, but it hangs on /usr/lib/pm-utils/sleep.d/98-smart-kernel-video.
>> If I move that file away, it suspends, but then the screen isn't
>> restored on resume, it's blank.
>>
>> The worst part of it is that it worked from the command line once, but
>> back then I didn't know that hibernating with kms-enabled intel chips
>> results in memory corruption, and it killed my root partition so bad I
>> had to reinstall. And now it's not working. Any suggestions?
>> Thanks in advance.
>
> For me (on acer extensa 5220) pm-suspend and pm-hibernate (as root) work
> just fine, they did pre (intel) kms and they also do work fine with kms.
> I didn't need to do anything, so it seem quite strange to me.

So you don't experience this bug?
https://bugzilla.kernel.org/show_bug.cgi?id=13811

But back to my problem, does anybody know what could be the difference
between running pm-suspend from the command line and acpid running it
from a script in /etc/acpi/actions? I tried running it from X as root,
also with sudo, and also from a tty as root, no luck whatsoever.

csm

Byron Clark 04-02-2010 01:13 PM

Problem with suspend
 
On Thu, Apr 01, 2010 at 11:16:13PM +0200, Csomay Mihaly wrote:
> So I would think that running pm-suspend from a terminal would work
> also, but it hangs on /usr/lib/pm-utils/sleep.d/98-smart-kernel-video.
> If I move that file away, it suspends, but then the screen isn't
> restored on resume, it's blank.

Sounds like you're hitting this bug: http://bugs.archlinux.org/task/18881

--
Byron Clark

Csomay Mihaly 04-02-2010 03:06 PM

Problem with suspend
 
On Fri, 2 Apr 2010 07:13:00 -0600, Byron Clark <byron@theclarkfamily.name>
wrote:
> On Thu, Apr 01, 2010 at 11:16:13PM +0200, Csomay Mihaly wrote:
>> So I would think that running pm-suspend from a terminal would work
>> also, but it hangs on /usr/lib/pm-utils/sleep.d/98-smart-kernel-video.
>> If I move that file away, it suspends, but then the screen isn't
>> restored on resume, it's blank.
>
> Sounds like you're hitting this bug:
http://bugs.archlinux.org/task/18881


That may be it, I don't have the laptop with me now, but I reinstalled on
or around 2010-03-30, which is the date of the newest grep package in
core.

Thanks for the tip, I'll try the grep from testing, and will report back.

But if that's the cause, how come it works flawlessly when acpid is
calling the same pm-suspend binary, and it only hangs when I call it
from the command line?

Byron Clark 04-02-2010 03:46 PM

Problem with suspend
 
On Fri, Apr 02, 2010 at 05:06:29PM +0200, Csomay Mihaly wrote:
> On Fri, 2 Apr 2010 07:13:00 -0600, Byron Clark <byron@theclarkfamily.name> wrote:
> > Sounds like you're hitting this bug: http://bugs.archlinux.org/task/18881
>
> But if that's the cause, how come it works flawlessly when acpid is
> calling the same pm-suspend binary, and it only hangs when I call it
> from the command line?

The bug only happens for UTF-8 locales, it is not present when LANG=C.
Suspend works from acpid because LANG is set in /etc/profile.d/locale.sh
which is only sourced for login shells. The script you run from acpid
is not a login shell.

--
Byron Clark

Csomay Mihaly 04-02-2010 07:27 PM

Problem with suspend
 
Byron Clark <byron@theclarkfamily.name> writes:

> On Fri, Apr 02, 2010 at 05:06:29PM +0200, Csomay Mihaly wrote:
>> On Fri, 2 Apr 2010 07:13:00 -0600, Byron Clark <byron@theclarkfamily.name> wrote:
>> > Sounds like you're hitting this bug: http://bugs.archlinux.org/task/18881
>>
>> But if that's the cause, how come it works flawlessly when acpid is
>> calling the same pm-suspend binary, and it only hangs when I call it
>> from the command line?
>
> The bug only happens for UTF-8 locales, it is not present when LANG=C.
> Suspend works from acpid because LANG is set in /etc/profile.d/locale.sh
> which is only sourced for login shells. The script you run from acpid
> is not a login shell.

Thank you for the tip and the explanation!
With grep from testing it works perfectly.

csm


All times are GMT. The time now is 03:36 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.