sony brightness state isn't restored after resume from suspend or hibernate

Bug #117331 reported by unggnu
8
Affects Status Importance Assigned to Milestone
linux-source-2.6.22 (Ubuntu)
Fix Released
Medium
Ben Collins

Bug Description

Binary package hint: acpi-support

After wake up from suspend (which works fine on Sony laptops since Feisty) and hibernate the brightness state isn't restored. The problem seems to be that under /proc/acpi/sony/ only the brightness entry is changed but not the brightness_default. Windows seems to always save the changed brightness to brightness_default so after restart or wake up the same brightness is restored. This makes sense for me and is easy to fix.

Tags: cherry-pick
Revision history for this message
unggnu (unggnu) wrote :

The spicctrl entry makes no sense for me and results at least on sony_acpi Laptops in a bug (sets brightness on the lowest option to 33 (which is out of bound 0-8)) so I have removed it. I could do a separate bug report for it but I think it is not needed.

Revision history for this message
Matthew Garrett (mjg59) wrote :

sony_acpi has been deprecated. The sony-laptop driver should be responsible for storing and restoring this state over suspend/resume

Revision history for this message
unggnu (unggnu) wrote :

But brightness couldn't be changed in Gutsy without loading sony_acpi. https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.22/+bug/133662
Maybe the acpi script has to be patched.

Revision history for this message
unggnu (unggnu) wrote :

Ok, the brightness changing works again throug acpi-support update but the bug still appears even with sony-laptop module. It seems that sony-laptop has no similar option like brightness_default and it doesn't save the values permanent.

Revision history for this message
unggnu (unggnu) wrote :

Sony-laptop driver has a brightness_default value so sony-acpi isn't needed anymore. This bug only effects the acpi-support package and the file /etc/acpi/sonybright.sh.

Revision history for this message
unggnu (unggnu) wrote :

This patch should fix the issue for the updated sonbright.sh script with sony-laptop driver pathes.
This issue seems to be much important in Gutsy since brightness is reset to brightness_default value everytime a user logouts or do a similar operation. This seems to have something to do with new intel driver or compiz, don't know.
Btw. this patches fixes the value range issue https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/136380 too.

Revision history for this message
Matthew Garrett (mjg59) wrote :

No, I'm pretty certain that this is the kernel's responsibility. I'd prefer not to work around it in userspace.

Revision history for this message
unggnu (unggnu) wrote :

Ok, it is of course possible and would handle it more like Windows but it works with acpi-support too and I guess that the maintainer of sony-laptop driver wouldn't change it.

Revision history for this message
unggnu (unggnu) wrote :

I know that a sony laptop module fix is better but if somebody is interested in a userspace fix in the meantime I have upload this patch which fixes some new problems I have found in current sonybright.sh script.

Revision history for this message
unggnu (unggnu) wrote :

This issue has already been fixed upstream.

commit e84a02ba0b33a97a8486f3248fd45f50b1a1c014
Author: Mattia Dongili <email address hidden>
Date: Sat Aug 4 00:22:30 2007 +0900

    sony-laptop: restore the last user requested brightness level on
    resume.

    Signed-off-by: Mattia Dongili <email address hidden>
    Signed-off-by: Len Brown <email address hidden>

Changed in linux-source-2.6.22:
assignee: nobody → ubuntu-kernel-team
status: New → Confirmed
Changed in linux-source-2.6.22:
importance: Undecided → Medium
status: Confirmed → Triaged
Revision history for this message
unggnu (unggnu) wrote :

If new Intel driver is used there is another issue which seems to ignore the brightness_default setting.
https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/139954

Revision history for this message
Ben Collins (ben-collins) wrote :

ubuntu-gutsy commit: eaa19b42de52fc5d79bc886f522f29600a5542a7

Changed in linux-source-2.6.22:
assignee: ubuntu-kernel-team → ben-collins
status: Triaged → Fix Committed
Revision history for this message
Ben Collins (ben-collins) wrote :

linux-source-2.6.22 (2.6.22-11.34) gutsy; urgency=low

  [Alan Stern]

  * USB: disable autosuspend by default for non-hubs
    - LP: #85488

  [Ben Collins]

  * ubuntu: Enable LEDS_TRIGGERS and related options
    - Needed for iwlwifi
  * ubuntu: Add real ABI files for virtual flavour
  * ubuntu: Re-enable missing CONFIG_SERPENT for hppa64
    - Noticed by Lamont
  * ubuntu: Add linux-headers postinst to handle hooks
    - LP: #125816
  * ubuntu: Add support for /etc/kernel/headers_postinst.d/ to
    headers-postinst
    - LP: #120049
  * cell: Add binary-custom flavour "cell" to support ps3

  [Mattia Dongili]

  * sony-laptop: restore the last user requested brightness level on
    resume.
    - LP: #117331

  [Tejun Heo]

  * ata_piix: fix suspend/resume for some TOSHIBA laptops
    - LP: #139045
  * PCI: export __pci_reenable_device()
    - needed for ata_piix change

  [Tim Gardner]

  * Enable Sierra Wireless MC8775 0x6813
    - LP: #131167

  [Zhang Rui]

  * ACPI: work around duplicate name "VID" problem on T61
    - Noted by mjg59

 -- Ben Collins <email address hidden> Sun, 16 Sep 2007 22:31:47 -0400

Changed in linux-source-2.6.22:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.