Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a hp pavilion g6 laptop. My keyboard has stopped working so I cannot use laptop keyboard to change the brightness. The issue is my brightness is set at 0 so I cannot see anything once ubuntu loads. I have attached an external keyboard via usb, I was wondering how can I change the brightness using the external keyboard. Is there a way. I cannot login or see anything once ubuntu is loaded its total dark on the login screen.

Any help is appreciated.

share|improve this question

migrated from Sep 23 '12 at 21:33

This question came from our site for professional and enthusiast programmers.

I would recommend that you create a script that changes the brightness and sets up Gnome keyboard shortcuts (assuming that you are using Gnome/Cinnamon) that will activate that script for you.

I have my script set like this:

echo $1 > /sys/class/backlight/acpi_video0/brightness

It will get the number called when the script is executed as root/sudo/gksu and set it as the brightness. The number can vary from 0 to 15, but I think this can vary from display to display if my memory is not misleading me.

For setting the brightness, you can either call the scripts with different numbers and many keys on the keyboard (lazy way \o/) or implement two for loops (smarter way).

These for loops could be called by the $1 parameter that inside a switch case will redirect to the for loop that increase or decrease the brightness (going from 0 to 15 and 15 to 0). Then you just set on keyboard shortcuts two keys that will call the parameter to each for in the switch/if case.

If you need more control to the "brightness" you can use this command instead, in the same way as above:


This varies from 0 to 4000 (or something near that) and actually controls the back-light, putting your display with really no light when set to zero.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.