Hello,
ls -al /sys/class//backlight/ intel_backlight -> ../../devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight
ls -al /sys/class/backlight/acpi_video0/ no file
xbacklight is installed.
To adjust the brigtness : Menu => Trinity Configuration Center => Périphériques => Hardware Device Manager => Backlight => Intel HD Graphics 520 and I can adjust the brightness from 0 to 100%, but the value is not keeped if I close the session. The default value = 62%
This is the situation.
Regards,
André
On 07/16/2019 04:10 AM, andre_debian@numericable.fr wrote:
Hello,
ls -al /sys/class//backlight/ intel_backlight -> ../../devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight
ls -al /sys/class/backlight/acpi_video0/ no file
xbacklight is installed.
To adjust the brigtness : Menu => Trinity Configuration Center => Périphériques => Hardware Device Manager => Backlight => Intel HD Graphics 520 and I can adjust the brightness from 0 to 100%, but the value is not keeped if I close the session. The default value = 62%
This is the situation.
This is where you can create a script to monitor intel_backlight and write the value out to, e.g. /usr/local/share/${USER}-backlight
cat /sys/class/backlight/intel_backlight/brightness > /usr/local/share/${USER}-backlight
Then simply create another script (linked within ~/.trinity/Autostart) that will restore the brightness level on trinity startup, e.g.
#!/bin/sh
savedbl="/usr/local/share/${USER}-backlight" sysfile="/sys/class/backlight/intel_backlight/brightness"
if [ -s "$savedbl" ] ## if saved backlight file exists then sudo sh -c "cat '"$savedbl"' > '"$sysfile"'" ## restore saved backlight fi
(just make sure the file is executable and that you have sudo privileges)
On Thursday 18 July 2019 04:02:13 David C. Rankin wrote:
This is where you can create a script to monitor intel_backlight and write the value out to, e.g. /usr/local/share/${USER}-backlight
Hello David,
I cannot create the file "${USER}-backlight" in /usr/local/share/ or I don't understand (maybe the "$" ?)
Thanks, regards,
andré
cat /sys/class/backlight/intel_backlight/brightness > /usr/local/share/${USER}-backlight Then simply create another script (linked within ~/.trinity/Autostart) that will restore the brightness level on trinity startup, e.g. #!/bin/sh savedbl="/usr/local/share/${USER}-backlight" sysfile="/sys/class/backlight/intel_backlight/brightness" if [ -s "$savedbl" ] ## if saved backlight file exists then sudo sh -c "cat '"$savedbl"' > '"$sysfile"'" ## restore saved backlight fi (just make sure the file is executable and that you have sudo privileges)
On 07/19/2019 03:36 AM, andre_debian@numericable.fr wrote:
Hello David,
I cannot create the file "${USER}-backlight" in /usr/local/share/ or I don't understand (maybe the "$" ?)
Thanks, regards,
andré
andré,
"${USER}-backlight" will be a new file that holds the current brightness setting. ${USER} just expands to your username. It was just brace-enclosed to make that apparent.
For what it is worth I use the following script (with a second script that is just a wrapper to call the primary script with the -s option for startup) The wrapper script (scrnbrightwiznv_startup.sh) is simply:
#!/bin/bash
/home/david/scr/adm/scrnbrightwiznv.sh -s
In my ~/.kde/Autostart (you would have ~/.trinity/Autostart or ~/.tde/Autostart), I just use the symlink
l ~/.kde/Autostart/ ... scrnbrightwiznv_startup.sh -> /home/david/scr/adm/scrnbrightwiznv_startup.sh
The primary script is attached. You will need to change acpi_video0 to intel_backlight. Other than that, it should work for you. You can simply use the wrapper calling it with the -s option at startup in the Autostart folder if tdepowersave handles the changes during the session for you. (however, you will need a way to write the final brightness value to the file in /usr/local/ so it is saved for next startup.
There is no right way or wrong way to do this. Like I posted earlier, it can be display driver dependent, kernel dependent, distribution config dependent, etc.. Just find a way that works and stick with it :)
On Saturday 20 July 2019 03:07:00 David C. Rankin wrote:
On 07/19/2019 03:36 AM, andre_debian@numericable.fr wrote:
I cannot create the file "${USER}-backlight" in /usr/local/share/
"${USER}-backlight" will be a new file that holds the current brightness setting. ${USER} just expands to your username. It was just brace-enclosed to make that apparent. For what it is worth I use the following script (with a second script that is just a wrapper to call the primary script with the -s option for startup) The wrapper script (scrnbrightwiznv_startup.sh) is simply:
[cut]
Hello David,
Ok, so the right line is : /usr/local/share/andre-backlight
Thanks for the file "scrnbrightwiznv.sh".
I make the test asap and will tell you.
Good week-end, Regards,
André
David,
The first method cannot work for me, because the file "/sys/class/backlight/intel_backlight/brightness" cannot be changed, with this default value "6144". (I need 9144).
On Saturday 20 July 2019 03:07:00 David C. Rankin wrote:
"${USER}-backlight" will be a new file that holds the current brightness setting. ${USER} just expands to your username. It was just brace-enclosed to make that apparent. For what it is worth I use the following script (with a second script that is just a wrapper to call the primary script with the -s option for startup) The wrapper script (scrnbrightwiznv_startup.sh) is simply: #!/bin/bash /home/david/scr/adm/scrnbrightwiznv.sh -s In my ~/.kde/Autostart (you would have ~/.trinity/Autostart or ~/.tde/Autostart), I just use the symlink l ~/.kde/Autostart/ scrnbrightwiznv_startup.sh -> /home/david/scr/adm/scrnbrightwiznv_startup.sh The primary script is attached. You will need to change acpi_video0 to intel_backlight. Other than that, it should work for you. You can simply use the wrapper calling it with the -s option at startup in the Autostart folder if tdepowersave handles the changes during the session for you. (however, you will need a way to write the final brightness value to the file in /usr/local/ so it is saved for next startup. There is no right way or wrong way to do this. Like I posted earlier, it can be display driver dependent, kernel dependent, distribution config dependent, etc.. Just find a way that works and stick with it :)
The directory Autostart is in : /home/andre/.trinity/Autostart/
So I put exactly this line in "/home/andre/.trinity/Autostart/" ? : scrnbrightwiznv_startup.sh -> /home/andre/scr/adm/scrnbrightwiznv_startup.sh
Thanks for your help and Regards,
André
On 07/20/2019 08:45 AM, andre_debian@numericable.fr wrote:
The directory Autostart is in : /home/andre/.trinity/Autostart/
So I put exactly this line in "/home/andre/.trinity/Autostart/" ? : scrnbrightwiznv_startup.sh -> /home/andre/scr/adm/scrnbrightwiznv_startup.sh
Thanks for your help and Regards,
André
Yes, that's fine, just make sure your /home/andre/scr/adm/scrnbrightwiznv_startup.sh is executable, e.g.
chmod +x /home/andre/scr/adm/scrnbrightwiznv_startup.sh
You also need to make sure you have sudo access without a password. Generally meaning you add your user to the wheel group, e.g. as root
# gpasswd -a andre wheel
(some distros have dropped wheel group and instead use a 'sudo' group)
Then as root, visudo to edit the sudoers file and set:
## Uncomment to allow members of group wheel to execute any command # %wheel ALL=(ALL) ALL
## Same thing without a password %wheel ALL=(ALL) NOPASSWD: ALL
(generally toward the bottom of the file)
That will allow you to set /sys/class/backlight/intel_backlight/brightness with the call in the script, e.g. with the line
sudo sh -c "echo '"$newbl"' > '"$blfn"'"
On Monday 22 July 2019 09:16:20 David C. Rankin wrote:
On 07/20/2019 08:45 AM, andre_debian@numericable.fr wrote: Yes, that's fine, just make sure your /home/andre/scr/adm/scrnbrightwiznv_startup.sh is executable, e.g. chmod +x /home/andre/scr/adm/scrnbrightwiznv_startup.sh You also need to make sure you have sudo access without a password. Generally meaning you add your user to the wheel group, e.g. as root # gpasswd -a andre wheel (some distros have dropped wheel group and instead use a 'sudo' group) Then as root, visudo to edit the sudoers file and set: ## Uncomment to allow members of group wheel to execute any command # %wheel ALL=(ALL) ALL ## Same thing without a password %wheel ALL=(ALL) NOPASSWD: ALL (generally toward the bottom of the file) That will allow you to set /sys/class/backlight/intel_backlight/brightness with the call in the script, e.g. with the line sudo sh -c "echo '"$newbl"' > '"$blfn"'"
The problem David,
is that in root, I receive forbidden, if I want to change the value in the file : /sys/class/backlight/intel_backlight/brightness
changing = no possible.
The file is 664.
Regards,
André
On 07/23/2019 11:04 AM, andre_debian@numericable.fr wrote:
The problem David,
is that in root, I receive forbidden, if I want to change the value in the file : /sys/class/backlight/intel_backlight/brightness
changing = no possible.
The file is 664.
Regards,
André
That's weird, and that tells me you are not actually running sudo (or you are somehow running the script with UID or EUID 0.
With file permission 664 that is rw_rw_r__ meaning the owner has read/write, group has read/write and world has read. If you have configured sudo (and the sudoers file as discussed) then as root (under sudo) you have write permission and you can change the file. So if you are getting "permission denied", your sudo is failing.
Try this (if your range is 0-99 for brightness):
sudo sh -c "echo '"50"' > '"/sys/class/backlight/intel_backlight/brightness"'
The screen brightness should change to 1/2 brightness. Then change it to 25, it should change to 1/4 brightness, etc...
If that fails, you have a sudo problem. Now su to root and try the same thing. If that fails, then we really have problems. Let me know. I suspect there is an issue with the sudo config. You have to set it up as I showed you. The only wildcard is whether you have a wheel group or whether your distro uses a group called sudo instead. Check and let me know, we will get this sorted.
On 07/24/2019 06:09 PM, David C. Rankin wrote:
On 07/23/2019 11:04 AM, andre_debian@numericable.fr wrote:
The problem David,
is that in root, I receive forbidden, if I want to change the value in the file : /sys/class/backlight/intel_backlight/brightness
changing = no possible.
The file is 664.
Regards,
André
That's weird, and that tells me you are not actually running sudo (or you are somehow running the script with UID or EUID 0.
With file permission 664 that is rw_rw_r__ meaning the owner has read/write, group has read/write and world has read. If you have configured sudo (and the sudoers file as discussed) then as root (under sudo) you have write permission and you can change the file. So if you are getting "permission denied", your sudo is failing.
Try this (if your range is 0-99 for brightness):
sudo sh -c "echo '"50"' > '"/sys/class/backlight/intel_backlight/brightness"'
The screen brightness should change to 1/2 brightness. Then change it to 25, it should change to 1/4 brightness, etc...
If that fails, you have a sudo problem. Now su to root and try the same thing. If that fails, then we really have problems. Let me know. I suspect there is an issue with the sudo config. You have to set it up as I showed you. The only wildcard is whether you have a wheel group or whether your distro uses a group called sudo instead. Check and let me know, we will get this sorted.
Also take a look at:
man systemd-backlight@.service
where systemd can save and restore the current backlight at shutdown on next boot. That may be another alternative for you to restore the last used backlight rather than manually saving and restoring yourself. I haven't tried it, but it looks promising.
On Saturday 20 July 2019 03:07:00 David C. Rankin wrote:
For what it is worth I use the following script (with a second script that is just a wrapper to call the primary script with the -s option for startup) The wrapper script (scrnbrightwiznv_startup.sh) is simply: #!/bin/bash /home/david/scr/adm/scrnbrightwiznv.sh -s ~/.tde/Autostart) I just use the symlink scrnbrightwiznv_startup.sh -> /home/david/scr/adm/scrnbrightwiznv_startup.sh
Hello David,
It's exactly what I did as you wrote above.
"scrnbrightwiznv_startup.sh" only displays the value of the screen brightness, always 6144 (60%).
And the file : "/sys/class/backlight/intel_backlight/brightness" doesn't save the new value (90%) with this method :
Menu => Trinity Configuration Center => Peripherical devices => Hardware Device Manager => Backlight => Intel HD Graphics 520 and I can adjust the brightness from 0 to 100%, The value is not saved if I close the session. The default value = 62%
Now, I see that the majority of the laptop is with a video card "Intel HD Graphics 520/620" (Dell, Lenovo, HP, Compaq...), How the users on Linux with TDE adjust their screen brightness and save the value ?
Regards,
André
Dne út 16. července 2019 andre_debian@numericable.fr napsal(a):
Hello,
ls -al /sys/class//backlight/ intel_backlight -> ../../devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backli ght
ls -al /sys/class/backlight/acpi_video0/ no file
xbacklight is installed.
To adjust the brigtness : Menu => Trinity Configuration Center => Périphériques => Hardware Device Manager => Backlight => Intel HD Graphics 520 and I can adjust the brightness from 0 to 100%, but the value is not keeped if I close the session. The default value = 62%
This is the situation.
Regards,
André
Hi André,
you can install TDE Powersave and then adjust the brightness there.
Cheers
On Friday 19 July 2019 12:12:53 Slávek Banko wrote:
Dne út 16. července 2019 andre_debian@numericable.fr napsal(a):
Hello, ls -al /sys/class//backlight/ intel_backlight ->
../../devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight
ls -al /sys/class/backlight/acpi_video0/ no file xbacklight is installed. To adjust the brightness : Menu => Trinity Configuration Center => Périphériques => Hardware Device Manager => Backlight => Intel HD Graphics 520 and I can adjust the brightness from 0 to 100%, but the value is not keeped if I close the session. The default value = 62%
Hi André, you can install TDE Powersave and then adjust the brightness there. Cheers
Hello Slavek,
It's what I did, "tde-powersave" installed.
Where to adjust the brightness ?
Only this solution : Menu => Trinity Configuration Center =>Peripheral devices => Hardware Device Manager => Backlight => Intel HD Graphics 520 I can adjust from 0 to 100%, but the value is not saved if I close the session or reboot. The default value = 62%.
When the computer pause begins (45min), the brightness becomes 5%, so low that I have to reboot the computer. My video card is Intel HD 520, but not dedicated, works with the processor and the RAM.
Before, I could do that by "left button mouse", Desktop configuration => Display => Energy Control. But, this possiblity has disappeared, only gamma configuration.
With another laptop, dedicated video card, (nvidia or ATI), it works fine.
Thanks, regards,
André
On Friday 19 July 2019 03:44:33 andre_debian@numericable.fr wrote:
On Friday 19 July 2019 12:12:53 Slávek Banko wrote:
Dne út 16. července 2019 andre_debian@numericable.fr napsal(a):
Hello, ls -al /sys/class//backlight/ intel_backlight ->
../../devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backli ght
ls -al /sys/class/backlight/acpi_video0/ no file xbacklight is installed. To adjust the brightness : Menu => Trinity Configuration Center => Périphériques => Hardware Device Manager => Backlight => Intel HD Graphics 520 and I can adjust the brightness from 0 to 100%, but the value is not keeped if I close the session. The default value = 62%
Hi André, you can install TDE Powersave and then adjust the brightness there. Cheers
Hello Slavek,
It's what I did, "tde-powersave" installed.
Where to adjust the brightness ?
Only this solution : Menu => Trinity Configuration Center =>Peripheral devices => Hardware Device Manager => Backlight => Intel HD Graphics 520 I can adjust from 0 to 100%, but the value is not saved if I close the session or reboot. The default value = 62%.
When the computer pause begins (45min), the brightness becomes 5%, so low that I have to reboot the computer. My video card is Intel HD 520, but not dedicated, works with the processor and the RAM.
Before, I could do that by "left button mouse", Desktop configuration => Display => Energy Control. But, this possiblity has disappeared, only gamma configuration.
With another laptop, dedicated video card, (nvidia or ATI), it works fine.
Thanks, regards,
André
In my own system, I have a config file that could be what you're searching for. Look here:
/home/<your_top_secret_superhero_identity>/.kde/share/config/tdepowersaverc
Now, *caveat lector* on this point; I was combing through my system to find my old KDE3 config files, and to convert them to TDE config files. Sometimes they keep the same old folder as before in KDE3; in other cases, I needed to transfer them to the appropriate folder, e.g., into /opt/trinity/share; but have discovered that this is not always a simple equation of KDE3 to TDE.
Sometimes these config files keep the same old folder as in KDE3, sometimes not; then again, sometimes they get changed from plaintext files to xml or kcfg, etc.; yet again, they sometimes disappear completely, or get moved to somewhere that ordinary users will never find.
In any case, I can find no corresponding KDE config file of any sort.
Anyway, tdepowersaverc is a plaintext config file, and (assuming it's still valid) you can probably insert some lines to get it to do what you want.
Bill