Re: [arch-general] Nvidia backlight control - acpi_video0/brightness changes - display doesn't?

2016-11-20 Thread David C. Rankin
On 11/20/2016 03:56 AM, Ralf Mardorf wrote:
> Are you using the "helper script" because
> 
>   sudo echo $(luminance) > "$dest"/brightness
> 
> doesn't work? If so, then consider to use
> 
>   echo $(luminance) | sudo tee "$dest"/brightness
> 
> to get rid of the "helper script".
> 
> Regards,
> Ralf

Thanks Ralf,

  Yes, tee redirected into /dev/null to suppress the tee output works as does:

  su -c 'command ...'

or

  sudo sh -c 'command ...'

  I noted the use of su -c in the original (the only extra steps there are
tweaking /etc/pam.d/su). I had the helper from manually setting the
brightness, e.g. sudo nvhelper.sh level (and it's a lot easier to explain "use
a helper" than bog down in a discussion of why in 'sudo echo X > file' sudo
only applies to 'echo' :)

  Whatever you like best to insure redirection is done as root. I'm just glad
to have a working backlight with the nvidia driver. Now if I can just convince
myself to stomach plasma/fw5... easier said than done...

  I also think there is probably a way to write a udev rule that does the
monitoring of acpi_video0 and changes nvidia_backlight as well. I just haven't
had time to explore that one. That would probably be the cleanest way of doing 
it.

  This HP laptop has been full of more surprises than I've ever had before in
Linux. My previous 3 laptops have all be Toshibas, and Dell before that. No
problems with any of them. (although I did have to use acpi_video0 for
brightness after the whatever version upgrade to X broke backlight control for
that model a couple of years ago) This laptop still won't boot grub, but
everything else works wonderfully. (the new squished screen at 1600x900 takes
getting used to as I could see more, clearer at 1440x900 on the old one, and
the physical dimensions of the old screen were actually larger than this one)

-- 
David C. Rankin, J.D.,P.E.


Re: [arch-general] Nvidia backlight control - acpi_video0/brightness changes - display doesn't?

2016-11-20 Thread Christian Klaue
Well, this won't work for me. I don't have a NVidia. But I will search
the web if there is a module for my Intel Skylake graphics. Although my
brightness script actually works perfect. The only drawback currently:
a few apps (e.g. chromium) reset the brightness to max upon their
startup.

Thanks anyway!

Christian

