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

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: 1059
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 302 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: 183
Joined: Sun Jul 12, 2020 11:16 pm
Location: Mexico
Has thanked: 59 times
Been thanked: 75 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 1052 times

I hope it works for you

Cheers !! :thumbup2:

Attachments
BrightSelect.(sh).txt
(876 Bytes) Downloaded 50 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: 80
Joined: Fri Feb 12, 2021 1:20 pm
Has thanked: 14 times
Been thanked: 16 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”