Our company uses NVidia cards in an embedded system and has a requirement to detect when someone unplugs a screen. To do this we continuously read the I2C ports exported by the driver to the Linux kernel, as documented in http://us.download.nvidia.com/XFree86/Linux-x86/319.32/README/i2c.html , using code like this:
char buff; int r; ioctl(fd, I2C_SLAVE, 0x50); r = read(fd, buff, 1); return r == 1; //successful
fd in this case is e.g. /dev/i2c-0, /dev/i2c-1, as created by the driver when X windows starts. If a read does not get a byte we know the screen is unplugged.
This has been working for years but doesn’t work on our latest hardware configuration which is a single GT630 driving three screens: the DVI output drives one screen, and the DP output drives screens 2 and 3 via an MST hub.
Screens connected to the DVI output can always be read.
Screens connected directly to the DP output (including via a DP->DVI converter) can be read.
Screens connected to the DP output via an MST hub cannot be read.
We know the EDID data is getting through because in all situations, X windows correctly configures the screens (and we can see the screens’ correct EDID data in the X log). The problem is that if we try to read the EDID via the i2c ports of screens that are attached via the hub, we get read errors.
Edit 27/11: Now adding nvidia-bug-report.StandardPCUbuntu1204LTS.log.gz. This is the same fault but reproduced on a standard PC (Dell OptiPlex 755) running a common Linux distro (Ubuntu 12.04LTS 32bit). Once again all 3 screens were configured by X windows but we can’t read the i2c for the screens connected via MST hub.
Edit 29/11: Add link to http://us.download.nvidia.com/XFree86/Linux-x86/319.32/README/i2c.html.
[This file was removed because it was flagged as potentially malicious] (45.9 KB)
nvidia-bug-report.StandardPCUbuntu1204LTS.log.gz (142 KB)