On Sun, 2016-11-20 at 03:08 -0600, David C. Rankin wrote:
> On 11/19/2016 03:38 AM, Christian Klaue wrote:
> > I am having exactly the same problem with my HP. I went as far as
> > decompiling the ACPI bios. When I tried to compile it again, it
> > threw a
> > huge amount of errors. So I gave up. I didn't find any solution for
> > my
> > problem. I even tried other distros. I am still kind of convinced
> > the
> > error is in the ACPI module(s) of your UEFI. If you try to blame HP
> > (as
> > many people on their forum did before) they will ask you to test on
> > Windows. Unfortunately there it works. The newest BIOS update
> > doesn't
> > fix the problem for my toy.
> > 
> > I am lucky to have an OLED. Please keep me updated if you find a
> > solution.
> 
> Christian,
> 
>   You may be in luck. I did find a solution and now my backlight
> functions as
> it should using the nvidiabl kernel module (and a small helper script
> that I
> autostart in KDE, but you could just as easily start it in .xinitrc
> for any
> desktop) Basically, you have to use either of the following two
> packages to
> build a kernel module that will work with the proprietary nvidia
> driver:
> 
> nvidia-bl
> https://aur.archlinux.org/packages/nvidia-bl/
> 
> nvidiabl
> https://aur.archlinux.org/packages/nvidiabl/
> 
>   I built them both, but haven't tried nvidia-bl, (even though it was
> easier
> to build and should do the same thing)
> 
>   To build nvidiabl, just follow the notes on its aur page and it
> builds fine.
> nvidia-bl, builds without issue, just download the tarball, unpack
> it, and
> then a makepkg -s is all that is needed.
> 
>   Both provide the kernel module:
> 
> /usr/lib/modules/extramodules-4.8-ARCH/nvidiabl.ko
> 
>   Just build, then 'modprobe nvidiabl', and you will have backlight
> control
> through:
> 
> /sys/class/backlight/nvidia_backlight/brightness
> 
>   The kicker is that nothing talks to nvidia_backlight by default,
> instead all
> the normal backlight controls use:
> 
> /sys/class/backlight/acpi_video0/brightness
> 
>   The way to get your controls to work is to watch the
> acpi_video0/brightness
> values and automatically set nvidia_backlight/brightness any time the
> earlier
> one changes value. This is where the helper script comes into play
> (actually 2
> short scripts -- the second just to ease the sudo redirection issue)
> 
>   The first script just maps values (0-20) from
> acpi_video0/brightness into a
> range of (0-127) for nvidia_backlight/brightness (it calls the second
> script
> as a helper). Just launch the first script in whatever desktop you
> are using,
> and your backlight keys should work. If not, then you just have to
> copy
> whatever value you want for your backlight/brightness to
> nvidia_backlight/brightness, e.g.
> 
>  # echo 90 > /sys/class/backlight/nvidia_backlight/brightness
> 
>   Put both scripts in the same directory. You will need to configure
> sudo
> without a password for this to work when called as your normal user
> (as when
> using the laptop keys). The first is a quick modification of the
> xbacklight
> script. It reads the xbacklight value from acpi_video0 and then does
> a rough
> scale for what the nvidia_backlight value should be. Give it some
> name like
> nvbackligh.sh:
> 
> #!/bin/sh
> 
> path=/sys/class/backlight/acpi_video0
> dest=/sys/class/backlight/nvidia_backlight
> dmax=$(<$dest/max_brightness)
> 
> luminance() {
> read -r level < "$path"/actual_brightness
> factor=$((dmax / max))
> nvbrt=$((level * factor))
> case "$nvbrt" in
> [0-9]   )  printf "%d" $nvbrt;;
> [0-9][0-9]  )  printf "%d" $nvbrt;;
> [1][0-1][0-9] )  printf "%d" $nvbrt;;
> [1][2][0-9] )  printf "127";;
> default )  printf "error: in value conversion\n"
>    exit 1;;
> esac
> }
> 
> read -r max < "$path"/max_brightness
> 
> inotifywait -me modify --format '' "$path"/actual_brightness | while
> read; do
> if [ $UID -eq 0 ]; then
> echo $(luminance) > "$dest"/brightness
> else
> sudo ./nvhelper.sh $(luminance)  # helper script
> fi
> printf "luminance %s\n" "$(luminance)"
> done
> 
>   The second just echos the luminance value into
> nvidia_backlight/brightness
>  which gets around sudo only applying to the echo and not the
> redirection. An
> alternative is calling it with 'su -c' (which you can configure pam
> to allow
> without a password if you are a member of the wheel group and you
> uncomment
> the first two lines in /etc/pam.d/su). The helper script nvhelper.sh
> is:
> 
> #!/bin/sh
> [ $1 -lt 0 -o $1 -gt 127 ] && exit 1  ## check value out of 

Re: [arch-general] Nvidia backlight control - acpi_video0/brightness changes - display doesn't?

2016-11-20 Thread Ralf Mardorf
On Sun, 20 Nov 2016 10:56:16 +0100, Ralf Mardorf wrote:
>On Sun, 20 Nov 2016 03:08:12 -0600, David C. Rankin wrote:
>>if [ $UID -eq 0 ]; then
>>echo $(luminance) > "$dest"/brightness  
>
>Are you using the "helper script" because
>
>  sudo echo $(luminance) > "$dest"/brightness
>
>doesn't work? If so, then consider to use
>
>  echo $(luminance) | sudo tee "$dest"/brightness
>
>to get rid of the "helper script".

