* [intel/acpi] backlight
@ 2008-11-28 6:47 Yves-Alexis Perez
2008-11-28 19:18 ` [intel/acpi] backlight - T61 Len Brown
2008-12-01 1:08 ` [intel/acpi] backlight Zhao Yakui
0 siblings, 2 replies; 16+ messages in thread
From: Yves-Alexis Perez @ 2008-11-28 6:47 UTC (permalink / raw)
To: linux-acpi
[-- Attachment #1: Type: text/plain, Size: 683 bytes --]
Hi,
I'm running linux 2.6.28-rc6-00007-ged31348 on my Thinkpad T61, with
Intel GM965. Under X, brightness keys work fine most of the time, but in
some case it fails (for example after a dpms force off, but not always).
Switching to console and back to X fix the problem for a time.
Another weird stuff is that, in single user, I have no way to control
the backlight. Using brightness key doesn't work,
and /sys/class/backlight/acpi_video0 doesn't do anything.
I know there was a lot of enhancements with OpRegion stuff for 2.6.27
and 2.6.28, and it's maybe not finished, but are those problems known?
Cheers, and many thanks for the good work :)
--
Yves-Alexis
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [intel/acpi] backlight - T61
2008-11-28 6:47 [intel/acpi] backlight Yves-Alexis Perez
@ 2008-11-28 19:18 ` Len Brown
2008-11-28 22:38 ` Thomas Renninger
2008-11-28 22:50 ` Yves-Alexis Perez
2008-12-01 1:08 ` [intel/acpi] backlight Zhao Yakui
1 sibling, 2 replies; 16+ messages in thread
From: Len Brown @ 2008-11-28 19:18 UTC (permalink / raw)
To: Yves-Alexis Perez
Cc: linux-acpi, dri-devel, jbarnes, Thomas Renninger, Matthew Garrett,
Zhang Rui, Keith Packard
On Fri, 28 Nov 2008, Yves-Alexis Perez wrote:
> I'm running linux 2.6.28-rc6-00007-ged31348 on my Thinkpad T61, with
> Intel GM965. Under X, brightness keys work fine most of the time, but in
> some case it fails (for example after a dpms force off, but not always).
> Switching to console and back to X fix the problem for a time.
How to you invoke DPMS?
I'm running the latest 2.6.28 on top of FC9, and I find that
if I use the hot keys to dim the screen all the way,
and then I'm idle for a period, the screen pretends to go black.
(X foolishly paits the pixels black, but keeps the backlight on)
Then when I touch the mouse to wake it up, my screen unlock
prompt is at full brightness, and so is my screen when I unlock.
So it seems that X forgot that I set the brightness.
(though clicking the brightness hotkey shows the widget still
thinks I'm at minimum brightness, so that part remembered...)
Now the backlight is totally screwed up.
I use the hotkeys to get to minimum brightness,
but something thinks I'm still at maximum brightness,
because after some idle time, the screen all by itself
goes bright.
> Another weird stuff is that, in single user, I have no way to control
> the backlight. Using brightness key doesn't work,
> and /sys/class/backlight/acpi_video0 doesn't do anything.
There are actually two text consoles -- CTRL-ALT-F1 while X is running
and single-user mode.
The hot keys have never worked for either of these modes.
I would hope that X (i915) should be able to handle brightness
in CTRL-ALT-F1 mode the same way that it does in GUI mode,
but that doesn't seem to be working.
Then there is single-user-mode, where X never ran
and the i915 may not even be loaded...
We used to have /sys/class/backlight and /proc/acpi/video
available and they used to work in single-user mode
(as well as in CTRL-ALT-F1) mode. This was due to
there being two video devices. Unfortunately, we deleted
the one what works in this scenario.
Try this patch, which brings it back.
thanks,
-Len
>From d5b5f1bf810dcc87d5d6adb6efbaee8bff6d796c Mon Sep 17 00:00:00 2001
From: Len Brown <len.brown@intel.com>
Date: Fri, 28 Nov 2008 14:02:52 -0500
Subject: [PATCH] Partial revert "ACPI: video: Ignore devices that aren't present in hardware"
Organization: Intel Open Source Technology Center
22c13f9d8179f4c9caecfcb60a95214562b9addc
"ACPI: video: Ignore devices that aren't present in hardware"
caused the 2nd /proc/acpi/video
and /sys/firmware/backlight device to go away,
making software brightness control unavailable
in single-user-mode and X text-console-mode,
on a Thinkpad T61.
Signed-off-by: Len Brown <len.brown@intel.com>
---
drivers/acpi/video.c | 6 ------
1 files changed, 0 insertions(+), 6 deletions(-)
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index baa4419..f930413 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -845,16 +845,10 @@ static void acpi_video_bus_find_cap(struct acpi_video_bus *video)
static int acpi_video_bus_check(struct acpi_video_bus *video)
{
acpi_status status = -ENOENT;
- struct device *dev;
if (!video)
return -EINVAL;
- dev = acpi_get_physical_pci_device(video->device->handle);
- if (!dev)
- return -ENODEV;
- put_device(dev);
-
/* Since there is no HID, CID and so on for VGA driver, we have
* to check well known required nodes.
*/
--
1.6.0.4.836.gd5cb
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [intel/acpi] backlight - T61
2008-11-28 19:18 ` [intel/acpi] backlight - T61 Len Brown
@ 2008-11-28 22:38 ` Thomas Renninger
2008-11-28 22:50 ` Yves-Alexis Perez
1 sibling, 0 replies; 16+ messages in thread
From: Thomas Renninger @ 2008-11-28 22:38 UTC (permalink / raw)
To: Len Brown
Cc: Yves-Alexis Perez, linux-acpi, dri-devel, jbarnes,
Matthew Garrett, Zhang Rui, Keith Packard
On Friday 28 November 2008 08:18:54 pm Len Brown wrote:
> On Fri, 28 Nov 2008, Yves-Alexis Perez wrote:
> > I'm running linux 2.6.28-rc6-00007-ged31348 on my Thinkpad T61, with
> > Intel GM965. Under X, brightness keys work fine most of the time, but in
> > some case it fails (for example after a dpms force off, but not always).
> > Switching to console and back to X fix the problem for a time.
>
> How to you invoke DPMS?
>
> I'm running the latest 2.6.28 on top of FC9, and I find that
> if I use the hot keys to dim the screen all the way,
> and then I'm idle for a period, the screen pretends to go black.
> (X foolishly paits the pixels black, but keeps the backlight on)
> Then when I touch the mouse to wake it up, my screen unlock
> prompt is at full brightness, and so is my screen when I unlock.
> So it seems that X forgot that I set the brightness.
> (though clicking the brightness hotkey shows the widget still
> thinks I'm at minimum brightness, so that part remembered...)
>
> Now the backlight is totally screwed up.
> I use the hotkeys to get to minimum brightness,
> but something thinks I'm still at maximum brightness,
> because after some idle time, the screen all by itself
> goes bright.
>
> > Another weird stuff is that, in single user, I have no way to control
> > the backlight. Using brightness key doesn't work,
> > and /sys/class/backlight/acpi_video0 doesn't do anything.
>
> There are actually two text consoles -- CTRL-ALT-F1 while X is running
> and single-user mode.
>
> The hot keys have never worked for either of these modes.
>
> I would hope that X (i915) should be able to handle brightness
> in CTRL-ALT-F1 mode the same way that it does in GUI mode,
> but that doesn't seem to be working.
>
> Then there is single-user-mode, where X never ran
> and the i915 may not even be loaded...
>
> We used to have /sys/class/backlight and /proc/acpi/video
> available and they used to work in single-user mode
> (as well as in CTRL-ALT-F1) mode. This was due to
> there being two video devices. Unfortunately, we deleted
> the one what works in this scenario.
>
> Try this patch, which brings it back.
No!!!
Not again.
It will work, but it is wrong.
You might poke on HW IO which is not there.
The latest ThinkPads and your T61, if you have the latest BIOS,
are known to work with IGD aka OpRegion support.
This is the code which should switch your backlight:
drivers/gpu/drm/i915/i915_opregion.c
and this is the spec describing how it should work:
http://intellinuxgraphics.org/ACPI_IGD_OpRegion_%20Spec.pdf
Thomas
> thanks,
> -Len
>
> From d5b5f1bf810dcc87d5d6adb6efbaee8bff6d796c Mon Sep 17 00:00:00 2001
> From: Len Brown <len.brown@intel.com>
> Date: Fri, 28 Nov 2008 14:02:52 -0500
> Subject: [PATCH] Partial revert "ACPI: video: Ignore devices that aren't
> present in hardware" Organization: Intel Open Source Technology Center
>
> 22c13f9d8179f4c9caecfcb60a95214562b9addc
> "ACPI: video: Ignore devices that aren't present in hardware"
>
> caused the 2nd /proc/acpi/video
> and /sys/firmware/backlight device to go away,
> making software brightness control unavailable
> in single-user-mode and X text-console-mode,
> on a Thinkpad T61.
>
> Signed-off-by: Len Brown <len.brown@intel.com>
> ---
> drivers/acpi/video.c | 6 ------
> 1 files changed, 0 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
> index baa4419..f930413 100644
> --- a/drivers/acpi/video.c
> +++ b/drivers/acpi/video.c
> @@ -845,16 +845,10 @@ static void acpi_video_bus_find_cap(struct
> acpi_video_bus *video) static int acpi_video_bus_check(struct
> acpi_video_bus *video)
> {
> acpi_status status = -ENOENT;
> - struct device *dev;
>
> if (!video)
> return -EINVAL;
>
> - dev = acpi_get_physical_pci_device(video->device->handle);
> - if (!dev)
> - return -ENODEV;
> - put_device(dev);
> -
> /* Since there is no HID, CID and so on for VGA driver, we have
> * to check well known required nodes.
> */
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [intel/acpi] backlight - T61
2008-11-28 19:18 ` [intel/acpi] backlight - T61 Len Brown
2008-11-28 22:38 ` Thomas Renninger
@ 2008-11-28 22:50 ` Yves-Alexis Perez
2008-12-01 1:32 ` Zhang Rui
1 sibling, 1 reply; 16+ messages in thread
From: Yves-Alexis Perez @ 2008-11-28 22:50 UTC (permalink / raw)
To: Len Brown
Cc: linux-acpi, dri-devel, jbarnes, Thomas Renninger, Matthew Garrett,
Zhang Rui, Keith Packard
[-- Attachment #1: Type: text/plain, Size: 2846 bytes --]
On ven, 2008-11-28 at 14:18 -0500, Len Brown wrote:
> On Fri, 28 Nov 2008, Yves-Alexis Perez wrote:
>
> > I'm running linux 2.6.28-rc6-00007-ged31348 on my Thinkpad T61, with
> > Intel GM965. Under X, brightness keys work fine most of the time, but in
> > some case it fails (for example after a dpms force off, but not always).
> > Switching to console and back to X fix the problem for a time.
>
> How to you invoke DPMS?
xorg.conf:
Section "ServerFlags"
Option "StandbyTime" "0"
Option "SuspendTime" "0"
Option "OffTime" "5"
EndSection
>
> I'm running the latest 2.6.28 on top of FC9, and I find that
> if I use the hot keys to dim the screen all the way,
> and then I'm idle for a period, the screen pretends to go black.
> (X foolishly paits the pixels black, but keeps the backlight on)
> Then when I touch the mouse to wake it up, my screen unlock
> prompt is at full brightness, and so is my screen when I unlock.
> So it seems that X forgot that I set the brightness.
> (though clicking the brightness hotkey shows the widget still
> thinks I'm at minimum brightness, so that part remembered...)
>
> Now the backlight is totally screwed up.
> I use the hotkeys to get to minimum brightness,
> but something thinks I'm still at maximum brightness,
> because after some idle time, the screen all by itself
> goes bright.
Well I think that gnome-power-manager might be in your way, not sure.
>
> > Another weird stuff is that, in single user, I have no way to control
> > the backlight. Using brightness key doesn't work,
> > and /sys/class/backlight/acpi_video0 doesn't do anything.
>
> There are actually two text consoles -- CTRL-ALT-F1 while X is running
> and single-user mode.
>
> The hot keys have never worked for either of these modes.
Yes I know, that's why I'm asking here. They are not supposed to work
atm because OpRegion needs X support. What I was asking is if there was
something in cooking for that. But what puzzles me is that even
the /sys/class/backlight/acpi_video0 doesn't work.
>
> I would hope that X (i915) should be able to handle brightness
> in CTRL-ALT-F1 mode the same way that it does in GUI mode,
> but that doesn't seem to be working.
>
> Then there is single-user-mode, where X never ran
> and the i915 may not even be loaded...
>
> We used to have /sys/class/backlight and /proc/acpi/video
> available and they used to work in single-user mode
> (as well as in CTRL-ALT-F1) mode. This was due to
> there being two video devices. Unfortunately, we deleted
> the one what works in this scenario.
>
> Try this patch, which brings it back.
No, I don't want to revert those patches, they are there for a reason.
But yeah there is some console support missing, which may be working on.
Cheers,
--
Yves-Alexis
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [intel/acpi] backlight
2008-11-28 6:47 [intel/acpi] backlight Yves-Alexis Perez
2008-11-28 19:18 ` [intel/acpi] backlight - T61 Len Brown
@ 2008-12-01 1:08 ` Zhao Yakui
2008-12-01 3:28 ` Len Brown
2008-12-01 11:11 ` Yves-Alexis Perez
1 sibling, 2 replies; 16+ messages in thread
From: Zhao Yakui @ 2008-12-01 1:08 UTC (permalink / raw)
To: Yves-Alexis Perez; +Cc: linux-acpi@vger.kernel.org
On Fri, 2008-11-28 at 14:47 +0800, Yves-Alexis Perez wrote:
> Hi,
>
> I'm running linux 2.6.28-rc6-00007-ged31348 on my Thinkpad T61, with
> Intel GM965. Under X, brightness keys work fine most of the time, but in
> some case it fails (for example after a dpms force off, but not always).
> Switching to console and back to X fix the problem for a time.
Will you please confirm whether the issue still exists if DPMS is not
used?
>
> Another weird stuff is that, in single user, I have no way to control
> the backlight. Using brightness key doesn't work,
> and /sys/class/backlight/acpi_video0 doesn't do anything.
Can you confirm whether the i915 driver is loaded in single user mode?
If not, please load it and see whether the interface
of /sys/class/backlight/* can work.
>
> I know there was a lot of enhancements with OpRegion stuff for 2.6.27
> and 2.6.28, and it's maybe not finished, but are those problems known?
>
> Cheers, and many thanks for the good work :)
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [intel/acpi] backlight - T61
2008-11-28 22:50 ` Yves-Alexis Perez
@ 2008-12-01 1:32 ` Zhang Rui
2008-12-01 3:18 ` Len Brown
0 siblings, 1 reply; 16+ messages in thread
From: Zhang Rui @ 2008-12-01 1:32 UTC (permalink / raw)
To: Yves-Alexis Perez
Cc: Len Brown, linux-acpi@vger.kernel.org,
dri-devel@lists.sourceforge.net, jbarnes@virtuousgeek.org,
Thomas Renninger, Matthew Garrett, Keith Packard
On Sat, 2008-11-29 at 06:50 +0800, Yves-Alexis Perez wrote:
> On ven, 2008-11-28 at 14:18 -0500, Len Brown wrote:
> > On Fri, 28 Nov 2008, Yves-Alexis Perez wrote:
> >
> > > I'm running linux 2.6.28-rc6-00007-ged31348 on my Thinkpad T61, with
> > > Intel GM965. Under X, brightness keys work fine most of the time, but in
> > > some case it fails (for example after a dpms force off, but not always).
> > > Switching to console and back to X fix the problem for a time.
> >
> > How to you invoke DPMS?
>
> xorg.conf:
> Section "ServerFlags"
> Option "StandbyTime" "0"
> Option "SuspendTime" "0"
> Option "OffTime" "5"
> EndSection
> >
> > I'm running the latest 2.6.28 on top of FC9, and I find that
> > if I use the hot keys to dim the screen all the way,
> > and then I'm idle for a period, the screen pretends to go black.
> > (X foolishly paits the pixels black, but keeps the backlight on)
> > Then when I touch the mouse to wake it up, my screen unlock
> > prompt is at full brightness, and so is my screen when I unlock.
> > So it seems that X forgot that I set the brightness.
> > (though clicking the brightness hotkey shows the widget still
> > thinks I'm at minimum brightness, so that part remembered...)
> >
> > Now the backlight is totally screwed up.
> > I use the hotkeys to get to minimum brightness,
> > but something thinks I'm still at maximum brightness,
> > because after some idle time, the screen all by itself
> > goes bright.
>
> Well I think that gnome-power-manager might be in your way, not sure.
> >
> > > Another weird stuff is that, in single user, I have no way to control
> > > the backlight. Using brightness key doesn't work,
> > > and /sys/class/backlight/acpi_video0 doesn't do anything.
> >
> > There are actually two text consoles -- CTRL-ALT-F1 while X is running
> > and single-user mode.
> >
> > The hot keys have never worked for either of these modes.
>
> Yes I know, that's why I'm asking here. They are not supposed to work
> atm because OpRegion needs X support. What I was asking is if there was
> something in cooking for that. But what puzzles me is that even
> the /sys/class/backlight/acpi_video0 doesn't work.
when poking the /sys/class/backlight/acpi_video0/, ACPI will do nothing
but notifying the graphics, only the i915 driver can change the
backlight if it's loaded.
> >
> > I would hope that X (i915) should be able to handle brightness
> > in CTRL-ALT-F1 mode the same way that it does in GUI mode,
> > but that doesn't seem to be working.
> >
> > Then there is single-user-mode, where X never ran
> > and the i915 may not even be loaded...
> >
> > We used to have /sys/class/backlight and /proc/acpi/video
> > available and they used to work in single-user mode
> > (as well as in CTRL-ALT-F1) mode. This was due to
> > there being two video devices. Unfortunately, we deleted
> > the one what works in this scenario.
> >
> > Try this patch, which brings it back.
>
this (both X and ACPI cam control the backlight, in different ways) is
dangerous as we know,
and IMO, removing such interfaces and controlling backlight only in the
native graphics driver is what the IGD OpRegion designed for.
> No, I don't want to revert those patches, they are there for a reason.
> But yeah there is some console support missing, which may be working on.
>
IMO, after loading i915 driver, the ACPI backlight I/F can work again,
right?
If this is true, why not always loading i915 both in X and console mode?
the kernel mode setting should not only work for X mode.
thanks,
rui
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [intel/acpi] backlight - T61
2008-12-01 1:32 ` Zhang Rui
@ 2008-12-01 3:18 ` Len Brown
2008-12-01 5:08 ` Zhang Rui
0 siblings, 1 reply; 16+ messages in thread
From: Len Brown @ 2008-12-01 3:18 UTC (permalink / raw)
To: Zhang Rui
Cc: Yves-Alexis Perez, linux-acpi@vger.kernel.org,
dri-devel@lists.sourceforge.net, jbarnes@virtuousgeek.org,
Thomas Renninger, Matthew Garrett, Keith Packard
> IMO, after loading i915 driver, the ACPI backlight I/F can work again,
> right?
No.
hotkeys have never worked in console mode,
but in 2.6.27, echo into /proc and /sys did work in console mode
and in 2.6.28 they do not. So this is a regression.
> If this is true, why not always loading i915 both in X and console mode?
> the kernel mode setting should not only work for X mode.
I agree that the i915 driver should handle brightness, no matter if we
are in GUI mode or console mode. Unfortunately, today it
doesn't seem to do anything in console mode.
That is why I pointed out that the regression here was
when we deleted the /proc and /sys nodes that actualy work
from console mode...
On a brightner note, I'm pleased to report that after upgrading
my T61 to FC10 from FC9, the brightness suddenly became consistent
across screen saver events. ie. the brightness I set via hotkey
before the screen saver event was restored after the screen
comes back from screen blank.
However, testing FC10 with the latest upstream kernel,
including the i915 changes that appeared today...
it seems that GUI mode forgets the brighness when
I switch to console mode. Eg. If I use /sys or
hotkeys in GUI mode to reduce brightness to 0,
it stays dim when I switch to console mode,
but switches back to max brightness when
I switch back to GUI mode.
-Len
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [intel/acpi] backlight
2008-12-01 1:08 ` [intel/acpi] backlight Zhao Yakui
@ 2008-12-01 3:28 ` Len Brown
2008-12-01 8:38 ` Matthew Garrett
2008-12-01 11:11 ` Yves-Alexis Perez
1 sibling, 1 reply; 16+ messages in thread
From: Len Brown @ 2008-12-01 3:28 UTC (permalink / raw)
To: Zhao Yakui; +Cc: Yves-Alexis Perez, linux-acpi@vger.kernel.org
On Mon, 1 Dec 2008, Zhao Yakui wrote:
> On Fri, 2008-11-28 at 14:47 +0800, Yves-Alexis Perez wrote:
> > Hi,
> >
> > I'm running linux 2.6.28-rc6-00007-ged31348 on my Thinkpad T61, with
> > Intel GM965. Under X, brightness keys work fine most of the time, but in
> > some case it fails (for example after a dpms force off, but not always).
> > Switching to console and back to X fix the problem for a time.
> Will you please confirm whether the issue still exists if DPMS is not
> used?
I don't have DPMS enabled, and if editing xorg.conf is required
to enable it, I never will.
> > Another weird stuff is that, in single user, I have no way to control
> > the backlight. Using brightness key doesn't work,
> > and /sys/class/backlight/acpi_video0 doesn't do anything.
> Can you confirm whether the i915 driver is loaded in single user mode?
> If not, please load it and see whether the interface
> of /sys/class/backlight/* can work.
In 2.6.28...
in single user mode, i915 is not loaded,
/sys/class/backlight/acpi_video0 does NOT work
modprobe of i915 does not change this.
In 2.6.27
in single user mode, i915 is not loaded,
/sys/class/backlight/acpi_video0 does NOT work
/sys/class/backlight/acpi_video1 DOES work
modprobe of i915 does not change this.
-Len
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [intel/acpi] backlight - T61
2008-12-01 3:18 ` Len Brown
@ 2008-12-01 5:08 ` Zhang Rui
2008-12-03 23:14 ` Zhenyu Wang
0 siblings, 1 reply; 16+ messages in thread
From: Zhang Rui @ 2008-12-01 5:08 UTC (permalink / raw)
To: Len Brown
Cc: Yves-Alexis Perez, linux-acpi@vger.kernel.org,
dri-devel@lists.sourceforge.net, jbarnes@virtuousgeek.org,
Thomas Renninger, Matthew Garrett, Keith Packard
On Mon, 2008-12-01 at 11:18 +0800, Len Brown wrote:
>
> > IMO, after loading i915 driver, the ACPI backlight I/F can work again,
> > right?
>
> No.
> hotkeys have never worked in console mode,
that's bad. We should try to work this out.
len, can you please send me the acpidump output of your x60?
> but in 2.6.27, echo into /proc and /sys did work in console mode
> and in 2.6.28 they do not. So this is a regression.
>
> > If this is true, why not always loading i915 both in X and console mode?
> > the kernel mode setting should not only work for X mode.
>
> I agree that the i915 driver should handle brightness, no matter if we
> are in GUI mode or console mode. Unfortunately, today it
> doesn't seem to do anything in console mode.
>
> That is why I pointed out that the regression here was
> when we deleted the /proc and /sys nodes that actualy work
> from console mode...
>
> On a brightner note, I'm pleased to report that after upgrading
> my T61 to FC10 from FC9, the brightness suddenly became consistent
> across screen saver events. ie. the brightness I set via hotkey
> before the screen saver event was restored after the screen
> comes back from screen blank.
>
> However, testing FC10 with the latest upstream kernel,
> including the i915 changes that appeared today...
> it seems that GUI mode forgets the brighness when
> I switch to console mode. Eg. If I use /sys or
> hotkeys in GUI mode to reduce brightness to 0,
> it stays dim when I switch to console mode,
> but switches back to max brightness when
> I switch back to GUI mode.
hah, that's a done by X.
ZhenYu pointed out that the graphics driver will set the backlight to
maximum if it is 0 when switching to GUI.
what if reducing the brightness to a lower but not 0 level?
it should switch back to the original value, right?
cc ZhenYU. :)
thanks,
rui
--
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] 16+ messages in thread
* Re: [intel/acpi] backlight
2008-12-01 3:28 ` Len Brown
@ 2008-12-01 8:38 ` Matthew Garrett
2008-12-01 19:27 ` Jesse Barnes
0 siblings, 1 reply; 16+ messages in thread
From: Matthew Garrett @ 2008-12-01 8:38 UTC (permalink / raw)
To: Len Brown
Cc: Zhao Yakui, Yves-Alexis Perez, linux-acpi@vger.kernel.org,
jbarnes
On Sun, Nov 30, 2008 at 10:28:30PM -0500, Len Brown wrote:
(Cc:ing Jesse)
> in single user mode, i915 is not loaded,
> /sys/class/backlight/acpi_video0 does NOT work
>
> modprobe of i915 does not change this.
Jesse, are IRQs being delivered to the drm code when X isn't the
foreground VT? If not, this would seem to need fixing.
--
Matthew Garrett | mjg59@srcf.ucam.org
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [intel/acpi] backlight
2008-12-01 1:08 ` [intel/acpi] backlight Zhao Yakui
2008-12-01 3:28 ` Len Brown
@ 2008-12-01 11:11 ` Yves-Alexis Perez
1 sibling, 0 replies; 16+ messages in thread
From: Yves-Alexis Perez @ 2008-12-01 11:11 UTC (permalink / raw)
To: Zhao Yakui; +Cc: linux-acpi@vger.kernel.org
On Mon, Dec 01, 2008 at 09:08:35AM +0800, Zhao Yakui wrote:
> On Fri, 2008-11-28 at 14:47 +0800, Yves-Alexis Perez wrote:
> > Hi,
> >
> > I'm running linux 2.6.28-rc6-00007-ged31348 on my Thinkpad T61, with
> > Intel GM965. Under X, brightness keys work fine most of the time, but in
> > some case it fails (for example after a dpms force off, but not always).
> > Switching to console and back to X fix the problem for a time.
> Will you please confirm whether the issue still exists if DPMS is not
> used?
I've disabled DPMS in xorg.conf (setting all times to 0) and will report
back. But basically I think it was broken only after a DPMS event.
> >
> > Another weird stuff is that, in single user, I have no way to control
> > the backlight. Using brightness key doesn't work,
> > and /sys/class/backlight/acpi_video0 doesn't do anything.
> Can you confirm whether the i915 driver is loaded in single user mode?
It's not
> If not, please load it and see whether the interface
> of /sys/class/backlight/* can work.
When loading it, I still only have acpi_video0 (which is good, at least
I don't have two devices), but it doesnt work. Echoing stuff in
brightness changes the value inside, and in actual_brightness, but the
screen doesn't dim.
This is using 2.6.28-rc6-00184-gd9d060a
Cheers,
--
Yves-Alexis
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [intel/acpi] backlight
2008-12-01 8:38 ` Matthew Garrett
@ 2008-12-01 19:27 ` Jesse Barnes
2008-12-01 19:32 ` Matthew Garrett
0 siblings, 1 reply; 16+ messages in thread
From: Jesse Barnes @ 2008-12-01 19:27 UTC (permalink / raw)
To: Matthew Garrett
Cc: Len Brown, Zhao Yakui, Yves-Alexis Perez,
linux-acpi@vger.kernel.org
On Monday, December 1, 2008 12:38 am Matthew Garrett wrote:
> On Sun, Nov 30, 2008 at 10:28:30PM -0500, Len Brown wrote:
>
> (Cc:ing Jesse)
>
> > in single user mode, i915 is not loaded,
> > /sys/class/backlight/acpi_video0 does NOT work
> >
> > modprobe of i915 does not change this.
>
> Jesse, are IRQs being delivered to the drm code when X isn't the
> foreground VT? If not, this would seem to need fixing.
The X driver calls into the DRM to disable IRQs when it releases the VT, but
we could make that just affect vblank interrupts if needed (yay more
i915_irq.c changes).
Jesse
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [intel/acpi] backlight
2008-12-01 19:27 ` Jesse Barnes
@ 2008-12-01 19:32 ` Matthew Garrett
0 siblings, 0 replies; 16+ messages in thread
From: Matthew Garrett @ 2008-12-01 19:32 UTC (permalink / raw)
To: Jesse Barnes
Cc: Len Brown, Zhao Yakui, Yves-Alexis Perez,
linux-acpi@vger.kernel.org
On Mon, Dec 01, 2008 at 11:27:09AM -0800, Jesse Barnes wrote:
> On Monday, December 1, 2008 12:38 am Matthew Garrett wrote:
> > Jesse, are IRQs being delivered to the drm code when X isn't the
> > foreground VT? If not, this would seem to need fixing.
>
> The X driver calls into the DRM to disable IRQs when it releases the VT, but
> we could make that just affect vblank interrupts if needed (yay more
> i915_irq.c changes).
Yeah, I think that's going to be necessary unfortunately, otherwise we
lose support for changing brightness outside X.
--
Matthew Garrett | mjg59@srcf.ucam.org
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [intel/acpi] backlight - T61
2008-12-01 5:08 ` Zhang Rui
@ 2008-12-03 23:14 ` Zhenyu Wang
2008-12-04 2:50 ` [Intel-gfx] " Zhenyu Wang
2008-12-09 21:24 ` Jesse Barnes
0 siblings, 2 replies; 16+ messages in thread
From: Zhenyu Wang @ 2008-12-03 23:14 UTC (permalink / raw)
To: Zhang Rui
Cc: Len Brown, Keith Packard, Yves-Alexis Perez,
jbarnes@virtuousgeek.org, linux-acpi@vger.kernel.org,
dri-devel@lists.sourceforge.net, Matthew Garrett, intel-gfx
On 2008.12.01 13:08:23 +0800, Zhang Rui wrote:
> >
> > However, testing FC10 with the latest upstream kernel,
> > including the i915 changes that appeared today...
> > it seems that GUI mode forgets the brighness when
> > I switch to console mode. Eg. If I use /sys or
> > hotkeys in GUI mode to reduce brightness to 0,
> > it stays dim when I switch to console mode,
> > but switches back to max brightness when
> > I switch back to GUI mode.
> hah, that's a done by X.
> ZhenYu pointed out that the graphics driver will set the backlight to
> maximum if it is 0 when switching to GUI.
> what if reducing the brightness to a lower but not 0 level?
> it should switch back to the original value, right?
> cc ZhenYU. :)
This depends on the backlight control method used by Xorg
video driver. We have this comment in the driver from Jesse I think,
/*
* If we're going from off->on we may need to turn on the backlight.
* We should use the saved value whenever possible, but on some
* machines 0 is a valid backlight value (due to an external backlight
* controller for example), so on them, when turning LVDS back on,
* they'll always re-maximize the brightness.
*/
if (!(INREG(PP_CONTROL) & POWER_TARGET_ON) &&
dev_priv->backlight_duty_cycle == 0)
dev_priv->backlight_duty_cycle = dev_priv->backlight_max;
It looks if we're using kernel backlight method, '0' should be a human
sensible dim level instead of meaningless near-to-black level, right?
So how about this patch against current xf86-video-intel?
---
diff --git a/src/i830_lvds.c b/src/i830_lvds.c
index 239bc89..1799eab 100644
--- a/src/i830_lvds.c
+++ b/src/i830_lvds.c
@@ -400,7 +400,8 @@ i830SetLVDSPanelPower(xf86OutputPtr output, Bool on)
* they'll always re-maximize the brightness.
*/
if (!(INREG(PP_CONTROL) & POWER_TARGET_ON) &&
- dev_priv->backlight_duty_cycle == 0)
+ dev_priv->backlight_duty_cycle == 0 &&
+ pI830->backlight_control_method < BCM_KERNEL)
dev_priv->backlight_duty_cycle = dev_priv->backlight_max;
OUTREG(PP_CONTROL, INREG(PP_CONTROL) | POWER_TARGET_ON);
---
p.s Len, if for intel graphics specific issue, we have another
intel-gfx@lists.freedesktop.org for such discuss. Thanks.
--
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 related [flat|nested] 16+ messages in thread
* Re: [Intel-gfx] [intel/acpi] backlight - T61
2008-12-03 23:14 ` Zhenyu Wang
@ 2008-12-04 2:50 ` Zhenyu Wang
2008-12-09 21:24 ` Jesse Barnes
1 sibling, 0 replies; 16+ messages in thread
From: Zhenyu Wang @ 2008-12-04 2:50 UTC (permalink / raw)
To: Zhenyu Wang
Cc: Zhang, Rui, Matthew Garrett, intel-gfx@lists.freedesktop.org,
Yves-Alexis Perez, linux-acpi@vger.kernel.org,
dri-devel@lists.sourceforge.net, Len Brown
[-- Attachment #1: Type: text/plain, Size: 2448 bytes --]
On 2008.12.04 07:14:55 +0800, Zhenyu Wang wrote:
> > > However, testing FC10 with the latest upstream kernel,
> > > including the i915 changes that appeared today...
> > > it seems that GUI mode forgets the brighness when
> > > I switch to console mode. Eg. If I use /sys or
> > > hotkeys in GUI mode to reduce brightness to 0,
> > > it stays dim when I switch to console mode,
> > > but switches back to max brightness when
> > > I switch back to GUI mode.
> > hah, that's a done by X.
> > ZhenYu pointed out that the graphics driver will set the backlight to
> > maximum if it is 0 when switching to GUI.
> > what if reducing the brightness to a lower but not 0 level?
> > it should switch back to the original value, right?
> > cc ZhenYU. :)
>
> This depends on the backlight control method used by Xorg
> video driver. We have this comment in the driver from Jesse I think,
>
> /*
> * If we're going from off->on we may need to turn on the backlight.
> * We should use the saved value whenever possible, but on some
> * machines 0 is a valid backlight value (due to an external backlight
> * controller for example), so on them, when turning LVDS back on,
> * they'll always re-maximize the brightness.
> */
> if (!(INREG(PP_CONTROL) & POWER_TARGET_ON) &&
> dev_priv->backlight_duty_cycle == 0)
> dev_priv->backlight_duty_cycle = dev_priv->backlight_max;
>
> It looks if we're using kernel backlight method, '0' should be a human
> sensible dim level instead of meaningless near-to-black level, right?
>
> So how about this patch against current xf86-video-intel?
>
> ---
> diff --git a/src/i830_lvds.c b/src/i830_lvds.c
> index 239bc89..1799eab 100644
> --- a/src/i830_lvds.c
> +++ b/src/i830_lvds.c
> @@ -400,7 +400,8 @@ i830SetLVDSPanelPower(xf86OutputPtr output, Bool on)
> * they'll always re-maximize the brightness.
> */
> if (!(INREG(PP_CONTROL) & POWER_TARGET_ON) &&
> - dev_priv->backlight_duty_cycle == 0)
> + dev_priv->backlight_duty_cycle == 0 &&
> + pI830->backlight_control_method < BCM_KERNEL)
> dev_priv->backlight_duty_cycle = dev_priv->backlight_max;
>
> OUTREG(PP_CONTROL, INREG(PP_CONTROL) | POWER_TARGET_ON);
> ---
I've tested this patch on T61 just fine. I push this to
xf86-video-intel master now.
--
Open Source Technology Center, Intel ltd.
$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [intel/acpi] backlight - T61
2008-12-03 23:14 ` Zhenyu Wang
2008-12-04 2:50 ` [Intel-gfx] " Zhenyu Wang
@ 2008-12-09 21:24 ` Jesse Barnes
1 sibling, 0 replies; 16+ messages in thread
From: Jesse Barnes @ 2008-12-09 21:24 UTC (permalink / raw)
To: Zhenyu Wang
Cc: Matthew Garrett, Keith Packard, intel-gfx,
linux-acpi@vger.kernel.org, Zhang Rui,
dri-devel@lists.sourceforge.net, Len Brown
On Wednesday, December 03, 2008 3:14 pm Zhenyu Wang wrote:
> On 2008.12.01 13:08:23 +0800, Zhang Rui wrote:
> > > However, testing FC10 with the latest upstream kernel,
> > > including the i915 changes that appeared today...
> > > it seems that GUI mode forgets the brighness when
> > > I switch to console mode. Eg. If I use /sys or
> > > hotkeys in GUI mode to reduce brightness to 0,
> > > it stays dim when I switch to console mode,
> > > but switches back to max brightness when
> > > I switch back to GUI mode.
> >
> > hah, that's a done by X.
> > ZhenYu pointed out that the graphics driver will set the backlight to
> > maximum if it is 0 when switching to GUI.
> > what if reducing the brightness to a lower but not 0 level?
> > it should switch back to the original value, right?
> > cc ZhenYU. :)
>
> This depends on the backlight control method used by Xorg
> video driver. We have this comment in the driver from Jesse I think,
>
> /*
> * If we're going from off->on we may need to turn on the backlight.
> * We should use the saved value whenever possible, but on some
> * machines 0 is a valid backlight value (due to an external backlight
> * controller for example), so on them, when turning LVDS back on,
> * they'll always re-maximize the brightness.
> */
> if (!(INREG(PP_CONTROL) & POWER_TARGET_ON) &&
> dev_priv->backlight_duty_cycle == 0)
> dev_priv->backlight_duty_cycle = dev_priv->backlight_max;
>
> It looks if we're using kernel backlight method, '0' should be a human
> sensible dim level instead of meaningless near-to-black level, right?
>
> So how about this patch against current xf86-video-intel?
>
> ---
> diff --git a/src/i830_lvds.c b/src/i830_lvds.c
> index 239bc89..1799eab 100644
> --- a/src/i830_lvds.c
> +++ b/src/i830_lvds.c
> @@ -400,7 +400,8 @@ i830SetLVDSPanelPower(xf86OutputPtr output, Bool on)
> * they'll always re-maximize the brightness.
> */
> if (!(INREG(PP_CONTROL) & POWER_TARGET_ON) &&
> - dev_priv->backlight_duty_cycle == 0)
> + dev_priv->backlight_duty_cycle == 0 &&
> + pI830->backlight_control_method < BCM_KERNEL)
> dev_priv->backlight_duty_cycle = dev_priv->backlight_max;
>
> OUTREG(PP_CONTROL, INREG(PP_CONTROL) | POWER_TARGET_ON);
> ---
>
> p.s Len, if for intel graphics specific issue, we have another
> intel-gfx@lists.freedesktop.org for such discuss. Thanks.
I'd be a little happier with a != BCM_KERNEL, but other than that it seems
fine.
--
Jesse Barnes, Intel Open Source Technology Center
------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you. Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2008-12-09 21:24 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-28 6:47 [intel/acpi] backlight Yves-Alexis Perez
2008-11-28 19:18 ` [intel/acpi] backlight - T61 Len Brown
2008-11-28 22:38 ` Thomas Renninger
2008-11-28 22:50 ` Yves-Alexis Perez
2008-12-01 1:32 ` Zhang Rui
2008-12-01 3:18 ` Len Brown
2008-12-01 5:08 ` Zhang Rui
2008-12-03 23:14 ` Zhenyu Wang
2008-12-04 2:50 ` [Intel-gfx] " Zhenyu Wang
2008-12-09 21:24 ` Jesse Barnes
2008-12-01 1:08 ` [intel/acpi] backlight Zhao Yakui
2008-12-01 3:28 ` Len Brown
2008-12-01 8:38 ` Matthew Garrett
2008-12-01 19:27 ` Jesse Barnes
2008-12-01 19:32 ` Matthew Garrett
2008-12-01 11:11 ` Yves-Alexis Perez
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox