Se alguém ainda tiver problemas com o backlight no yoga no Ubuntu 13.04, eu escrevi um script Python simples (você precisa instalar o python-keybinder com dependências) baseado no comando do primeiro post.
Precisa ser executado com privilégios de root. Para melhor conforto de uso, inicie-o com o sistema ou no terminal como processo independente (& no final do comando de execução).
#!/usr/bin/env python
import gtk
import keybinder
import subprocess
# Application need to be run with root privileges
class BrightBinder():
def __init__(self, act_bright):
# modes - step can be modify (3rd argument)
self.levels = range(100, 4880, 700)
self.levels.append(4880)
try:
self.act_bright_index = self.levels.index(int(act_bright))
except ValueError:
# can recoginze level - setting maximum
self.act_bright_index = len(self.levels) - 1
self.setBright()
def setBright(self):
subprocess.call("echo %s > /sys/class/backlight/intel_backlight/brightness" % str(self.levels[self.act_bright_index]), shell=True)
def bindKeys(self):
keybinder.bind(bright_down, self.brightDownCallback, "Keystring %s (user data)" % bright_down)
keybinder.bind(bright_up, self.brightUpCallback, "Keystring %s (user data)" % bright_up)
def brightDownCallback(self, user_data):
if self.act_bright_index > 0:
self.act_bright_index -= 1
self.setBright()
def brightUpCallback(self, user_data):
if self.act_bright_index < len(self.levels) - 1:
self.act_bright_index += 1
self.setBright()
if __name__ == '__main__':
bright_down = "XF86MonBrightnessDown"
bright_up = "XF86MonBrightnessUp"
# getting actual brightness value
act_bright = subprocess.check_output(["less", "/sys/class/backlight/intel_backlight/brightness"])
bright_binder = BrightBinder(act_bright.strip()).bindKeys()
gtk.main()