JFTRsudo sh -cwould work, too, but IMO wouldn't make sense.


Re: [arch-general] Nvidia backlight control - acpi_video0/brightness changes - display doesn't?

2016-11-20 Thread Ralf Mardorf
On Sun, 20 Nov 2016 03:08:12 -0600, David C. Rankin wrote:
>if [ $UID -eq 0 ]; then
>echo $(luminance) > "$dest"/brightness

Are you using the "helper script" because

  sudo echo $(luminance) > "$dest"/brightness

doesn't work? If so, then consider to use

  echo $(luminance) | sudo tee "$dest"/brightness

to get rid of the "helper script".

Regards,
Ralf


Re: [arch-general] Nvidia backlight control - acpi_video0/brightness changes - display doesn't?

2016-11-20 Thread David C. Rankin
On 11/19/2016 03:38 AM, Christian Klaue wrote:
> I am having exactly the same problem with my HP. I went as far as
> decompiling the ACPI bios. When I tried to compile it again, it threw a
> huge amount of errors. So I gave up. I didn't find any solution for my
> problem. I even tried other distros. I am still kind of convinced the
> error is in the ACPI module(s) of your UEFI. If you try to blame HP (as
> many people on their forum did before) they will ask you to test on
> Windows. Unfortunately there it works. The newest BIOS update doesn't
> fix the problem for my toy.
> 
> I am lucky to have an OLED. Please keep me updated if you find a
> solution.

Christian,

  You may be in luck. I did find a solution and now my backlight functions as
it should using the nvidiabl kernel module (and a small helper script that I
autostart in KDE, but you could just as easily start it in .xinitrc for any
desktop) Basically, you have to use either of the following two packages to
build a kernel module that will work with the proprietary nvidia driver:

nvidia-bl
https://aur.archlinux.org/packages/nvidia-bl/

nvidiabl
https://aur.archlinux.org/packages/nvidiabl/

  I built them both, but haven't tried nvidia-bl, (even though it was easier
to build and should do the same thing)

  To build nvidiabl, just follow the notes on its aur page and it builds fine.
nvidia-bl, builds without issue, just download the tarball, unpack it, and
then a makepkg -s is all that is needed.

  Both provide the kernel module:

/usr/lib/modules/extramodules-4.8-ARCH/nvidiabl.ko

  Just build, then 'modprobe nvidiabl', and you will have backlight control
through:

/sys/class/backlight/nvidia_backlight/brightness

  The kicker is that nothing talks to nvidia_backlight by default, instead all
the normal backlight controls use:

/sys/class/backlight/acpi_video0/brightness

  The way to get your controls to work is to watch the acpi_video0/brightness
values and automatically set nvidia_backlight/brightness any time the earlier
one changes value. This is where the helper script comes into play (actually 2
short scripts -- the second just to ease the sudo redirection issue)

  The first script just maps values (0-20) from acpi_video0/brightness into a
range of (0-127) for nvidia_backlight/brightness (it calls the second script
as a helper). Just launch the first script in whatever desktop you are using,
and your backlight keys should work. If not, then you just have to copy
whatever value you want for your backlight/brightness to
nvidia_backlight/brightness, e.g.

 # echo 90 > /sys/class/backlight/nvidia_backlight/brightness

  Put both scripts in the same directory. You will need to configure sudo
without a password for this to work when called as your normal user (as when
using the laptop keys). The first is a quick modification of the xbacklight
script. It reads the xbacklight value from acpi_video0 and then does a rough
scale for what the nvidia_backlight value should be. Give it some name like
nvbackligh.sh:

#!/bin/sh

path=/sys/class/backlight/acpi_video0
dest=/sys/class/backlight/nvidia_backlight
dmax=$(<$dest/max_brightness)

