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 Fri 14 Dec 2018, 01:43
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Desktop
Brightness & colour temperature control for desktop PCs
Post new topic   Reply to topic View previous topic :: View next topic
Page 6 of 6 [84 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6
Author Message
greengeek


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

PostPosted: Wed 10 Oct 2018, 14:21    Post subject:  

fredx181 wrote:
I cannot understand btw, what can be the problem when restarting X, but apparently for you there's some issue with that.
Yes, X restart is problematic for me - I will try to explain:

I try to keep my system small and "lean" - so I often use software by loading pets during a session - rather than having those pets permanently loaded into a savefile (I have no savefile).

Imagine the situation where I have a number of windows open (browser , word processor etc) and I decide the screen is too bright so I load Mikes pet to control gamma and brightness - if I am forced to restart X to get the pet working, then all of those windows will close and I will be back to a blank desktop and I will have to start my session all over again.

(Restart WM does not cause window loss)
Back to top
View user's profile Send private message 
fabrice_035


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

PostPosted: Wed 10 Oct 2018, 14:25    Post subject:  

greengeek wrote:

Code:
xrandr --output LVDS1 --set BACKLIGHT 5

Code:
xrandr --output LVDS1 --set BACKLIGHT 10

("BACKLIGHT" must be uppercase)
.



Code:

root# xrandr | grep " connected " | awk '{ print$1 }'
HDMI-0
LVDS

root# xrandr --output LVDS --set BACKLIGHT 5
X Error of failed request:  BadName (named color or font does not exist)
  Major opcode of failed request:  140 (RANDR)
  Minor opcode of failed request:  11 (RRQueryOutputProperty)
  Serial number of failed request:  33
  Current serial number in output stream:  33
root#

Back to top
View user's profile Send private message 
greengeek


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

PostPosted: Wed 10 Oct 2018, 14:32    Post subject:  

Mike Walsh wrote:
Does anybody know where the script dealing with the contents of the notification area resides? Be interesting to find out, actually.:


Hi Mike,

I am no expert at this but hopefully I can show one method to position tray icons:

If you are using JWM as your WM, open the hidden file /root/.jwmrc-tray
Here is mine:
Code:
<JWM>
   <Tray  autohide="false" insert="right" x="0" y="-1" border="1" height="28" >
      <!-- Additional TrayButton attribute: label -->
      <TrayButton label="Menu" icon="logo-mini.png" border="true">root:3</TrayButton>
      <TrayButton popup="Show Desktop" icon="mini-desktop.xpm" border="true">showdesktop</TrayButton>
      <TrayButton popup="Terminal" icon="/usr/local/lib/X11/pixmaps/console24.png" border="true">exec:urxvt</TrayButton>
      <TrayButton popup="Files" icon="/usr/local/lib/X11/pixmaps/folder24.png" border="true">exec:rox</TrayButton>
      <TrayButton popup="Browser" icon="/usr/local/lib/X11/pixmaps/www24.png" border="true">exec:defaultbrowser</TrayButton>
      <TrayButton popup="Leafpad" icon="/usr/local/lib/X11/mini-icons/leafpad.png" border="true">exec:leafpad</TrayButton>
      <TrayButton popup="BacklightUP" icon="/usr/local/lib/X11/pixmaps/brightup24.png" border="true">exec:xbacklight +15</TrayButton>
      <TrayButton popup="BacklightDWN" icon="/usr/local/lib/X11/pixmaps/brightdwn24.png" border="true">exec:xbacklight -10</TrayButton>
      
      <TrayButton popup="XVkbd" icon="/usr/local/lib/X11/pixmaps/kbd24.png" border="true">exec:xvkbdstart</TrayButton>
      <Pager/>
      <!-- Additional TaskList attribute: maxwidth -->
      <TaskList maxwidth="200"/>
      <Dock/>
      <!-- Additional Swallow attribute: height -->
   <!--   <Swallow name="blinky">
         blinkydelayed -bg "#DCDAD5"
      </Swallow> -->
   <!--   <Swallow name="xtmix-launcher">
         xtmix -launch
      </Swallow> -->
   <!--   <Swallow name="asapm">
         asapmshell -u 4
      </Swallow> -->
         <!--   <Swallow name="freememapplet" width="34">
         freememappletshell
      </Swallow> -->
   <!--   <Swallow name="freememapplet" width="34">
         freememappletshell
      </Swallow> -->
      <Swallow name="xload" width="32">
         xload -nolabel -bg "#888888" -fg red -hl white
      </Swallow>
      <Clock format="%H:%M">minixcal</Clock>
   </Tray>
</JWM>


I can now add in the line that Mochi was using to position his unicode symbol as a tray icon eg:
Code:
<TrayButton label="◑">exec:/usr/bin/mm_brightness_slider</TrayButton>


If I put that line in the "TrayButton" area (eg in the blank space that I left above the "XVKBD" tray button declaration) then that icon will appear on the left hand side of the menu tray, with the icons sitting to the right of the menu button.

If I put that line somewhere in the "swallow" declarations then it will appear in the tray area near the clock

To activate the change all I need to do is:
Code:
jwm -restart

and the icon appears without losing all of my open windows (as would happen with a restart X)

(I am sure Mochi and others will correct my fundamental misunderstandings about this Smile )
Back to top
View user's profile Send private message 
greengeek


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

PostPosted: Wed 10 Oct 2018, 14:36    Post subject:  

fabrice_035 wrote:
root# xrandr --output LVDS --set BACKLIGHT 5
X Error of failed request: BadName (named color or font does not exist)
Major opcode of failed request: 140 (RANDR)
Minor opcode of failed request: 11 (RRQueryOutputProperty)
Serial number of failed request: 33
Current serial number in output stream: 33
root#

[/code]
Hi Fabrice, can you post the output of the following command please?
Code:
xrandr --verbose | grep Backlight

(must use capital B for Backlight)
Back to top
View user's profile Send private message 
fredx181


Joined: 11 Dec 2013
Posts: 3576
Location: holland

PostPosted: Wed 10 Oct 2018, 15:17    Post subject:  

@greengeek

Following MochiMoppel's brightness slider example for adding to ~/.jwmrc:

Code:
<TrayButton label="◑">exec:/usr/bin/mm_brightness_slider</TrayButton>

Then:
For Mike's BrightSelect.sh script, add in ~/.jwmrc
Code:
<TrayButton label="◑">exec:/usr/local/bin/BrightSelect.sh</TrayButton>

Then: "jwm -restart" should do.

But then maybe better remove /root/Startup/ScreenControl.sh
(to avoid displaying the yad icon (will be duplicate), in case you do restart X or reboot with save)

Quote:
xrandr --verbose | grep Backlight


This gives no output for me.

Fred

_________________
Dog Linux website
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 10 Oct 2018, 15:34    Post subject:  

@ Ian:-

Give this one a try. It's identical to the one from last night, with the addition of a 'pinstall.sh' script that places the icon in the tray when you install it.

https://www.datafilehost.com/d/dc10b5c2

Not sure how you'd remove the icon afterwards, though.

Code:
jwm -restart


....doesn't get rid of it for me (and I'm not too sure how a 'puninstall.sh' script works.)

