How to set the default brightness of the screen ?

Please post suggestions for improvement of Cinnamon on:
https://github.com/linuxmint/Cinnamon
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
fchampreux

How to set the default brightness of the screen ?

Post by fchampreux »

Hi,
I am running Cinnamon on LMDE since this year.
My laptop screen is very bright, and I would like to set it to 50% brightness only at startup. I found no way of defining this parameter.
Do you know how to do that ?

Thanks

Frédéric
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Buzzsaw
Level 6
Level 6
Posts: 1318
Joined: Sat Aug 23, 2014 12:53 pm

Re: How to set the default brightness of the screen ?

Post by Buzzsaw »

The screen brightness setting is stored in either /sys/class/backlight/acpi_video0/brightness or /sys/class/backlight/intel_backlight/brightness, so you need to edit one of these files. Try changing the number in both files and saving each one. Saving one of the files should cause the brightness to change.

Changing the brightness temporarily using the keyboard or the GUI, edits one of the two files. So if you can change the brightness using one of these two methods, change it to the desired level, then read the number this level corresponds to in the file, and skip the next paragraph.

If you can't change the brightness using the keyboard or the GUI, once you know which file controls the brightness, experiment by trying a few different numbers, saving the file after each time. The numbers often range from 0 to 10, but they can be higher. You can see what the maximum allowed number is by reading the file max_brightness in the same two folders.

Once you've found a suitable setting, you can make it permanent by editing the file /etc/rc.local so that the bottom of the file looks like:

Code: Select all

sleep 5
echo [x] > /sys/class/backlight/acpi_video0/brightness
exit 0
or

Code: Select all

sleep 5
echo [x] > /sys/class/backlight/intel_backlight/brightness
exit 0
where [x] is the desired brightness number.
yquux
Level 1
Level 1
Posts: 48
Joined: Mon Nov 17, 2014 4:28 pm
Location: France

Re: How to set the default brightness of the screen ?

Post by yquux »

Thanks a lot for this post - I eventually fixed my brightness issue with my new laptop.
By the way, is there a reason why it is stored either in 'acpi' or 'intel' ? Is it because of the distro ? because of cpu ?

Yquux
ASUS MAXIMUS IX APEX - i7-6700T - 32Go - Mint 20.1 Cinnamon
Acer SF114-31 - N5030 - M.2 SSD 250 Go - Mint 20.1 XFCE
MagicMint

Re: How to set the default brightness of the screen ?

Post by MagicMint »

yquux wrote:… is there a reason why it is stored either in 'acpi' or 'intel' ? Is it because of the distro ? because of cpu ?
The intel_backlight is mainly for integrated Intel graphics, but its usage became consistent in newer kernels only.
Locked

Return to “Cinnamon”