How to decrease the screen brightness?

Booting, installing, newbie
Message
Author
User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#21 Post by bigpup »

I guess this has turned into bjn topic.

So, I am addressing bjn.

I really find it hard to believe that this does not work!

Menu >>>Setup >>> Xorg Video Wizard or Screen/graphics Wizard >>>Monitor Gamma Calibration

The Monitor Gamma Calibration program.
Adjust each color number the same.
negative number will lower brightness.
Positive number will make it brighter.

Every computer I have ever tried this on worked.
You do understand the numbers can go negative?
Less than zero(0).

What is the specific hardware?
Computer make and model?
If laptop using the builtin monitor or an external one?

Well, there is a small chance the computers bios has some setting affecting this.
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

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

#22 Post by bjn »

@Philh, I tried Ubuntu Mate 18.04.1 64-bit, Ubuntu Budgie 18.04.1 32-bit, Lubuntu 18.04 32-bit, also Mint Cinnamon 19 32-bit and Mint Mate 19 64-bit. These all handled brightness effortlessly. Xenialpup 32-bit had the same brightness problem, though.

@bigpup, yes, I do understand that I need to set negative values in monitor gamma calibration to reduce brightness, and yes, I did set all equal negative values and saved them. It’s a refurbished 64-bit HP Pavilion 17-g121wm Windows 10 Notebook. It's using the built-in monitor. I posted the hardware report earlier in the thread.
Last edited by bjn on Mon 12 Nov 2018, 00:00, edited 3 times in total.

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

#23 Post by soniabu »

to decrease the brightness of xenialpup 7.5 at terminal I do this command: xbacklight -dec 65;
if I want to increase it I write: xbacklight -inc 15.

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

#24 Post by bjn »

@ozsouth, I installed the pet. No joy. The xrandr command reported 'Gamma size is 0'.

@soniabu, I 've tried that type of xbacklight command to no avail, albeit in Tahr and UpupBB. :)

@Mike Walsh, worst-case scenario, I'll just have to mostly use Lubuntu, my favorite 'buntu, on this machine. I'm not one for the bells and whistles. I do have Puppy on my Lenovo T60 and my Asus T91 eeePC. It's just that I recently got this laptop, and it's disappointing not to be able to use Puppy comfortably on a device which would allow it to really stretch its legs. :)

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#25 Post by bigpup »

The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

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

#26 Post by ozsouth »

You posted the result of running xrandr alone - shows your connected display is called default.
One more to try (can experiment with values - don't exceed 1.4! - need to restart X between tries):
xrandr --output default --gamma .8:.8:.8

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

#27 Post by bjn »

@bigpup, thank you for suggesting Bionicpup64. :)

The brightness keys don’t work, but monitor gamma calibration does. The screen still wasn’t quite right -- applications with light backgrounds like Abiword were still too bright, even though the display was quite dark, if that makes sense. But the rshift-portable-64 that Mike Walsh suggested allowed me to manually get a more comfortable screen.

I noticed that I lost my adjustments when I restarted X, so I created a save file and rebooted to see if I’d still lose them, and yes, I did. I do whenever X restarts, apparently. It’s not a dealbreaker, though, because one click on the rshift icon (it looks like the f.lux icon?) in the tray resets the screen to the way I had it.

Interestingly, max_brightness, actual_brightness and brightness are all still at 255, which might not be the best news for the battery. Fortunately, the battery monitor in the tray works properly. It does in Tahrpup on this device, but not in UpupBB and some other Pups. In UpupBB the value displayed changed only when I restarted X. I discovered that the hard way after losing power completely on two occasions.

I notice in Quick Setup that the amdgpu driver is being used. If I recall correctly, Tahr and UpupBB indicated in Quick Setup that the ati driver was being used? I’m wondering if that had something to do with the problem? I’m guessing, because I have only average-user knowledge of computers.
Last edited by bjn on Tue 13 Nov 2018, 03:45, edited 1 time in total.

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

#28 Post by bjn »

@ozsouth, thank you for not giving up. :)

I tried out the command in Bionicpup. I ran the command after I'd made the adjustments I described in the previous post.

root# xrandr --output default --gamma .8:.8:.8
warning: output default not found; ignoring
xrandr: Need crtc to set gamma on.

I have no clue what that means. :)

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

#29 Post by ozsouth »

