Summary: | Sony brightness setting not working | ||
---|---|---|---|
Product: | hal | Reporter: | Bastien Nocera <bugzilla> |
Component: | misc | Assignee: | David Zeuthen (not reading bugmail) <zeuthen> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | high | CC: | pborelli |
Version: | unspecified | ||
Hardware: | x86 (IA32) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
hal-spicctrl-support.patch
hal-spicctrl-support-2.patch hal-spicctrl-support-3.patch hal-spicctrl-support-dont-handle-all-vaios.patch hal-spicctrl-support-dont-handle-all-vaios-2.patch |
Description
Bastien Nocera
2006-04-25 02:15:59 UTC
Created attachment 5462 [details] [review] hal-spicctrl-support.patch 2 changes: - if there's no ACPI path, and the LCD type is Sony, and spicctrl is available, use spicctrl to set/get the brightness The range is 0..255, not 0..7, so we need to convert the values - in the set brightness, bail out when the value is *equal* to HAL_PROP_LAPTOP_PANEL_NUM_LEVELS as well. For example, 8 values means 0 to 7, not 0 to 8 (which would be 9 levels) I tested this by hand, on a current FC5, and the sonypi driver is automatically loaded. I wrongly assumed that the sonypi module would get loaded automatically, it doesn't. Should I go one step further and make it load the sonypi driver (urgh)? No, this should not be modprobed by hal IMO. Does the sonipi diver work if modprobed manually? Yeah, works fine once modprobed manually. Are the acpi modules auto-loaded on startup? But this would break laptops which use the sony-acpi driver, like mine. Why would break exactly? We would only load it when $HAL_PROP_LINUX_ACPI_PATH isn't available. Because I went to sleep 5 hours ago and woke up 5 minutes ago and didn't get coffee yet. Sorry, "It should be possible to use sonypi instead" and misreading your patch made me think you were replacing the previous script with spicctrl. For the module loading, this is the RH bug so that udev gets to load it: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=190004 The changes I posted aren't enough. The panel isn't available as a an ACPI object, so it's not getting added to the list, and we don't even try to get/set the brightness. Created attachment 5487 [details] [review] hal-spicctrl-support-2.patch Updated (and working) patch. This one also creates an LCD Panel object, necessary for getting the methods supported, also corrects the bug mentioned above in the set script. Created attachment 5490 [details] [review] hal-spicctrl-support-3.patch Updated patch against CVS HEAD. 2006-04-26 Richard Hughes <richard@hughsie.com> Patch from Bastien Nocera <hadess@hadess.net>: * hald/linux2/acpi.c: (laptop_panel_refresh), (acpi_synthesize_sonypi_display), (acpi_synthesize_hotplug_events): Create an LCD Panel object of type sonypi, necessary for getting the methods supported for panasonic notebooks. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=6729 * tools/hal-system-lcd-get-brightness: * tools/hal-system-lcd-set-brightness: Support the sonypi brightness type. The detection code is broken for systems where sonypi loads, but offers no brightness support (ie. Type 3 VAIOs). Created attachment 5507 [details] [review] hal-spicctrl-support-dont-handle-all-vaios.patch Don't handle through sonypi if we have acpi brightness support Created attachment 5508 [details] [review] hal-spicctrl-support-dont-handle-all-vaios-2.patch And against CVS... 2006-04-27 Richard Hughes <richard@hughsie.com> Patch from Bastien Nocera <hadess@hadess.net>: * hald/linux2/acpi.c: (acpi_synthesize_sonypi_display): Check that we don't support brightness change through ACPI with the presence of /proc/acpi/sony/brightness for type3 VAIOs. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.