On 01/23/2018 09:43 PM, David C. Rankin wrote:
On 1/23/2018 8:02 AM, Foxtrot Mike via arch-general wrote:
I tried googling this error, but didn't find anything helpful.
So I tried using xbacklight instead. It didn't give any positive results either, even when I provided different kernel paramters as discribed in . No matter what I do with acpi and kernel parameters, "/sys/class/backlight/acpi_video0/brightness" doesn't give actual values. Also, 'xbacklight set' has no effect on screen brightness at all.
I also tried adding `Option "RegistryDwords" "EnableBrightnessControl=1"` in "/usr/share/X11/xorg.conf.d/10-nvidia-drm-outputclass.conf". Still keyboard brigthness keys couldn't change the brightness.
Can someone help me get ddcutil working with nvidia proprietary driver?
I doubt I can held get ddcutil working, but the problem is a lack of an nvidia kernel module interface with /sys/class/backlight (which can be frustrating). You do not want to use xbacklight -- which ironically does not control actual backlight (display power), but instead controls pixel darkness (the amount of black/white per-pixel). Reducing backlight does not reduce display power, it just makes the pixels darker giving the impression of reduced brightness. (this is really bad for laptop battery life where reducing the display power is important)
You want xrandr. Query with `xrandr -q` and find your interface and you can then set the desired brightness with something similar to
xrandr --output LVDS-0 --brightness 42
(where LVDS-0 is your monitor connections shown by --query)
Modern desktops generally integrate xrandr control (if not, you can simply implement a short script that allows you to check and set the desired brightness.
There were also several AUR packages (nvidia-bl, and nvidiabl or similar) that provided a /sys/class/backlight kernel module that would would work with most laptops, but I don't think they are maintained any longer. (there was an example script on the X11 wiki some time ago for doing this) That is another option.
I tried using xrandr to adjust brightness, but it doesn't modify brightness on monitor. Then I stumbled upon  to learn that backlight can't be actually controlled with xrandr on LCD/LED monitors:
Multiply the gamma values on the crtc currently attached to the output to specified floating value. Useful for overly bright or overly dim outputs. However, this is a software only modification, if your hardware has support to actually change the brightness, you will probably prefer to use xbacklight.
And as described in the initial question, xbacklight doesn't work with my NVIDIA card despite all the kernel parameters.
However, with ddcutil I was able to set contrast and brightness at monitor hardware level so that even at low brightness levels the screen remained perfectly legible. With xrandr, modifying the brightness distorts the colors of text. The text is readable but not white anymore. I'll see if there's some other solution.