Adjust brighness on laptop display?

Get help with the LXDE desktop
stealthfreighter
White ninja
White ninja
Posts: 18
Joined: 12 May 2023, 19:46
Distribution: Slackware, Porteus 5.0 LXDE

Adjust brighness on laptop display?

Post#1 by stealthfreighter » 07 Jun 2023, 17:22

Hello
Is there any tool, which I may have not yet discovered in porteus, that would allow me to adjust the "laptop screen brightness" (technically the LCD backlight intensity) in LXDE?
I looked in the porteus setting center, and everything related in the preferences menu, and also right clicking on stuff on the task bar (panel applets/add...) but could not find anything relevant to screen brightness or power management.
My keyboard fn keys Brightness Up/Down don't work either but that is a secondary issue as I don't change brightness as much as some other folks do.

This link has given me some hope
https://livingthelinuxlifestyle.wordpre ... e-desktop/
but I can't find the XFCE Power Manager and the xrandr method works very suspiciously (it can go over 1.0, but when set to 0.1 the mouse cursor still looks "normal"? I have the feeling that it's modifying something like brightness, but not the backlight intensity)...

Then I found this solution https://unix.stackexchange.com/question ... brightness (I'm referring to the one involving /sys/class/backlight/) and it works. The problem is that I haev to be root in order to dump values into brightness so it's excluded to have a set of little scripts on my desktop by which to set the backlight to a few pre-defined values...

Any solution would be welcome
Cheers

User avatar
francois
Contributor
Contributor
Posts: 6435
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Adjust brighness on laptop display?

Post#2 by francois » 08 Jun 2023, 04:05

Prendre son temps, profiter de celui qui passe.

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 3965
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
Location: australia
Contact:

Adjust brighness on laptop display?

Post#3 by ncmprhnsbl » 08 Jun 2023, 04:52

stealthfreighter wrote:
07 Jun 2023, 17:22
Then I found this solution https://unix.stackexchange.com/question ... brightness (I'm referring to the one involving /sys/class/backlight/) and it works. The problem is that I haev to be root in order to dump values into brightness so it's excluded to have a set of little scripts on my desktop by which to set the backlight to a few pre-defined values...
you can try either: putting that command in a script and referencing it in /etc/rc.d/rc.local (as root)
or use the cheatcode: cliexec=/path/to/script in <your_boot_device>/boot/syslinux/porteus.cfg on the APPEND line of your chosen boot entry
or simply put the command in one of those places. (no sudo needed as they're run as root at that stage)

the cheatcode would look like: cliexec=cp~/sys/class/backlight/intel_backlight/max_brightness~/sys/class/backlight/intel_backlight/brightness (or whatever suits your hardware)
ie. with '~' replacing spaces
see <your_boot_device>/boot/docs/cheatcodes.txt > cliexec=
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

Testuser
Samurai
Samurai
Posts: 138
Joined: 26 May 2021, 15:11
Distribution: Porteus-v5.0-64-LXDE

Adjust brighness on laptop display?

Post#4 by Testuser » 08 Jun 2023, 17:04

Please follow this thread and download the tool.

Simple brightness control tool.

This will change screen brightness using the hardware (xandr does it programatically) in laptop which help with battery backup. :)

User avatar
francois
Contributor
Contributor
Posts: 6435
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Adjust brighness on laptop display?

Post#5 by francois » 09 Jun 2023, 02:09

On lxde, here is a simple solution using;
https://livingthelinuxlifestyle.wordpre ... e-desktop/
lxde menu > preferences > power management > general tab
Make sure that these two features are on:
handle display brightness key
system tray icon

Then from the system tray icon you will have a brightness dimmer.
Prendre son temps, profiter de celui qui passe.

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 3965
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
Location: australia
Contact:

Adjust brighness on laptop display?

Post#6 by ncmprhnsbl » 09 Jun 2023, 04:25

francois wrote:
09 Jun 2023, 02:09
On lxde, here is a simple solution using;
as stated in the article, this uses xfce power manager which stealthfreighter points out in the first post, is not included in porteus lxde.
in fact they link to that very article.

