Hi, I improved the /etc/udev/rules.d/tosh-backlight.sh script as
presented in
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/935778/comments/68,
this script avoids the no-backlight at all issue and sets the brightness
using a quadratic function (it works much better in my Z830 where the
lower brightness jumps are very big).

#!/bin/sh
acpi_max=$(cat /sys/class/backlight/toshiba/max_brightness)
acpi_curr=$(cat /sys/class/backlight/toshiba/brightness)
intel_max=$(cat /sys/class/backlight/intel_backlight/max_brightness)
intel_min=100 # What we want the brightness 0 to be
# Linear
#intel_curr=$((($intel_max-$intel_min)/$acpi_max*$acpi_curr+$intel_min))
# Cuadratic
intel_curr=$(echo "scale=10; 
($intel_max-$intel_min)/($acpi_max^2)*$acpi_curr^2+$intel_min" | bc | cut -d. 
-f1)
echo $intel_curr > /sys/class/backlight/intel_backlight/brightness

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/935778

Title:
  Toshiba Tecra R840 - brightness controls work on first boot, but do
  nothing after suspend/resume

To manage notifications about this bug go to:
https://bugs.launchpad.net/linux/+bug/935778/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to