scottaxcell / winddcutil

Windows implementation of the ddcutil Linux program for querying and changing monitor settings, such as brightness and color levels.
https://github.com/scottaxcell/winddcutil
MIT License
168 stars 21 forks source link

LG monitor support #7

Open fiddyschmitt opened 1 year ago

fiddyschmitt commented 1 year ago

Hi Scott,

Do you know if in Windows we can set the I2C source address (to support LG monitors?)

https://github.com/rockowitz/ddcutil/issues/100#issuecomment-1628631411

Thanks, Fidel

Prototyped commented 1 year ago

To clarify, newer LG monitors cannot switch input source using standard VCP/MCCS commands. Instead they support it as "display dependent devices" (page 14), in this case a proprietary servicing/factory interface. ddcutil v2.0.0-dev branch now supports a hack to be able to send commands with a different I2C source address, and is able to send these display dependent device commands to effect an input source switch on these monitors.

Display dependent devices were things like display-attached keyboards and mice before the widespread advent of USB peripherals that basically disappeared as USB became popular. It is strange that LG chose to use this for their servicing interface.

https://github.com/rockowitz/ddcutil/issues/100#issuecomment-1435477786

Given winddcutil basically uses the win32 Monitor Configuration API (which is strictly limited to DDC/CI), is there scope to be able to send these non-DDC/CI I2C commands to the monitor? (ddcutil is able to do this because Linux exposes an I2C device node for DDC, a much lower-level interface, with which userspace is able to interact directly.)

Looks like with WDDM (the current display driver model introduced with Windows Vista) it is possible to send I/O request packets (IRPs) to the video miniport driver including DDC I2C commands, but it is up to the video miniport driver as to whether it will pass those commands through if they are not DDC/CI commands.

fiddyschmitt commented 1 year ago

Interesting!

yeahman45 commented 1 year ago

I have LG monitor and would be very interested porting https://github.com/rockowitz/ddcutil/issues/100#issuecomment-1628631411 to winddcutil

drzony commented 1 year ago

NVAPI code for using the side channel: https://gist.github.com/drzony/1744b4f72dcd4fde309a125445c474a1