Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 15 Dec 2018, 07:40
All times are UTC - 4
 Forum index » House Training » Beginners Help ( Start Here)
How to decrease the screen brightness?
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 3 of 3 [44 Posts]   Goto page: Previous 1, 2, 3
Author Message
ozsouth

Joined: 01 Jan 2010
Posts: 399
Location: S.E Australia

PostPosted: Mon 12 Nov 2018, 23:55    Post subject:  

Aha! Try xrandr --output eDP --gamma .8:.8:.8
or xrandr --output eDP --brightness .8
Back to top
View user's profile Send private message 
bjn

Joined: 24 Jan 2014
Posts: 28

PostPosted: Tue 13 Nov 2018, 00:07    Post subject:  

@ozsouth, the screen brightened at the first command, darkened at the second.
Back to top
View user's profile Send private message 
ozsouth

Joined: 01 Jan 2010
Posts: 399
Location: S.E Australia

PostPosted: Tue 13 Nov 2018, 00:17    Post subject:  

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, 00:32; edited 1 time in total
Back to top
View user's profile Send private message 
bjn

Joined: 24 Jan 2014
Posts: 28

PostPosted: Tue 13 Nov 2018, 00:30    Post subject:  

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

Editing to add that i mean 'later' as in (my) tomorrow. Smile
Back to top
View user's profile Send private message 
Mike Walsh


Joined: 28 Jun 2014
Posts: 4460
Location: King's Lynn, UK.

PostPosted: Tue 13 Nov 2018, 07:53    Post subject:  

@ ozsouth/bjn:-

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

Code:
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:
# 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:
--print-partial


...command looks like this:-

Code:
#!/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:
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
Brightness_control_4_desktop_PCs-v1.1.pet
Description  Original screen brightness slider control developed by Fredx181 & Mike Walsh
pet

 Download 
Filename  Brightness_control_4_desktop_PCs-v1.1.pet 
Filesize  24.7 KB 
Downloaded  31 Time(s) 

_________________
MY PUPPY PACKAGES | 'Thanks' are always appreciated!
--------------------------------------

Back to top
View user's profile Send private message Visit poster's website 
ozsouth

Joined: 01 Jan 2010
Posts: 399
Location: S.E Australia

PostPosted: Tue 13 Nov 2018, 09:05    Post subject:  

@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
Back to top
View user's profile Send private message 
bjn

Joined: 24 Jan 2014
Posts: 28

PostPosted: Tue 13 Nov 2018, 22:44    Post subject:  

@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. Smile

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. Smile
Back to top
View user's profile Send private message 
Mike Walsh


Joined: 28 Jun 2014
Posts: 4460
Location: King's Lynn, UK.

PostPosted: Wed 14 Nov 2018, 07:29    Post subject:  

@ 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

_________________
MY PUPPY PACKAGES | 'Thanks' are always appreciated!
--------------------------------------

Back to top
View user's profile Send private message Visit poster's website 
sheldonisaac

Joined: 21 Jun 2009
Posts: 776
Location: Philadelphia, PA

PostPosted: Wed 14 Nov 2018, 08:51    Post subject:
Subject description: /mnt/sdb2/Downloads/Brightness_control_4_desktop_PCs-v1.1.pet
 

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: Xenial, Bionicpup64, etc
Dell Mini 9, Acer Aspire One, EeePC 1018P, PowerBook G4
Intel D865GBF, Intel DQ35JOE
Back to top
View user's profile Send private message 
Mike Walsh


Joined: 28 Jun 2014
Posts: 4460
Location: King's Lynn, UK.

PostPosted: Wed 14 Nov 2018, 09:55    Post subject:  

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

_________________
MY PUPPY PACKAGES | 'Thanks' are always appreciated!
--------------------------------------

Back to top
View user's profile Send private message Visit poster's website 
fabrice_035


Joined: 28 Apr 2014
Posts: 540
Location: Bretagne / France

PostPosted: Wed 14 Nov 2018, 13:01    Post subject:  

This is an error :
Code:

#!/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:

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:

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


the good way

Code:

 xrandr --current | grep -m1 -w "connected"


Regard

_________________
Linux Tahrpup 6.0.6 / 3.14.79
Back to top
View user's profile Send private message 
ozsouth

Joined: 01 Jan 2010
Posts: 399
Location: S.E Australia

PostPosted: Wed 14 Nov 2018, 17:53    Post subject:  

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.
Back to top
View user's profile Send private message 
bjn

Joined: 24 Jan 2014
Posts: 28

PostPosted: Wed 14 Nov 2018, 19:28    Post subject:  

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. Smile

Once again, my thanks to everyone who came to assist me.
Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 5330
Location: Republic of Novo Zelande

PostPosted: Fri 23 Nov 2018, 14:20    Post subject:  

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?
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 3 of 3 [44 Posts]   Goto page: Previous 1, 2, 3
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Beginners Help ( Start Here)
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1319s ][ Queries: 13 (0.0331s) ][ GZIP on ]