Screen Brightness reverts after using some applications

I tried this

and changed what needed

then I made update grub
but the Brightness Controller problem still the same
whith the startup it opening but the brightness full like settings not working and each time I open Discord the brightness setting going full again

Are you using an OLED Monitor?
Discord, I believe, is an Electron-based application...

I use 2 monitors
laptop monitor + external samsung monitor

Is the Samsung an OLED monitor?

Is it connected using any adapters, like HDMI to DP?

Samsung 740 N LCD
connected using VGA & HDMI converter

Does the brightness issue occur when the external monitor is not plugged in after rebooting the notebook computer?

never tried yet

@Aravisian same problem even when I removed the external monitor

That is a good thing; it means some of the more complicated problems/solutions are avoided.

Can you please connect your monitor, then in terminal run:

xrandr | grep " connected" | cut -f1 -d " "

Relay that output here.


I was about to type out a lengthy post about how to add this to start up. But in checking that, I found a guide that does a very thorough job of it and lays it out so it is very easy:

so if I'll use this script I don't need the Brightness controller or what ?

Correct. You would be using xrandr, instead.

1 Like

can you help how to create the and where ?

Per the link:

  • Create file at ~/
  • Copy the below code to file.

The tilde symbol (~) is shorthand for Home Directory in GnuLinux.
Right click an open area in your home folder and select Create a new document
Then name it or rename it

1 Like

@Aravisian Now I have this
in the home directory with this script

Bash script to control the monitor brightness

screenname=$(xrandr | grep " connected" | cut -f1 -d" ")
xrandr --output eDP1 --brightness 0.7;


Bash script to control the monitor brightness

screenname=$(xrandr | grep " connected" | cut -f1 -d" ")
xrandr --output HDMI1 --brightness 0.7;
and I have
this file in this directory ~/.config/autostart
[Desktop Entry]
Hidden=false NoDisplay=false X-GNOME-Autostart-enabled=true Name=Dimmer Script
GenericName=Dimmer Script
StartupNotify=false Comment=Dimmer App to control screen brightness and this is the script but still not working
or maybe only laptop monitor worked with the script

Did you copy and paste the contents just as the guide states?
Did you make the script executable?
Did you reboot?

I changed name of monitors and brightness as I need

I don't really get the point I think the Dimmer.desktop executing it
if not then tell me or let me check how I can do it

sure boss I know now we need reboot after each script or change

This step in the guide:

  • Give execute permission to file by typing sudo chmod +x ~/

Alternatively, you can right click the script and choose Properties > Permissions and check the box for allow executing as a program

@Aravisian I made it executable using chmod +x
but when I reboot the laptop screen was black on the password screen and even after I opened the OS the script didn't work