luminance() {
read -r level < "$path"/actual_brightness
factor=$((dmax / max))
nvbrt=$((level * factor))
case "$nvbrt" in
[0-9]   )  printf "%d" $nvbrt;;
[0-9][0-9]  )  printf "%d" $nvbrt;;
[1][0-1][0-9] )  printf "%d" $nvbrt;;
[1][2][0-9] )  printf "127";;
default )  printf "error: in value conversion\n"
   exit 1;;
esac
}

read -r max < "$path"/max_brightness

inotifywait -me modify --format '' "$path"/actual_brightness | while read; do
if [ $UID -eq 0 ]; then
echo $(luminance) > "$dest"/brightness
else
sudo ./nvhelper.sh $(luminance)  # helper script
fi
printf "luminance %s\n" "$(luminance)"
done

  The second just echos the luminance value into nvidia_backlight/brightness
 which gets around sudo only applying to the echo and not the redirection. An
alternative is calling it with 'su -c' (which you can configure pam to allow
without a password if you are a member of the wheel group and you uncomment
the first two lines in /etc/pam.d/su). The helper script nvhelper.sh is:

#!/bin/sh
[ $1 -lt 0 -o $1 -gt 127 ] && exit 1  ## check value out of range
echo $1 > /sys/class/backlight/nvidia_backlight/brightness

  If you try the aur nvidia-bl package and it works. Let me know, it is a
simpler package to build. I'll try and get time to try it over the next week
or so.

  So now, after a couple of days relearning xrandr, backlight, the sysfs and
what goes with what in the nvidia driver, that xrandr is a software pixel
darkening scheme, we came to understand the kernel model approach is the
correct approach for backlight control here...and it is working perfectly.

