ddcutil not working with nvidia card

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

ddcutil not working with nvidia card

arch general mailing list-2
Hi all,

With my AMD card, I was able to set my monitor's (ViewSonic VA2249, connected via DVI) brightness and contrast from command line using:

ddcutil --display 1 setvcp 12 20

Later on, I swapped AMD card with an NVIDIA one (using nvidia 387.34-20). I tried using ddcutil with this new card as well, but I got this error:

~$ sudo ddcutil detect
Failure getting EDID for /dev/i2c-5: status code=DDCRC_EDID(-3016): invalid EDID
No displays found
~$

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 [1]. 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?

Regards.

[1] https://wiki.archlinux.org/index.php/Backlight#Kernel_command-line_options
Reply | Threaded
Open this post in threaded view
|

Re: ddcutil not working with nvidia card

cruz.keller
I will be out of the office from January until March.
If you need immediate assistance please contact the office.

Kind Regards,
Reply | Threaded
Open this post in threaded view
|

Re: ddcutil not working with nvidia card

Christian Klaue
In reply to this post by arch general mailing list-2
On Tue, 2018-01-23 at 14:02 +0000, Foxtrot Mike via arch-general wrote:

> Hi all,
>
> With my AMD card, I was able to set my monitor's (ViewSonic VA2249,
> connected via DVI) brightness and contrast from command line using:
>
> ddcutil --display 1 setvcp 12 20
>
> Later on, I swapped AMD card with an NVIDIA one (using nvidia 387.34-
> 20). I tried using ddcutil with this new card as well, but I got this
> error:
>
> ~$ sudo ddcutil detect
> Failure getting EDID for /dev/i2c-5: status code=DDCRC_EDID(-3016):
> invalid EDID
> No displays found
> ~$
>
> 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 [1]. 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?
>
> Regards.
>
> [1] https://wiki.archlinux.org/index.php/Backlight#Kernel_command-lin
> e_options

Never used ddcutil. Have a look at xrandr --brightness. Works perfectly
for me on my OLED without backlight functionality. The following
example gives u 30% brightness:
        xrandr --output DVI-0 --brightness 0.3

I think xrandr works on Wayland, although I cant currently test it. It
works on my NVidia / LCD setup. Although on this setup it makes
less sense: the actual backlight stays at 100%, just the colors are adjusted.
On an OLED without backlight the solution works 100% smooth. Check the
wiki pages on HP x360 laptop [1]. There is also a script available linking /sys/class/backlight/intel_backlight to xrandr brightness in case you have brightness hardware keys.

regards,

ente

[1] https://wiki.archlinux.org/index.php/HP_Spectre_x360_13-4231ng
Reply | Threaded
Open this post in threaded view
|

Re: ddcutil not working with nvidia card

David C. Rankin
In reply to this post by arch general mailing list-2
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 [1]. 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.

--
David C. Rankin, J.D.,P.E.
Reply | Threaded
Open this post in threaded view
|

Re: ddcutil not working with nvidia card

David C. Rankin
On 01/23/2018 10:43 AM, David C. Rankin wrote:
> You want xrandr. Query with `xrandr -q` and find your interface and you
> can then set the desired brightness with something similar to

note: rather than xrandr -q, you want 'xrandr --verbose' to query all xrandr
settings and connections.

--
David C. Rankin, J.D.,P.E.
Reply | Threaded
Open this post in threaded view
|

Re: ddcutil not working with nvidia card

arch general mailing list-2
In reply to this post by arch general mailing list-2

 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 [1]. 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 [1] to learn that backlight can't be actually controlled with xrandr on LCD/LED monitors:

--brightness brightness

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.

Regards.

[1] https://askubuntu.com/questions/62249/how-do-you-change-brightness-color-and-sharpness-from-command-line
Reply | Threaded
Open this post in threaded view
|

Re: ddcutil not working with nvidia card

cruz.keller
In reply to this post by arch general mailing list-2
Hello,

Thank you for your mail. I will answer as fast as possible.