Changing brightness at startup

Have you tried using some software to avoid manually dealing with the sys filesystem? I suggest using xbacklight.

xbacklight -set 10

This command will set the brightness of the screen to 10%. You can add that to your rc.local.

Edit: If the above procedure is not working there might be some problems between the kernel and the bios acpi. Edit the file: /boot/grub/menu.lst

Add the following parameters to the default configuration: thinkpad-acpi.brightness_enable=1 acpi_backlight=vendor

The default line shoud look something like this:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash thinkpad-acpi.brightness_enable=1 acpi_backlight=vendor"

Save the modified file and run:

sudo update-grub

Reboot and check if xbacklight is working


This is obviously a Kernel Compatibility issue with some Hardwares, and I just want you to try this workaround:

  1. Backup and open grub file. Open terminal ( Ctrl+Alt+T ) and type:

    sudo cp /etc/default/grub /etc/default/grub.bak
    sudo gedit /etc/default/grub
    
  2. You will find this line in the new opened window: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

    Change it to:

    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=vendor"
    
  3. Save and close the window and update your grub:

    sudo update-grub
    
  4. Restart your system:

    sudo reboot
    

if above procedure doesn't work then repeat the same step but this time try to change the line in step 2 with this:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pcie_aspm=force"

Reply if something goes wrong. If it doesn't work, please edit your question and paste you grub file contents: cat /etc/default/grub


If you are using Gnome 3 or Unity -

Checkout the master branch from https://github.com/ishanthilina/setBrightness.

If you are using Gnome 2 -

Checkout the Gnome2 branch from https://github.com/ishanthilina/setBrightness.

This is a python script solve your problem.

The command to be given in the startup applications is “python ////setBrightness.py < Brightness level>”.

An example would be python /home/ishan/.setBrightness/setBrightness.py 20 . If you do not specify a brightness level, the script will change the brightness level according to the time of the day. If it’s between 7am and 8pm, the script will make the brightness be set to 75.

If it’s between 8pm and 7am, the script will make the brightness be set to 20. You can edit these brightness levels by changing the variables day_level and night_level respectively.

source