ddcutil icon indicating copy to clipboard operation
ddcutil copied to clipboard

nvidia proprietary driver incompatible with ddcutil 1.3.0

Open rockowitz opened this issue 3 years ago • 0 comments

DDC communication can fail when using the proprietary nvida driver with ddcutil release 1.3.0. Users who encounter this problem can use either previous release 1.2.2 or the current development release on branch 1.3.3-dev. Failure depends on what iftests were in effect when the nvidia driver was built. The nvidia driver rejects calls on a particular code path from driver 12c-dev (which ddcutil uses).

This issue is a continuation of issue #278, where the problem was reported and diagnosed. Thank your @KeyofBlueS for reporting the problem and your extensive and expert help in diagnosing it. My own copy of the nvidia driver is built (by DKMS) in a way that doesn't cause failure.

ddcutil 1.3.0 switched from using i2c-dev's write()/read() interface to its ioctl() interface, as a way to eliminate almost all possibility of EBUSY errors and the need for option --force-slave-address. Unfortunately, when the ioctl() interface is used, the i2c-dev driver calls into the nvidia driver in a different way, and the nvidia driver, if built the "wrong way", rejects the call as having an invalid argument. There's nothing that ddcutil can do in this situation except to avoid using i2c-dev's ioctl() interface.

For more technical details, see my bug reports on developer.nvidia.com and the linux-i2c mailing list.

Branch 1.3.3-dev works around this bug by using either i2c-dev interface. If it starts using the ioctl() interface and the nvidia/i2c-dev failure is detected, it switches to using the less preferable write()/read() interface. New options --use-file-io and --use-ioctl-io force ddcutil to initially use the corresponding i2c-dev interface. If neither is specified, ddcutil starts by using the ioctl() interface.

rockowitz avatar Sep 27 '22 02:09 rockowitz