Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nvidia proprietary driver incompatible with ddcutil 1.3.0 #282

Closed
rockowitz opened this issue Sep 27, 2022 · 1 comment
Closed

nvidia proprietary driver incompatible with ddcutil 1.3.0 #282

rockowitz opened this issue Sep 27, 2022 · 1 comment

Comments

@rockowitz
Copy link
Owner

rockowitz commented Sep 27, 2022

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 rockowitz added the nvidia proprietary proprietary Nvidia driver label Nov 26, 2022
@rockowitz
Copy link
Owner Author

Fixed in release 1.4.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant