[Gutsy][Hardy] sonybright.sh doesn't use the correct value range

Bug #136380 reported by unggnu
10
Affects Status Importance Assigned to Milestone
acpi-support (Ubuntu)
Fix Released
Low
Unassigned
Declined for Gutsy by Henrik Nilsen Omma
Hardy
Fix Released
Low
Unassigned

Bug Description

Binary package hint: acpi-support

According to http://www.linux.it/~malattia/wiki/index.php/Sony-laptop#Brightness sony-laptop brightness devices value range is from 0 to 7 but sonybright.sh uses the old sony-acpi range from 1 to 8. The only reason why the 0 value despite of the wrong range is reached is the line " [ -x /usr/bin/spicctrl ] && /usr/bin/spicctrl -b 0 " and of course this is only possible if spicctrl is installed which is universe.

Tags: cherry-pick

Related branches

Revision history for this message
unggnu (unggnu) wrote :

This patch should fix the issue.

unggnu (unggnu)
description: updated
unggnu (unggnu)
description: updated
Revision history for this message
unggnu (unggnu) wrote : Re: [Gutsy] sonybright.sh doesn't use the correct value range

I have forgot something to fix.
The third line "BRIGHTNESS=$(cat /sys/class/backlight/sony/actual_brightness)" is wrong since it returns on some circumstances 32 instead of zero. This happens through spicctrl ([ -x /usr/bin/spicctrl ] && /usr/bin/spicctrl -b 0 ) which is run if you try to lower brightness if it is already zero. The file /sys/class/backlight/sony/brightness isn't affected through spicctrl run so it should be used instead.
The other point is the brightness correction in line five which has the wrong value range from old sony_acpi.
Btw. I still don't know why this spicctrl line is used but I haven't changed this since the other brightness path isn't affected from this bug.

Revision history for this message
unggnu (unggnu) wrote :
Revision history for this message
unggnu (unggnu) wrote :

Could this patch or at least the value changes make it into Gutsy? Without that Sony laptops consume more energy and loose one brightness value.

Changed in acpi-support:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
unggnu (unggnu) wrote :

This still happens in current Hardy.

Changed in acpi-support:
assignee: nobody → rainct
status: Confirmed → In Progress
Revision history for this message
Siegfried Gevatter (rainct) wrote :

I'm attaching a debdiff to fix this and bump the standards version (note: it's a native package).

Changed in acpi-support:
assignee: rainct → nobody
status: In Progress → Confirmed
Revision history for this message
Daniel Holbach (dholbach) wrote :

Paul: can you take a look at this one?

Revision history for this message
unggnu (unggnu) wrote :

It still haven't been fixed. Could please someone integrate this patch? I am worried that this issue makes it into Hardy like Gutsy before.

Daniel Hahler (blueyed)
Changed in acpi-support:
assignee: nobody → blueyed
status: Confirmed → In Progress
Revision history for this message
unggnu (unggnu) wrote :

After around six months the issue is still there. There is a working patch, the specification is listed on http://www.linux.it/~malattia/wiki/index.php/Sony-laptop#Brightness so what is missing?

Revision history for this message
Daniel Hahler (blueyed) wrote :

unggnu, the patch is waiting for sponsorship - see bug 193842.

I've now uploaded the package again into my PPA, where you can test-install it from (wait for version 0.106blueyedppa4 to appear there):
https://edge.launchpad.net/~blueyed/+archive?field.name_filter=acpi-support&field.status_filter=published
It would help if you can verify that the fix works for you. Thank you.

Otherwise, I'm quite positive that the fix will make it into Hardy.

Revision history for this message
Daniel Holbach (dholbach) wrote :

Paul: could you please take a look at it?

Daniel Hahler (blueyed)
Changed in acpi-support:
assignee: blueyed → nobody
status: In Progress → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package acpi-support - 0.106

---------------
acpi-support (0.106) hardy; urgency=low

  * Cherrypicked bugfix patches from Launchpad (LP: #193842)
  * lib/state-funcs: make wireless led work with asus-laptop (the new module);
    patch from Nicolò Chieffo (LP: #189889)
  * Add events/asus-video to support asus switch video hotkey; patch from
    Nicolò Chieffo (LP: #138228)
  * events/asus-wireless-2, asus-wireless-2.sh:
    Support Fn+F2 on Asus A8Js; patch from Matteo Collina (LP: #105929)
  * Fix the value range in sonybright.sh (0-7 instead of 1-8); patch from unggnu
    (LP: #136380)
  * "lib/FUJITSU SIEMENS.config":
    - Enable suspend for Fujitsu-Siemens C1110 (LP: #52970)
    - Enable STR for Fujitsu-Siemens Lifebook S7020, S7110
  * resume.d/50-time.sh, suspend.d/88-time.sh:
    Fix handling of hardware clock before/after suspend; patch from Rodrigo
    Novo (LP: #36815)
  * events/asus-*: Fix event key names for ASUS (HOTK); patch from
    Jeroen van der Vegt (LP: #25784)
  * Fix names in comments for events/panasonic-{mute,volume-down,volume-up}
  * debian/rules, README.toshiba: Drop toshiba_acpi.modprobe, which only
    contained an invalid/obsolete option "hotkeys_over_acpi" (LP: #180678)
  * debian/control: Standards-Version 3.7.3
  * Drop thinkpad_acpi.modprobe: the workarounds therein are not needed for
    thinkpad_acpi in Hardy anymore; investigations by Jerone Young (LP: #194679)
  * Add events/lenovo-eject to handle the Thinkpad eject button (Fn+F9); patch
    from Jerone Young (LP: #194609)

 -- Daniel Hahler <email address hidden> Thu, 06 Mar 2008 02:15:54 +0100

Changed in acpi-support:
status: Triaged → 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.