(Now, if I could just get this damn HP laptop to boot grub without having to
boot from USB and then boot grub on the hard drive, I'd be in great 

Re: [arch-general] Nvidia backlight control - acpi_video0/brightness changes - display doesn't?

2016-11-19 Thread Christian Klaue
Hi,


your xrandr --brightness solution only works on oled screens. Those
don't have a backlight. From a quick search it looks like you have a
LCD, right?


I am having exactly the same problem with my HP. I went as far as
decompiling the ACPI bios. When I tried to compile it again, it threw a
huge amount of errors. So I gave up. I didn't find any solution for my
problem. I even tried other distros. I am still kind of convinced the
error is in the ACPI module(s) of your UEFI. If you try to blame HP (as
many people on their forum did before) they will ask you to test on
Windows. Unfortunately there it works. The newest BIOS update doesn't
fix the problem for my toy.

I am lucky to have an OLED. Please keep me updated if you find a
solution.

regards,

Christian

On Sat, 2016-11-19 at 03:09 -0600, David C. Rankin wrote:
> On 11/19/2016 02:35 AM, Patrick Burroughs (Celti) via arch-general
> wrote:
> > acpi_backlight=vendor is the default, acpi_backlight=none is
> > invalid.
> > The option you are looking for is acpi_backlight=video, which takes
> > the
> > backlight control away from the vendor driver and hands it back
> > over to
> > the standard ACPI backlight driver. This will generally solve the
> > issue
> > you are having.
> > 
> > ~Celti
> 
> Damn,
> 
>   And it worked so well that way :(  Thank you for identifying the
> brightness/backlight issue. The Backlight wiki is where I first got
> the
> acpi_backlight=none suggestion, see:
> 
> https://wiki.archlinux.org/index.php/Backlight#Kernel_command-line_op
> tions
> 
>   I've tried the acpi_backlight=video, and still no-joy (at least I
> still have
> the acpi_video0 sysfs interface with that setting). The nice pop-up
> still
> appears and shows the brightness adjustment, but the screen never
> changes.
> (same symptoms as before)
> 
>   How is adjusting xrandr --brightness bad compared to adjusting
> /sys/class/backlight/acpi_video0/brightness?? I understand setting
> xrandr
> --brightness greater than 1.0 will draw additional power, etc.., but
> how is
> setting it between 0.0 and 1.0 different than doing it with acpi? I'm
> just
> trying to get it sorted out in my mind to understand the difference
> between
> setting:
> 
>   /sys/class/backlight/acpi_video0/brightness
> 
> and
> 
>   xrandr --output LVDS-0 --brightness $foo
> 
>   I'll go search to see if I can find the difference, but if you have
> a
> favorite link, I'd appreciate the help.
> 


Re: [arch-general] Nvidia backlight control - acpi_video0/brightness changes - display doesn't?

2016-11-19 Thread David C. Rankin
On 11/19/2016 03:09 AM, David C. Rankin wrote:
>   I'll go search to see if I can find the difference, but if you have a
> favorite link, I'd appreciate the help.

Got it. xrandr is software rendered darkening of pixel - no hardware control
involved. Thanks.

-- 
David C. Rankin, J.D.,P.E.



signature.asc
Description: OpenPGP digital signature


Re: [arch-general] Nvidia backlight control - acpi_video0/brightness changes - display doesn't?

2016-11-19 Thread David C. Rankin
On 11/19/2016 02:35 AM, Patrick Burroughs (Celti) via arch-general wrote:
> acpi_backlight=vendor is the default, acpi_backlight=none is invalid.
> The option you are looking for is acpi_backlight=video, which takes the
> backlight control away from the vendor driver and hands it back over to
> the standard ACPI backlight driver. This will generally solve the issue
> you are having.
> 
> ~Celti

Damn,

  And it worked so well that way :(  Thank you for identifying the
brightness/backlight issue. The Backlight wiki is where I first got the
acpi_backlight=none suggestion, see:

https://wiki.archlinux.org/index.php/Backlight#Kernel_command-line_options

  I've tried the acpi_backlight=video, and still no-joy (at least I still have
the acpi_video0 sysfs interface with that setting). The nice pop-up still
appears and shows the brightness adjustment, but the screen never changes.
(same symptoms as before)

  How is adjusting xrandr --brightness bad compared to adjusting
/sys/class/backlight/acpi_video0/brightness?? I understand setting xrandr
--brightness greater than 1.0 will draw additional power, etc.., but how is
setting it between 0.0 and 1.0 different than doing it with acpi? I'm just
trying to get it sorted out in my mind to understand the difference between
setting:

  /sys/class/backlight/acpi_video0/brightness

and

  xrandr --output LVDS-0 --brightness $foo

  I'll go search to see if I can find the difference, but if you have a
favorite link, I'd appreciate the help.

-- 
David C. Rankin, J.D.,P.E.



signature.asc
Description: OpenPGP digital signature


Re: [arch-general] Nvidia backlight control - acpi_video0/brightness changes - display doesn't?

2016-11-19 Thread Patrick Burroughs (Celti) via arch-general
On Sat, 19 Nov 2016 02:00:11 -0600
"David C. Rankin"  wrote:
> [snip a whole bunch of maundering]

xrandr does not adjust the backlight. It adjusts the brightness, which
while it may have the same visible effect may have negative effects on
battery life and component wear compared to proper backlight adjustment.

acpi_backlight=vendor is the default, acpi_backlight=none is invalid.
The option you are looking for is acpi_backlight=video, which takes the
backlight control away from the vendor driver and hands it back over to
the standard ACPI backlight driver. This will generally solve the issue
you are having.

~Celti


pgpE0tfBH1tNz.pgp
Description: OpenPGP digital signature


Re: [arch-general] Nvidia backlight control - acpi_video0/brightness changes - display doesn't?

2016-11-19 Thread David C. Rankin
On 11/18/2016 11:17 PM, David C. Rankin wrote:
> On 11/18/2016 11:02 PM, David C. Rankin wrote:
>> I've got to get something figured out. This laptop will absolutely blind you
>> when you open a browser, or anything with a white background. I have the
>> backlight set at 40% in win10 and that works well. Here it looks like it is 
>> on
>> MAX continually. I will keep at it. If anyone has any other idea, let me 
>> know.
>> Thanks.
> 
> I don't believe this! I have I can effect the brightness with xrandr, but the
> output name is 'LVDS-0' instead of 'LVDS' (as it is on my other laptops). I
> don't know if this could be the whole problem with the normal backlight
> controls not working -- anyone have any idea? I'll just modify the xbacklight
> script to call xrandr instead of xbacklight and pass it fractional values
> between 0.5 and 1.0. Strange indeed.
> 

Here was the ultimate fix for this laptop. Now the brightness adjusts for each
press of the up/down brightness keys. It is a variation on the script for
xbacklight. It simply transforms the acpi_video0 value into a form that is
passed to xrandr. (I would add this to the wiki, but all that I add, is
seemingly later removed -- so if it is something that would be helpful in the
Backlight wiki, I'll let the wiki master add it)

#!/bin/sh

path=/sys/class/backlight/acpi_video0

luminance() {
read -r level < "$path"/actual_brightness
factor=$((100 / max))
brt=$((level * factor))
case "$brt" in
[0-9]   )  printf "0.%02d" $brt;;
[0-9][0-9]  )  printf "0.%02d" $brt;;
100 )  printf "1.0";;
esac
}

