2005-10-02 17:57:17

by Pavel Machek

[permalink] [raw]
Subject: thinkpad suspend to ram and backlight

Hi!

When I suspend to RAM on x32, backlight is not turned off. (And, IIRC,
video chips is not turned off, too). Unfortunately, backlight is not
turned even when lid is closed. I know some patches were floating
around to solve that... but I can't find them now. Any ideas?
Pavel
--
if you have sharp zaurus hardware you don't need... you know my address


2005-10-02 18:07:32

by Jan Spitalnik

[permalink] [raw]
Subject: Re: thinkpad suspend to ram and backlight

Dne ne 2. ??jna 2005 19:57 Pavel Machek napsal(a):
> Hi!
>
> When I suspend to RAM on x32, backlight is not turned off. (And, IIRC,
> video chips is not turned off, too). Unfortunately, backlight is not
> turned even when lid is closed. I know some patches were floating
> around to solve that... but I can't find them now. Any ideas?
> Pavel

Hi,

if your thinkpad has ati radeon, you can use this:

http://www.thinkwiki.org/wiki/Radeontool

--
Jan Spitalnik
[email protected]

2005-10-02 18:10:26

by Pavel Machek

[permalink] [raw]
Subject: Re: thinkpad suspend to ram and backlight

Hi!

> > When I suspend to RAM on x32, backlight is not turned off. (And, IIRC,
> > video chips is not turned off, too). Unfortunately, backlight is not
> > turned even when lid is closed. I know some patches were floating
> > around to solve that... but I can't find them now. Any ideas?
>
> if your thinkpad has ati radeon, you can use this:
>
> http://www.thinkwiki.org/wiki/Radeontool

There were patches floating around. I'd like to see those patches even
if I can work around that with radeontool.
Pavel

--
if you have sharp zaurus hardware you don't need... you know my address

2005-10-02 18:14:40

by Dan C Marinescu

[permalink] [raw]
Subject: Re: thinkpad suspend to ram and backlight


http://www.ussg.iu.edu/hypermail/linux/kernel/0503.2/0268.html

daniel


--- Pavel Machek <[email protected]> wrote:

> Hi!
>
> When I suspend to RAM on x32, backlight is not
> turned off. (And, IIRC,
> video chips is not turned off, too). Unfortunately,
> backlight is not
> turned even when lid is closed. I know some patches
> were floating
> around to solve that... but I can't find them now.
> Any ideas?
> Pavel
> --
> if you have sharp zaurus hardware you don't need...
> you know my address
> -
> To unsubscribe from this list: send the line
> "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at
> http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>




__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com

2005-10-02 18:24:10

by Pavel Machek

[permalink] [raw]
Subject: Re: thinkpad suspend to ram and backlight

Hi!

> > When I suspend to RAM on x32, backlight is not turned off. (And, IIRC,
> > video chips is not turned off, too). Unfortunately, backlight is not
> > turned even when lid is closed. I know some patches were floating
> > around to solve that... but I can't find them now. Any ideas?
>
> if your thinkpad has ati radeon, you can use this:
>
> http://www.thinkwiki.org/wiki/Radeontool

radeontool light off before suspend indeed works, but I'd like to
solve it properly.
Pavel
--
if you have sharp zaurus hardware you don't need... you know my address

2005-10-02 23:14:25

by Benjamin Herrenschmidt

[permalink] [raw]
Subject: Re: thinkpad suspend to ram and backlight

On Sun, 2005-10-02 at 20:23 +0200, Pavel Machek wrote:
> Hi!
>
> > > When I suspend to RAM on x32, backlight is not turned off. (And, IIRC,
> > > video chips is not turned off, too). Unfortunately, backlight is not
> > > turned even when lid is closed. I know some patches were floating
> > > around to solve that... but I can't find them now. Any ideas?
> >
> > if your thinkpad has ati radeon, you can use this:
> >
> > http://www.thinkwiki.org/wiki/Radeontool
>
> radeontool light off before suspend indeed works, but I'd like to
> solve it properly.

Well, it depends what you call "properly". There are indeed some patches
floating around that put the radeon chip in D2 state, that seem to help.
The problem is that the actual backlight control is a bit dodgy. That
is, some laptops use a separate chip from the radeon, some use the
radeon but have an inverted backlight signal, etc... and radeonfb
doesn't quite know how to deal with those cases (it has some hard coded
lists of machines with infos on how to deal with them for ppc).

Just dig around the list for the thinkpad suspend patches. I'm not 100%
sure they are correct yet though, but I suppose I should give them
another review and eventually merge them one of these days.

Ben.


2005-10-02 23:35:40

by Pavel Machek

[permalink] [raw]
Subject: Re: thinkpad suspend to ram and backlight

Hi!

> > > > When I suspend to RAM on x32, backlight is not turned off. (And, IIRC,
> > > > video chips is not turned off, too). Unfortunately, backlight is not
> > > > turned even when lid is closed. I know some patches were floating
> > > > around to solve that... but I can't find them now. Any ideas?
> > >
> > > if your thinkpad has ati radeon, you can use this:
> > >
> > > http://www.thinkwiki.org/wiki/Radeontool
> >
> > radeontool light off before suspend indeed works, but I'd like to
> > solve it properly.
>
> Well, it depends what you call "properly".

I'd like it to work as well as it does for PPC :-).

> There are indeed some patches
> floating around that put the radeon chip in D2 state, that seem to
> help.

I found that patch with a little help from the list. Unfortunately, it
makes things worse (not better) on my X32. [There was another
regression here. With 2.6.8 or so, backlight was off during S3 sleep
(but chip still running and eating power). With 2.6.14-rc3, not only
chip is running, but backlight is forced to max to add an insult to
the injury].
Pavel
--
if you have sharp zaurus hardware you don't need... you know my address

