Fossapup64 on HP 240 G8 laptop - can't adjust screen brighness (Solved)

Moderators: 666philb, Forum moderators

Post Reply
newpet
Posts: 30
Joined: Fri Sep 24, 2021 9:29 am
Has thanked: 3 times
Been thanked: 2 times

Fossapup64 on HP 240 G8 laptop - can't adjust screen brighness (Solved)

Post by newpet »

I'm not new to puppy linux, I still have Tahrpup 32-bit installed on my old but perfectly working asus eeepc.
Since 32-bit browsers seem not easily available anymore, I bought a HP 240 G8. My aim is not to leave puppy.
Booting Fossapup64 from external usb key is okay, and everything works like a charme, but I'm not able to set screen brightness. Keys combinations do not have any effect, and brightness is stuck to max, it almost burns my eyes.
Any help is appreciated. Thanks in advance. :|

Last edited by Flash on Fri Sep 24, 2021 11:11 pm, edited 2 times in total.
Reason: Original title: Fossapup64 on my new laptop - need some HELP
Feek
Posts: 397
Joined: Sun Oct 18, 2020 8:48 am
Location: cze
Has thanked: 49 times
Been thanked: 90 times

Re: Fossapup64 on my new laptop - need some HELP

Post by Feek »

In Fossapup64 try this:

menu -> desktop (or utilities?) -> redshift

after clicking on it a small icon should appear in the right bottom tray. After click on the small icon a small window with 2 sliders will appear, one of them is brightness.

newpet
Posts: 30
Joined: Fri Sep 24, 2021 9:29 am
Has thanked: 3 times
Been thanked: 2 times

Re: Fossapup64 on my new laptop - need some HELP

Post by newpet »

Thanks Feek ! It Works!
Okay, it's a little tricky, and telling the truth key combination is far more convenient, since I change it often, depending what I do with the nb, but I can live with it.
Thanks again !
:thumbup2:

Feek
Posts: 397
Joined: Sun Oct 18, 2020 8:48 am
Location: cze
Has thanked: 49 times
Been thanked: 90 times

Re: Fossapup64 on my new laptop - need some HELP

Post by Feek »

@newpet, you´re welcome.

You can also symlink the executable file of the redshift into /root/startup and have the icon in the bottom tray available after each boot

newpet
Posts: 30
Joined: Fri Sep 24, 2021 9:29 am
Has thanked: 3 times
Been thanked: 2 times

Re: Fossapup64 on my new laptop - need some HELP

Post by newpet »

Yes, I will do this way. I'm not sure if redshift controls brightness by modifying the whole gamma adjustment OR the screen's backlight instead, but it does the job for me. Enough for not to send back the nb to the vendor, lets say :thumbup2:

newpet
Posts: 30
Joined: Fri Sep 24, 2021 9:29 am
Has thanked: 3 times
Been thanked: 2 times

Re: Fossapup64 on HP 240 G8 laptop - can't adjust screen brighness

Post by newpet »

Sadly, I can't adjust screen brightness permanently.
Yes, I can have the icon in the bottom tray available after each boot, but I have to click on it after each boot for not to damage my eyes. Oddly, redshift seems to preserve my setting, but for some reason I have to click on it each time to make it effective. Any idea? :cry:

williams2
Posts: 1030
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 294 times

Re: Fossapup64 on HP 240 G8 laptop - can't adjust screen brighness (Solved)

Post by williams2 »

You really should adjust the brightness of the backlight before adjusting the gamma. You could get a better picture that way.

You should be able to adjust the brightness of the backlight by typing in a terminal (console)

brightness-set 8

which sets the backlight brightness to 8%
You can try different numbers.

If you find a number you like, you can execute the command automatically every time Puppy boots by pasting the command in the file /etc/rc.d/rc.local

You can set the gamma using xrandr or xgamma, instead of redshift. For example, you can make the screen less bright by typing xgamma -gamma 0.9

newpet
Posts: 30
Joined: Fri Sep 24, 2021 9:29 am
Has thanked: 3 times
Been thanked: 2 times

Re: Fossapup64 on HP 240 G8 laptop - can't adjust screen brighness (Solved)

Post by newpet »

@williams2
thank you very much, setting rc.local does the magic, and now I can start my nb in 'normal' brightness (8 is perfect) :thumbup2:
What I miss now is a way for adjusting brightness without the need of editing the terminal.
This nb has two dedicated keys (fn+f3 & fn+f4) for controlling brightness, they work with windows but not with puppy.
Maybe there is a way for restoring the function to the same keys even with puppy? :geek:

User avatar
bigpup
Moderator
Posts: 6514
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 790 times
Been thanked: 1352 times

Re: Fossapup64 on HP 240 G8 laptop - can't adjust screen brighness (Solved)

Post by bigpup »

menu->Setup->Mouse/keyboard Wizard->Advanced Configuration->Keyboard Model

See if selecting a specific model for a HP laptop will help any.
May not list your exact model HP, but one that is similar may help.

Usually Fossapup64 (any Puppy version) just selects a generic keyboard to use.
Those do not have specific adjustment keys to use.

Forum Global Moderator
The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

williams2
Posts: 1030
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 294 times

Re: Fossapup64 on HP 240 G8 laptop - can't adjust screen brighness (Solved)

Post by williams2 »

Some Pups work OOTB. I think FatDog sets up the brightness keys automatically, using sven.

I think you need a an app like adjbacklight

For example:

To increase the brightness by 5%
adjbacklight -s +5%

To decrease the brightness by 5%
adjbacklight -s -5%