Testuser's proposal looks good, for a gui solution.
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

stealthfreighter
White ninja
White ninja
Posts: 18
Joined: 12 May 2023, 19:46
Distribution: Slackware, Porteus 5.0 LXDE

Adjust brighness on laptop display?

Post#7 by stealthfreighter » 09 Jun 2023, 13:30

Thank you for your reply.
The first link you gave either gives the "incorrect" option (setting brightness via xrandr) or the xbacklight option which does not work with every (for example my) display adapter ("No outputs have backlight property"... while I can obviously change it using the second method in my original post...).
I will try the permission modifications via startup script mentioned in your second link and report back... might also be a useful porteus-wide modification as the backlight scripts written in the ACPI section of the same link are very easy to write and very convenient i.e. 4 or 5 scripts on the desktop for 4 or 5 brightness levels, if there is no need to enter root password every time...
ncmprhnsbl wrote:
08 Jun 2023, 04:52
you can try either: putting that command in a script and referencing it in /etc/rc.d/rc.local (as root)
I understand where you are coming from, but modifying the brightness (backlight luminosity) on a laptop display is not like modifying it on a stand-alone LCD monitor where you usually set it to the optimal value mentioned by the manufacturer and be done with it. On a laptop you usually have to modify the brightness (backlight luminosity) several times a day: if it's sunny or overcast, if it's night or day, if you have the lights in the room turned on or not...
Testuser wrote:
08 Jun 2023, 17:04
Please follow this thread and download the tool.

Simple brightness control tool.

This will change screen brightness using the hardware (xandr does it programatically) in laptop which help with battery backup. :)
I may try it but as xbacklight does not report correctly (see my reply to francois, above), and your tool uses it, it wouldn't have much sense.
I have an nvidia graphics card (it's an old one and it's standalone, not dual-graphics) that uses /sys/class/backlight/nv_backlight

Darsh
Ronin
Ronin
Posts: 1
Joined: 12 Nov 2023, 16:28
Distribution: Microsoft

Adjust brighness on laptop display?

Post#8 by Darsh » 14 Nov 2023, 15:26

To adjust the brightness on a laptop display, you can usually use dedicated function keys on your keyboard. Look for icons resembling a sun or a light bulb; typically, they are combined with the 'Fn' key. Pressing 'Fn' along with the corresponding brightness key will allow you to increase or decrease brightness levels. If function keys aren't available, check your system settings; on Windows, you can adjust brightness in the Power & sleep settings, while on Linux or macOS, it's often in the display settings. Proper screen brightness not only enhances visibility but also conserves battery life on laptops.

seed_clapper
Black ninja
Black ninja
Posts: 44
Joined: 17 Oct 2022, 13:22
Distribution: Porteus 5

Adjust brighness on laptop display?

Post#9 by seed_clapper » 03 Jan 2024, 14:43

Changing backlight brightness did not work on my laptop with porteus lxqt.
My solution was

add "acpi_backlight=native" to kernel boot parameters (/boot/syslinux/porteus.cfg)
this replaced "/sys/class/backlight/acpi_video0" with "/sys/class/backlight/intel_backlight"
and changing brightness in settings and by fn keys started to work

creating porteus/rootcopy/etc/X11/xorg.conf.d/20-intel.conf made xbacklight work in terminal

Code: Select all

Section "Device"
    Identifier "Intel Graphics"
    Driver     "intel"
    Option     "Backlight" "intel_backlight"
EndSection
in order to make fn keys work in kde5 added "acpi_osi='Windows 2009'" to kernel boot parameters

PorteuX stable should be same but xf86-video-intel driver module is needed to be loaded at boot.

Testuser
Samurai
Samurai
Posts: 138
Joined: 26 May 2021, 15:11
Distribution: Porteus-v5.0-64-LXDE

Adjust brighness on laptop display?

Post#10 by Testuser » 17 Mar 2024, 15:55

Excellent Findings @seed_clapper :good:

Post Reply