2005-10-03 00:18:46

by Benjamin Herrenschmidt

[permalink] [raw]
Subject: Re: thinkpad suspend to ram and backlight

On Mon, 2005-10-03 at 01:35 +0200, Pavel Machek wrote:

> I found that patch with a little help from the list. Unfortunately, it
> makes things worse (not better) on my X32. [There was another
> regression here. With 2.6.8 or so, backlight was off during S3 sleep
> (but chip still running and eating power). With 2.6.14-rc3, not only
> chip is running, but backlight is forced to max to add an insult to
> the injury].

You may have one of those setups with the backlight working backward...

Ben.


2005-10-03 10:00:46

by Stefan Seyfried

[permalink] [raw]
Subject: Re: thinkpad suspend to ram and backlight

Pavel Machek wrote:
> Hi!
>
> When I suspend to RAM on x32, backlight is not turned off. (And, IIRC,
> video chips is not turned off, too). Unfortunately, backlight is not
> turned even when lid is closed. I know some patches were floating
> around to solve that... but I can't find them now. Any ideas?

Which framebuffer driver? Vesafb works for Timo, at least he did not
complain lately ;-)
--
Stefan Seyfried \ "I didn't want to write for pay. I
QA / R&D Team Mobile Devices \ wanted to be paid for what I write."
SUSE LINUX Products GmbH, N?rnberg \ -- Leonard Cohen

2005-10-04 11:44:28

by Pavel Machek

[permalink] [raw]
Subject: Re: thinkpad suspend to ram and backlight

Hi!

> > When I suspend to RAM on x32, backlight is not turned off. (And, IIRC,
> > video chips is not turned off, too). Unfortunately, backlight is not
> > turned even when lid is closed. I know some patches were floating
> > around to solve that... but I can't find them now. Any ideas?
>
> Which framebuffer driver? Vesafb works for Timo, at least he did not
> complain lately ;-)

I really want radeonfb... I can try vesa, but long term this needs
solutions in radeon.
Pavel

--
if you have sharp zaurus hardware you don't need... you know my address

2005-10-04 12:01:08

by Timo Hoenig

[permalink] [raw]
Subject: Re: thinkpad suspend to ram and backlight

Hi,

On Mon, 2005-10-03 at 12:00 +0200, Stefan Seyfried wrote:

> Pavel Machek wrote:
> > Hi!
> >
> > When I suspend to RAM on x32, backlight is not turned off. (And, IIRC,
> > video chips is not turned off, too). Unfortunately, backlight is not
> > turned even when lid is closed. I know some patches were floating
> > around to solve that... but I can't find them now. Any ideas?
>
> Which framebuffer driver? Vesafb works for Timo, at least he did not
> complain lately ;-)

It's never too late to complain: I just gave it a try with vesfb.
Backlight stays on.

When eying the display precisely it seems to be switched off for a short
moment once the system enters S3 but then gets turned on again.

Timo

2005-10-04 12:04:00

by Pavel Machek

[permalink] [raw]
Subject: Re: thinkpad suspend to ram and backlight

Hi!

> > > When I suspend to RAM on x32, backlight is not turned off. (And, IIRC,
> > > video chips is not turned off, too). Unfortunately, backlight is not
> > > turned even when lid is closed. I know some patches were floating
> > > around to solve that... but I can't find them now. Any ideas?
> >
> > Which framebuffer driver? Vesafb works for Timo, at least he did not
> > complain lately ;-)
>
> It's never too late to complain: I just gave it a try with vesfb.
> Backlight stays on.
>
> When eying the display precisely it seems to be switched off for a short
> moment once the system enters S3 but then gets turned on again.

Yes, same with radeonfb here.

I use

#!/bin/bash
radeontool light off
echo 3 > /proc/acpi/sleep
radeontool light on

...and it works most of the time. Sometimes screen is corrupted after
resume, another suspend/resume cycle cures that. (Strange!)

Pavel
--
if you have sharp zaurus hardware you don't need... you know my address

2005-10-04 12:04:36

by Rolf Offermanns

[permalink] [raw]
Subject: Re: thinkpad suspend to ram and backlight

Pavel Machek wrote:

> Hi!
>
>> > When I suspend to RAM on x32, backlight is not turned off. (And, IIRC,
>> > video chips is not turned off, too). Unfortunately, backlight is not
>> > turned even when lid is closed. I know some patches were floating
>> > around to solve that... but I can't find them now. Any ideas?
>>
>> Which framebuffer driver? Vesafb works for Timo, at least he did not
>> complain lately ;-)
>
> I really want radeonfb... I can try vesa, but long term this needs
> solutions in radeon.
> Pavel
>
You could use radeontool [1] as a temporary solution.

-Rolf

[1] http://fdd.com/software/radeon/

2005-10-04 12:14:04

by Timo Hoenig

[permalink] [raw]
Subject: Re: thinkpad suspend to ram and backlight

Hi,

On Tue, 2005-10-04 at 14:03 +0200, Pavel Machek wrote:

> > When eying the display precisely it seems to be switched off for a short
> > moment once the system enters S3 but then gets turned on again.
>
> Yes, same with radeonfb here.
>
> I use
>
> #!/bin/bash
> radeontool light off
> echo 3 > /proc/acpi/sleep
> radeontool light on

Well, if we're already discussing workarounds which shouldn't be needed.
With ibm_acpi loaded this should help:

#!/bin/bash
echo lcd_disable > /proc/acpi/ibm/video
echo 3 > /proc/acpi/sleep
echo lcd_enable > /proc/acpi/ibm/video

> ...and it works most of the time. Sometimes screen is corrupted after
> resume, another suspend/resume cycle cures that. (Strange!)

I haven't encountered screen corruption until now.

> Pavel

Timo