read -r max < "$path"/max_brightness

inotifywait -me modify --format '' "$path"/actual_brightness | while read; do
xrandr --output LVDS-0 --brightness $(luminance)
done


-- 
David C. Rankin, J.D.,P.E.


Re: [arch-general] Nvidia backlight control - acpi_video0/brightness changes - display doesn't?

2016-11-18 Thread David C. Rankin
On 11/18/2016 11:02 PM, David C. Rankin wrote:
> I've got to get something figured out. This laptop will absolutely blind you
> when you open a browser, or anything with a white background. I have the
> backlight set at 40% in win10 and that works well. Here it looks like it is on
> MAX continually. I will keep at it. If anyone has any other idea, let me know.
> Thanks.

I don't believe this! I have I can effect the brightness with xrandr, but the
output name is 'LVDS-0' instead of 'LVDS' (as it is on my other laptops). I
don't know if this could be the whole problem with the normal backlight
controls not working -- anyone have any idea? I'll just modify the xbacklight
script to call xrandr instead of xbacklight and pass it fractional values
between 0.5 and 1.0. Strange indeed.

-- 
David C. Rankin, J.D.,P.E.


Re: [arch-general] Nvidia backlight control - acpi_video0/brightness changes - display doesn't?

2016-11-18 Thread David C. Rankin
On 11/18/2016 03:56 AM, Warp wrote:
> Do you use any special kernel boot parameters?
> 
> Using "acpi_backlight=vendor" helped me in a similar situation, though it
> was about another option interfering with backlight control.
> 
> Sylvain

Thanks Sylvain,

  I've tried with both "acpi_backlight=vendor" and "acpi_backlight=none", has
no effect on backlight (except to remove the sysfs acpi defaults). I've also
tried with xbacklight (and corrected the divide by zero in the script
recommended on the Backlight wiki page)

https://wiki.archlinux.org/index.php/Backlight#sysfs_modified_but_no_brightness_change

  xbacklight -get  (reports nothing)

So I really can't expect the -set option to set anything, frustrating... When
I use the backlight keys, the 'brightness' and 'actual_brightness' values go
up/down as it should AND the little screen indicator showing the level pops up
and shows the current and correct level, but the display brightness never 
changes.

I've got to get something figured out. This laptop will absolutely blind you
when you open a browser, or anything with a white background. I have the
backlight set at 40% in win10 and that works well. Here it looks like it is on
MAX continually. I will keep at it. If anyone has any other idea, let me know.
Thanks.

-- 
David C. Rankin, J.D.,P.E.


Re: [arch-general] Nvidia backlight control - acpi_video0/brightness changes - display doesn't?

