How to decrease the screen brightness?

Booting, installing, newbie
Message
Author
User avatar
fabrice_035
Posts: 765
Joined: Mon 28 Apr 2014, 17:54
Location: Bretagne / France

#41 Post by fabrice_035 »

This is an error :

Code: Select all

#!/bin/sh
S="1.0"
A=$(xrandr --current | egrep -m1 "connected" )
B=$(echo $A | cut -f 1 -d " ")
xrandr --output $B --brightness $S
...because with my computer (2 screens)

Code: Select all

root# xrandr --current
Screen 0: minimum 320 x 200, current 1920 x 1848, maximum 8192 x 8192
VGA-0 disconnected (normal left inverted right x axis y axis)
HDMI-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 598mm x 336mm
   1920x1080      60.0*+   50.0     59.9     30.0     30.0  
   1920x1080i     60.1     50.0     60.0  
   1680x1050      59.9  
   1280x1024      75.0     60.0  
   1440x900       75.0     59.9  
   1280x720       60.0     50.0     59.9  
   1440x576i      50.1  
   1024x768       75.1     60.0  
   1440x480i      60.1     60.1  
   800x600        75.0     60.3  
   720x576        50.0  
   720x480        60.0     59.9  
   640x480        75.0     72.8     66.7     60.0     59.9  
   720x400        70.1  
LVDS connected 1366x768+0+1080 (normal left inverted right x axis y axis) 353mm x 198mm
   1366x768       60.0*+
   1280x720       59.9  
   1152x768       59.8  
   1024x768       59.9  
   800x600        59.9  
   848x480        59.7  
   720x480        59.7  
   640x480        59.4  
DisplayPort-0 disconnected (normal left inverted right x axis y axis)
and your code return:

Code: Select all

root# xrandr --current | egrep -m1 "connected"
VGA-0 disconnected (normal left inverted right x axis y axis)
the good way

Code: Select all

 xrandr --current | grep -m1 -w "connected"
Regard
Bionicpup64-8.0 _ Kernel 5.4.27-64oz _ Asus Rog GL752

ozsouth
Posts: 858
Joined: Fri 01 Jan 2010, 22:08
Location: S.E Australia

#42 Post by ozsouth »

Thanks Fabrice - I use laptops exclusively - another reason why I hesitated to release my script - but now glad I did as I've learnt something new.

bjn
Posts: 28
Joined: Fri 24 Jan 2014, 19:14

#43 Post by bjn »

Mike Walsh wrote:@ bjn:-

Good, good. So; you're 'sorted'. Yay!

Credit must go to you, too, y'know.....for sticking with us until we found the solution. We get no end of newbies who, at the first sign of a problem that needs a wee bit of work, disappear into cyberspace, never to be seen again.

But then you do have prior Linux experience, so you did at least know what to expect. For ex-Windoze users, sometimes it all just seems like too much hard work to sort out something that's often simple.....because it's not what they expect, or are used to.


Mike. :wink:
@Mike Walsh, I don't mind spending time troubleshooting a problem. It’s so satisfying when I do find a solution, and I pick up a lot of useful information along the way. I spent many, many hours battling with this particular problem on my own before I finally threw in the towel and came to the experts for assistance. :)

Once again, my thanks to everyone who came to assist me.

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#44 Post by greengeek »

bjn wrote:I've just experimented with the 'xset dpms force off' command. It does turn the backlight off completely, but then it comes back on by itself about a second later.
Did you work out why this happened? I recall reading many Ubuntu threads where people had installed various intensity utilities and manual control got stuffed up because those utilities would run in the background and immediately reset any manual changes.

You dont thing that was contributing to the problem with the backlight coming back on?

User avatar
soniabu
Posts: 162
Joined: Thu 01 Feb 2018, 21:24
Location: Paris

#45 Post by soniabu »

I found in bionicpup64 this application (Redshift Gui) which distributes the brightness in relation to the time of day and the latitude where the PC is located; on my Asus kd55 works very well.
Valid protected.

Post Reply