Ubuntu12.04 screen brightness cannot be saved

Source: Internet
Author: User
My computer is a ATI graphics card, and Ubuntu12.04LTS cannot automatically save the brightness: The maximum brightness is displayed after each login/unlock, Which is annoying! After studying for one night, I finally got it done with two scripts! Script: bright #! /Bin/bash # Set the display brightness #1. Run this command to view the maximum brightness of the display & n

My computer is a ATI graphics card, and Ubuntu 12.04 LTS cannot automatically save the brightness: The maximum brightness is displayed after each login/unlock, Which is annoying!

After studying for one night, I finally got it done with two scripts!

Script: bright

  1. #! /Bin/bash
  2. # Set the display brightness
  3. #1. Run this command to view the maximum brightness of a display.
  4. # $ Cat/sys/class/backlight/acpi_video0/max_brightness
  5. # Select a proper value and write it to/sys/class/backlight/acpi_video0/brightness to change the brightness.
  6. #2. Allow the users Group to run "sudo tee" without a password"
  7. # $ Sudo-S sh-c 'echo "% users ALL = (root) NOPASSWD:/usr/bin/tee">/etc/sudoers. d/bright'
  8. # $ Sudo chmod 0440/etc/sudoers. d/bright
  9. #3. Add a user to the users user group
  10. # $ Sudo adduser your_username users
  11. Echo 15 | sudo tee/sys/class/backlight/acpi_video0/brightness
Script: bright-monitor
  1. #! /Bin/bash
  2. # Automatic execution upon successful login, including returning from lock status
  3. # Set this script to auto start:
  4. # Right-click the gear icon in the upper right corner-> start the application...
  5. # Remember to copy the two scripts bright and bright-monitor to/usr/bin.
  6. # This allows multiple users to conveniently control the brightness.
  7. Listener-monitor -- session "type = 'signal ', interface = 'org. gnome. ScreenSaver', member = 'activechanged '" | while read line; do
  8. Bright
  9. Done

For specific usage, refer to the notes in the script.

For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.