2016-11-18 Thread Warp


On November 18, 2016 6:42:40 AM GMT+01:00, "David C. Rankin" 
 wrote:
>On 11/17/2016 04:31 PM, David C. Rankin wrote:
>> All,
>> 
>>   Laptop: HP 8760w, Quadro 3000M, nvidia-340xx packages.
>> 
>>   The driver works perfectly (no errors in Xorg.0.log), but I have no
>way to
>> control the screen brightness. I've followed the suggestions in:
>> 
>> https://wiki.archlinux.org/index.php/NVIDIA/Tips_and_tricks
>> 
>>   but I still have no backlight control. Using the laptop function
>keys, the
>> values in /sys/class/backlight/acpi_video0/brightness are properly
>set, e.g.
>> 
>> $ cat /sys/class/backlight/acpi_video0/brightness
>> 8
>> 
>> (now tap the [func][F9], brightness lower, twice)
>> 
>> $ cat /sys/class/backlight/acpi_video0/brightness
>> 6
>> 
>> (actual_brightness value tracks brightness)
>> 
>> $ cat /sys/class/backlight/acpi_video0/max_brightness
>> 20
>> 
>>   This works with OR without /etc/X11/xorg.conf.d/20-nvidia.conf:
>> 
>> Option "RegistryDwords" "EnableBrightnessControl=1"
>> 
>>   Does anyone have any suggestions on anything else to try before I
>start
>> loading the aur nvidia-bl or nvidiabl packages? I don't mind adding
>more
>> software, but if there are a few more tweaks to try before going that
>route, I
>> would like to try them first. Anybody get backlight working with a
>similar
>> model laptop?
>> 
>
>Let me add to this, that powerdevil is seeing the screen brightness
>changes
>and Udev is evidently applying them correctly. For example, pressing
>the
>function key to raise/lower brightness seems to generate the correct
>log entries:
>
>Nov 17 23:36:37 seidr org_kde_powerdevil[710]: powerdevil: Screen
>brightness
>value:  6
>Nov 17 23:36:37 seidr org_kde_powerdevil[710]: powerdevil: Screen
>brightness
>value max:  20
>Nov 17 23:36:37 seidr dbus[334]: [system] Activating service
>name='org.kde.powerdevil.backlighthelper' (using servicehelper)
>Nov 17 23:36:37 seidr org_kde_powerdevil[710]: powerdevil: set screen
>brightness value:  7
>Nov 17 23:36:37 seidr org_kde_powerdevil[710]: powerdevil: Screen
>brightness
>value max:  20
>Nov 17 23:36:37 seidr dbus[334]: [system] Successfully activated
>service
>'org.kde.powerdevil.backlighthelper'
>Nov 17 23:36:37 seidr org_kde_powerdevil[710]: powerdevil: Udev device
>changed
>"/sys/devices/pci:00/:00:01.0/:01:00.0/backlight/acpi_video0"
>"/sys/devices/pci:00/:00:01.0/:01:00.0/backlight/acpi_video0"
>
>  And, as noted above, the values in
>/sys/class/backlight/acpi_video0/brightness are changing as they
>should.
>
>I'll give both the aur packages a try (I have both built -- but the
>nvidiabl
>package is currently disowwned and needs a maintainer if anyone is
>interested)

Do you use any special kernel boot parameters? 

Using "acpi_backlight=vendor" helped me in a similar situation, though it was 
about another option interfering with backlight control.

Sylvain


Re: [arch-general] Nvidia backlight control - acpi_video0/brightness changes - display doesn't?