See what ya think. I spoil you, buddy..! Laughing


Mike. Wink

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

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


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

PostPosted: Thu 11 Oct 2018, 13:36    Post subject:  

Mike Walsh wrote:
Give this one a try....
Not sure how you'd remove the icon afterwards, though.
Not a problem for me - the icon mysteriously disappears after I shut down (that's why I like having no save file) Twisted Evil

Quote:
See what ya think. I spoil you, buddy..! Laughing
Indeed - many thanks for the updated pet. It's perfect for some of my needs. Working as described and yad definitely makes the interface look good Exclamation

HOWEVER - i still feel that adjusting gamma is the wrong approach if backlight control is available. Of course it isn't always available, but on many monitors - even external ones it is available so I feel people should be aware of it.

Here are some threads that offer more information:

https://unix.stackexchange.com/questions/189675/is-there-a-way-to-adjusts-the-brightness-of-the-monitor/189690

https://github.com/jonls/redshift/issues/436
(this thread also mentions "Clight")

and here is the thread re ddccontrol: https://github.com/ddccontrol/ddccontrol

I think each user should inspect the output of xrandr (xrandr --verbose) to see if "BACKLIGHT" or "Backlight" or "backlight" are mentioned anywhere.

In theory, any device that has such a variable noted by xrandr should be able to have its backlight controlled, rather than dimming pixels or altering the colour balance of pixels.

Once you have the info from xrandr regarding the range of backlight values permissible within xrandr then you can script the required values into the correctly spelled "backlight" variable.

(i mention this not as a negative against your pets - but just in case future users are looking for other specific ways to control backlight)
Back to top
View user's profile Send private message 
greengeek


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

PostPosted: Fri 12 Oct 2018, 04:30    Post subject:  

To find out if you might be able to control backlight intensity rather than controlling pixel attributes try the following command:
Code:
xrandr --verbose | grep -e "ack" -e "ACK"


If it returns numerical values then you do not necessarily need to use pixel control as a method of controlling brightness.

EDIT : Ooops! Corrected typo. The command will work now. Sorry!
Embarassed
Back to top
View user's profile Send private message 
gjuhasz


Joined: 29 Sep 2008
Posts: 371

PostPosted: Mon 12 Nov 2018, 19:40    Post subject: Battery saving brightness control for Intel laptops  

Hi,

I found a battery saving brightness control method for my HP laptop (HP 250 G6 with Intel HD 520 graphics).

See details at

http://murga-linux.com/puppy/viewtopic.php?t=96964&start=241

Have fun!

Regards

gjuhasz
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 6 of 6 [84 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Desktop
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.0787s ][ Queries: 13 (0.0133s) ][ GZIP on ]