Please run xrandr (on its own) & post results. Seems like 'default' is the wrong output name. The field before the first appearance of 'connected' should be the output name, but let's see what else is there.

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

#30 Post by bjn »

@ozsouth

root# xrandr
Screen 0: minimum 320 x 200, current 1600 x 900, maximum 16384 x 16384
eDP connected primary 1600x900+0+0 (normal left inverted right x axis y axis) 382mm x 214mm
1600x900 60.19*+ 40.13
1440x900 60.19
1280x800 60.19
1280x720 60.19
1024x768 60.19
800x600 60.19
640x480 60.19
HDMI-A-0 disconnected (normal left inverted right x axis y axis)

This is still in Bionicpup.

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

#31 Post by ozsouth »

Aha! Try xrandr --output eDP --gamma .8:.8:.8
or xrandr --output eDP --brightness .8

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

#32 Post by bjn »

@ozsouth, the screen brightened at the first command, darkened at the second.

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

#33 Post by ozsouth »

Ok, now you can play with the figures. Need to restart X between tries. Use the --brightness setting & try .7 through to 1.2 until satisfied. Then to setup for bootup (user bjn only ***), open text editor & input:

#!/bin/sh
xrandr --output eDP --brightness .8 (or whatever you settle on)


save into /root/Startup as myxrandr

then in a terminal run: chmod 755 /root/Startup/myxrandr
- will be set on bootup.


*** NOTE for other users - first run xrandr in a terminal & look for field before first appearance of 'connected', to use as output. Use at own risk.
Last edited by ozsouth on Tue 13 Nov 2018, 04:32, edited 1 time in total.

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

#34 Post by bjn »

@ozsouth, thank you so much. I will experiment and report back later.

Editing to add that i mean 'later' as in (my) tomorrow. :)

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#35 Post by Mike Walsh »

@ ozsouth/bjn:-

oz:- You've kicked my brain back into gear, old son. I'd forgotten that running the

Code: Select all

xrandr
...command on its own was how the original screen brightness control topic got under way a few months back.

I found the suggestion to try that on StackExchange. The OP there had his output showing as 'LVDS1'; through running the command, I discovered my own was 'VGA-0' (as below:-)

Code: Select all

# xrandr
Screen 0: minimum 320 x 200, current 1024 x 768, maximum 4096 x 4096
VGA-0 connected 1024x768+0+0 (normal left inverted right x axis y axis) 304mm x 228mm
   1024x768       60.0*+   75.1  
   800x600        75.0     60.3  
   640x480        75.0  
DVI-0 disconnected (normal left inverted right x axis y axis)
S-video disconnected (normal left inverted right x axis y axis)
The code Fred helped me develop for the original 'Screen Brightness Control for Desktop Pcs' slider control, which makes use of the YAD

Code: Select all

--print-partial
...command looks like this:-

Code: Select all

#!/bin/bash
#
# Brightness control slider for desktop 'external' monitors - with inspiration from johnywhy, and many thanks to Fredx181
#
# detect monitor
MON=$(xrandr -q | grep " connected" | cut -f1 -d ' ')
# find current xrandr brightness value
XR=$(xrandr --verbose | grep -i brightness | cut -f2 -d ' ' | head -n1)
BrCur=`awk "BEGIN {print $XR*100}"` # calculate, so e.g. 0.5 gets 50
BrMax="100"
BrMin="5"
yad --undecorated --on-top --geometry=450x70-30-30 --text="                  SCREEN   BRIGHTNESS   CONTROL" --scale --value $BrCur --print-partial --min-value $BrMin --max-value $BrMax --button="Done":1 | while read BrNew; do
# division using awk, so xrandr value gets e.g. 0.5 rather than 50
xrandr --output $MON --brightness $(awk "BEGIN {print $BrNew/100}")
done
As you can see, with Fred's code the 'output display' part is auto-detected.

If bjn just wants a straightforward brightness control, I can't see any reason why this shouldn't work for him. What d'you think?

----------------------------------------------------

bjn:-

Give the attached .pet a try. This was the original screen brightness slider control we came up with a few months back. I'm not guaranteeing it'll work for you, but there's every chance it should. The display 'ID' part is auto-detected, so it ought to pick up your

Code: Select all

output eDP
...display identification. It simply places a small icon in the 'tray' area (looks like a yellow/black 'split-circle'). The script is sym-linked from /root/my-applications/bin into /root/Startup, so it's there every time you boot up. Just click on it, see if the slider does what it should (if it does, great!), then click 'Done' when finished.

