After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 331458 - Can't set lcd brightness
Can't set lcd brightness
Status: RESOLVED FIXED
Product: gnome-power-manager
Classification: Deprecated
Component: gnome-power-manager
2.13.x
Other Linux
: Normal normal
: ---
Assigned To: GNOME Power Manager Maintainer(s)
GNOME Power Manager Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2006-02-16 20:10 UTC by Julien Valroff
Modified: 2006-02-18 23:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to enable onmibook functionality (4.43 KB, patch)
2006-02-17 12:28 UTC, Richard Hughes
none Details | Review
Extract of gpm debug output (991 bytes, application/octet-stream)
2006-02-17 19:17 UTC, Julien Valroff
  Details

Description Julien Valroff 2006-02-16 20:10:07 UTC
I own a Toshiba Satellite M40X laptop with a Phoenix bios, which works with the
omnibook[1] kernel module.

lcd brightness can be set through /proc/omnibook/lcd (values between 0
and 7):
echo $value > /proc/omnibook/lcd

Reading the value is done by reading this file:
cat /proc/omnibook/lcd

I don't know how turning off the lcd display through this module.

I have tried to modify /usr/share/hal/scripts/hal-system-lcd-set-brightness to add this support (and modifying permissions to give full access to /proc/omnibook/lcd), but the script is not executed (I added a flag like echo "toto" > /tmp/LCD at the beginning of the file to check that).

Cheers,
Julien

[1] http://sourceforge.net/projects/omnibook/
Comment 1 Richard Hughes 2006-02-16 20:20:57 UTC
You have to add support into the acpi.c file as well, as this sets up the allowed types of panel and any other properties. When you do "cat /proc/omnibook/lcd" what is returned, "brightness: 6" or just "6"?

Richard.
Comment 2 Richard Hughes 2006-02-16 23:09:04 UTC
Also, /proc/omnibook/lcd is really odd. Does /proc/acpi/omnibook/lcd also work? All the other ACPI modules are under /proc/acpi.
Comment 3 Julien Valroff 2006-02-17 05:53:58 UTC
"cat /proc/omnibook/lcd" returns "LCD brightness:  7" (value beteween 0 and 7 - 2 spaces between ":" and the value!).

This module is not an ACPI module, that is why it is in /proc/omnibook.

Cheers,
Julien
Comment 4 Richard Hughes 2006-02-17 12:28:01 UTC
Created attachment 59570 [details] [review]
patch to enable onmibook functionality

Can you test this patch please -- it's against HAL CVS. This should make your laptop brightness "just work" with g-p-m. I'll also send it to the HAL m/l for review.
Comment 5 Julien Valroff 2006-02-17 19:17:22 UTC
Created attachment 59603 [details]
Extract of gpm debug output

Unfortunately this patch does not work.

I applied it to Debian hal unstable sources (version 0.5.6), but gpm debug output shows errors about "no ACPI method found" (see attachment).

Is there anything I can test?

Cheers,
Julien
Comment 6 Richard Hughes 2006-02-17 19:26:25 UTC
You sure hal is executing the new hal-power-* scripts? It looks to me as if the old ones are being used, i.e. they do not recognise the onmibook string.

If you run hal in a seporate directory, you have to use ./run-hald.sh, and this only worked for me very recently.

If thats not the prob, can you attach the lshal for your laptop_panel object please, and if you're feeling brave, find out what hal-system-lcd-set-brightness is being sent as an argument (e.g echo HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD to /tmp/log.txt)

Thanks, Richard.
Comment 7 Julien Valroff 2006-02-17 19:35:33 UTC
The new scripts are executed (as they replace the old).

The problem is due to the fact that $HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD has no value.
Replacing $HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD with $HAL_PROP_LAPTOP_PANEL_ACPI_METHOD works!

Cheers,
Julien

Comment 8 Richard Hughes 2006-02-17 19:42:40 UTC
Ohh, you are patching an old HAL, gotcha.

2006-01-29  Richard Hughes <richard@hughsie.com>

	* doc/spec/hal-spec.xml.in,
	hald/linux2/acpi.c (laptop_panel_refresh),
	hald/linux/pmu.c (laptop_panel_refresh),
	tools/hal-system-lcd-get-brightness,
	tools/hal-system-lcd-set-brightness:
	Rename acpi_method to access_method and 
	HAL_PROP_LAPTOP_PANEL_ACPI_METHOD->HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD
	for the laptop_panel device.
	This is required as the access method can now be "pmu" which is
	nothing to do with acpi. I'm not aware of this being used anywhere
	outside of HAL, so we should be okay changing the key name.

Nice to see that it works.

Richard.
Comment 9 Julien Valroff 2006-02-17 19:58:22 UTC
ok, that is clear now.
Hopefully hal authors will accept your patch!

Thanks again for your quick answers.

Julien
Comment 10 Richard Hughes 2006-02-18 23:17:39 UTC
2006-02-18  Richard Hughes <richard@hughsie.com>
 * hald/linux2/acpi.c (laptop_panel_refresh, acpi_synthesize_hotplug_events): add handler for omnibook displays.
 * tools/hal-system-lcd-get-brightness, tools/hal-system-lcd-set-brightness: Add omnibook support.
 * hald/linux2/acpi.c (acpi_synthesize_display): don't prepend the acpi/ here as the new omnibook isn't under /proc/acpi. See http://bugzilla.gnome.org/show_bug.cgi?id=331458 for details.