2016-11-17 Thread David C. Rankin
On 11/17/2016 04:31 PM, David C. Rankin wrote:
> All,
> 
>   Laptop: HP 8760w, Quadro 3000M, nvidia-340xx packages.
> 
>   The driver works perfectly (no errors in Xorg.0.log), but I have no way to
> control the screen brightness. I've followed the suggestions in:
> 
> https://wiki.archlinux.org/index.php/NVIDIA/Tips_and_tricks
> 
>   but I still have no backlight control. Using the laptop function keys, the
> values in /sys/class/backlight/acpi_video0/brightness are properly set, e.g.
> 
> $ cat /sys/class/backlight/acpi_video0/brightness
> 8
> 
> (now tap the [func][F9], brightness lower, twice)
> 
> $ cat /sys/class/backlight/acpi_video0/brightness
> 6
> 
> (actual_brightness value tracks brightness)
> 
> $ cat /sys/class/backlight/acpi_video0/max_brightness
> 20
> 
>   This works with OR without /etc/X11/xorg.conf.d/20-nvidia.conf:
> 
> Option "RegistryDwords" "EnableBrightnessControl=1"
> 
>   Does anyone have any suggestions on anything else to try before I start
> loading the aur nvidia-bl or nvidiabl packages? I don't mind adding more
> software, but if there are a few more tweaks to try before going that route, I
> would like to try them first. Anybody get backlight working with a similar
> model laptop?
> 

  Let me add to this, that powerdevil is seeing the screen brightness changes
and Udev is evidently applying them correctly. For example, pressing the
function key to raise/lower brightness seems to generate the correct log 
entries:

Nov 17 23:36:37 seidr org_kde_powerdevil[710]: powerdevil: Screen brightness
value:  6
Nov 17 23:36:37 seidr org_kde_powerdevil[710]: powerdevil: Screen brightness
value max:  20
Nov 17 23:36:37 seidr dbus[334]: [system] Activating service
name='org.kde.powerdevil.backlighthelper' (using servicehelper)
Nov 17 23:36:37 seidr org_kde_powerdevil[710]: powerdevil: set screen
brightness value:  7
Nov 17 23:36:37 seidr org_kde_powerdevil[710]: powerdevil: Screen brightness
value max:  20
Nov 17 23:36:37 seidr dbus[334]: [system] Successfully activated service
'org.kde.powerdevil.backlighthelper'
Nov 17 23:36:37 seidr org_kde_powerdevil[710]: powerdevil: Udev device changed
"/sys/devices/pci:00/:00:01.0/:01:00.0/backlight/acpi_video0"
"/sys/devices/pci:00/:00:01.0/:01:00.0/backlight/acpi_video0"

  And, as noted above, the values in
/sys/class/backlight/acpi_video0/brightness are changing as they should.

  I'll give both the aur packages a try (I have both built -- but the nvidiabl
package is currently disowwned and needs a maintainer if anyone is interested)

-- 
David C. Rankin, J.D.,P.E.


[arch-general] Nvidia backlight control - acpi_video0/brightness changes - display doesn't?

2016-11-17 Thread David C. Rankin
All,

  Laptop: HP 8760w, Quadro 3000M, nvidia-340xx packages.

  The driver works perfectly (no errors in Xorg.0.log), but I have no way to
control the screen brightness. I've followed the suggestions in:

https://wiki.archlinux.org/index.php/NVIDIA/Tips_and_tricks

  but I still have no backlight control. Using the laptop function keys, the
values in /sys/class/backlight/acpi_video0/brightness are properly set, e.g.

$ cat /sys/class/backlight/acpi_video0/brightness
8

(now tap the [func][F9], brightness lower, twice)

$ cat /sys/class/backlight/acpi_video0/brightness
6

(actual_brightness value tracks brightness)

$ cat /sys/class/backlight/acpi_video0/max_brightness
20

  This works with OR without /etc/X11/xorg.conf.d/20-nvidia.conf:

Option "RegistryDwords" "EnableBrightnessControl=1"

  Does anyone have any suggestions on anything else to try before I start
loading the aur nvidia-bl or nvidiabl packages? I don't mind adding more
software, but if there are a few more tweaks to try before going that route, I
would like to try them first. Anybody get backlight working with a similar
model laptop?

-- 
David C. Rankin, J.D.,P.E.