It makes use of the exact same output ozsouth has helped you get working this last few posts, but 'translates' that output into a continuously variable slider control.

Can't hurt to try, can it? Let us know if it does what you want, please.


Mike. :wink:
Attachments
Brightness_control_4_desktop_PCs-v1.1.pet
Original screen brightness slider control developed by Fredx181 & Mike Walsh
(24.7 KiB) Downloaded 148 times

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

#36 Post by ozsouth »

@MikeW - sophisticated script - interesting. I made a detection script, but didn't share it as xrandr really is a rather crude way to do brightness - a last resort, I feel & wrong values could cause issues. Here's my code (value of S sets brightness of discovered output):

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

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

#37 Post by bjn »

@ozsouth, I set it at .6. I also adjusted the colour temperature with the Redshift that Mike Walsh posted, and my screen is now very comfortable. My only concern is the battery. Despite the adjustments to the display, the brightness and actual_brightness are at 255, which is still max_brightness, and the battery seems to be draining much faster than with the ‘buntus. I usually run my other devices straight from AC, so I don’t know whether this is usual for the Pup or not.

I looked around for other Pups that might work with this laptop, and I’ve just started trying out Fatdog64. Brightness control works out of the box, including the brightness keys, and brightness and actual_brightness change to reflect the adjustments, so I’m guessing that’s better for the battery than with Bionicpup. I may be wrong, though, so please correct me if I am.

The two doggy distros have different strengths and weaknesses. Fatdog is better at brightness control, but Bionicpup suspends/resumes from suspending beautifully, while Fatdog just powers straight off when I close the lid. (It’s just occurred to me that maybe it’supposed to power off when the lid is closed. I’ll have to check it out.)

On the other hand, Fatdog allows me to properly set other resolutions than the default; Bionicpup doesn’t, nor do other Pups -- even most big distros I’ve tried have problems. But Fatdog’s display goes blank suddenly for no perceptible reason a few minutes after boot-up, and I have no option but to power off. I remember seeing something on boot-up about disabling problematic video drivers or something, which probably has to do with this type of display problem. I wasn’t able to do much looking around because of the display problem. I’ll have to do some reading up on Fatdog.

In contrast, Bionicpup has been very stable on my system so far.

@Mike Walsh, yes, I got the little icon in the tray, and yes, the slider works. Thank you. :)

It’s night, but I’m sitting comfortably typing this post in Bionicpup with no eyestrain. So, @everybody who chipped in in this thread, heartfelt thanks. :)

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#38 Post by Mike Walsh »

@ 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:

sheldonisaac
Posts: 902
Joined: Mon 22 Jun 2009, 01:36
Location: Philadelphia, PA

#39 Post by sheldonisaac »

Mike Walsh (in part) wrote:Give the attached .pet a try...Just click on it, see if the slider does what it should (if it does, great!), then click 'Done' when finished.
Mike, it does indeed work very well on this Dell E6410 laptop.

Thanks very much,
Sheldon
Dell E6410: BusterPup, BionicPup64, Xenial, etc
Intel DQ35JOE, Dell Vostro 430
Dell Inspiron, Acer Aspire One, EeePC 1018P

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#40 Post by Mike Walsh »

ozsouth wrote:@MikeW - sophisticated script - interesting. I made a detection script, but didn't share it as xrandr really is a rather crude way to do brightness - a last resort, I feel & wrong values could cause issues. Here's my code (value of S sets brightness of discovered output):

#!/bin/sh
S="1.0"
A=$(xrandr --current | egrep -m1 "connected" )
B=$(echo $A | cut -f 1 -d " ")
xrandr --output $B --brightness $S
Hi, oz.

Ah, if it wasn't for Fred, I doubt this would have got off the ground. I've played around with odd snippets of code here & there (usually borrowed from elsewhere, and usually simple enough that even I can comprehend them), and incorporated them into the odd wee project from time to time, but I'm a long way from being able to just sit down & write things off the top of my head. I can't 'think' in code, I'm afraid; I never was much good at learning languages!

The yad stuff in that stanza is mostly mine - I'm good with anything graphical, and quite a perfectionist - but the coding is all down to Fred on this one.

--------------------------------------------

@ sheldonisaac:-

Sheldon; you're very welcome. Hope it proves useful!


Mike. :wink:

Post Reply