The easiest way to link a key to adjbacklight is probably to drag adjbacklight to the rox pinboard (desktop), right click the clickable icon, select Edit Item, and click click to set to set the shortcut key. You need to put -s +5% or -s -5% in the Arguments to pass box. So you have 2 desktop icons on the desktop.

If that doesn't work, you could write 2 scripts, like this:

Code: Select all

#!/bin/sh
adjbacklight -s +5%

and

Code: Select all

#!/bin/sh
adjbacklight -s -5%

and drag the 2 scripts to the pinboard, and set the shortcut keys.
/root/my-applications/bin/ is probably a good place to put scripts and the adjbacklight executable.

Attached is the adjbacklight executable. It is zipped, just download and click it to unzip it.
It is a 32 bit executable, but it seems to run in most 64 bit Pups.

If you run it in a terminal, you can adjust the backlight brightness using the arrow keys.

Or you can set shortcut keys in JWM.

Attachments
adjbacklight.gz
download, then click to unzip.
(7.19 KiB) Downloaded 57 times
newpet
Posts: 30
Joined: Fri Sep 24, 2021 9:29 am
Has thanked: 3 times
Been thanked: 2 times

Re: Fossapup64 on HP 240 G8 laptop - can't adjust screen brighness (Solved)

Post by newpet »

thank you bigpup and williams2 for your quick reply
- my specific model of HP nb is not listed in menu->setup->mouse/keyboard wizard-adv.conf.->kb model
- I checked all HP keyboards but noone works
- as suggested by williams2, I downloaded 'adjbacklight', dragged it to dt and tried 'arguments' as shown in the option section of adjbacklight (GitHub). '-s' does not work at all, but weirdly '-g' seems to work with % (+/- 10% in my case).
- I then set two shortcut keys in 'edit item', F2 & F3 and everything is fine now.
- I noticed that noone of the function keys work OOTB, like, just to mention some, audio + and -, airplane mode, ecc, and now I have to deal with them, and telling the truth I dont know where to start from.
Thank you to you and the community for your indispensable help :thumbup2:

williams2
Posts: 1030
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 294 times

Re: Fossapup64 on HP 240 G8 laptop - can't adjust screen brighness (Solved)

Post by williams2 »

I didn't test it, just read the help.

For some reason, -s doesn't work. It seems to work to just leave the -s out. Like this:

adjbacklight +5%

You can do the same thing with other keys. For example, I have a script named mute:

Code: Select all

#!/bin/sh
amixer set Master toggle &> /dev/null

Which I dragged to the desktop and set the Fn+F11 key as a shortcut to the mute script.
It works for analog audio but not for hdmi audio.

If you use Jwm you can set up shortcut keys in the jwm configuration files. A little harder but not much. You don't need to drag icons to the desktop if you set up shortcut keys in jwm.

User avatar
PipzDex
Posts: 178
Joined: Sun Jul 12, 2020 11:16 pm
Location: Mexico
Has thanked: 56 times
Been thanked: 71 times

Re: Fossapup64 on HP 240 G8 laptop - can't adjust screen brighness (Solved)

Post by PipzDex »

Hi @newpet

I share with you this script which works in a very similar way to the others that exist, this slider control I use continuously since it works using xrandr and honestly personally it has worked perfectly on my PC regardless of the puppy version (32 or 64b) or the distribution used (Specify xenialpup fossa64 etc) ...

Code: Select all

#!/bin/bash
#
# Brightness slider control for desktop 'external' monitors - with inspiration from johnywhy, and many thanks to Fredx181 : © Mike Walsh - Sept 2018
#
# 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="10"
yad --undecorated --on-top --top --geometry=450x80-295-40 --text="      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 

this is how it looks and is located in the lower right corner

Slider.jpg
Slider.jpg (6.21 KiB) Viewed 899 times

I hope it works for you

Cheers !! :thumbup2:

Attachments
BrightSelect.(sh).txt
(876 Bytes) Downloaded 48 times

Pentium (R) 2.20GHz I RAM: 8.0 GB I F96-CE_5 I Kernel 6.6.8-64oz-ao I Glibc: 2.31 I 1600x900 Px

My Puppy Stuff and more

newpet
Posts: 30
Joined: Fri Sep 24, 2021 9:29 am
Has thanked: 3 times
Been thanked: 2 times

Re: Fossapup64 on HP 240 G8 laptop - can't adjust screen brighness (Solved)

Post by newpet »

Solved.

Paste 'brightness-set 10' in /etc/rc.d/rc.local, in order to avoid 'eyes burning' when booting. This value (10) may change of course depending by your taste.
Download and copy 'adjbacklight' into /bin folder.

Desktop-->JWMDesk Manager-->JWM Hotkey

XF86MonBrightnessDown --> exec:adjbacklight -5%
XF86MonBrightnessUp --> exec:adjbacklight +5%

XF86AudioMute --> exec:amixer sset Master toggle
XF86AudioRaiseVolume --> exec:amixer sset Master 1+,1+
XF86AudioLowerVolume --> exec:amixer sset Master 1-,1-

No need to select other keyboards, symlinks, dealing with terminal, scripts, screen shortcuts etc.
Hope this helps who experiences this kind of problems, maybe with the same nb brand.

PipzDex --> Thank you for your script, I'll try it soon.

THANK YOU ALL GUYS !
:thumbup2: :thumbup2: :thumbup2:

bigpuppyfan
Posts: 78
Joined: Fri Feb 12, 2021 1:20 pm
Has thanked: 14 times
Been thanked: 15 times

Re: Fossapup64 on HP 240 G8 laptop - can't adjust screen brighness (Solved)

Post by bigpuppyfan »

Just FYI, there already is a script in Fossapup named brightness-set, which does the same as adjbacklight

Post Reply

Return to “Fossapup64”