Closed marsarCV closed 3 years ago
What is the state of a projector which is connected but is not displaying anything? does it still show up as a connected display? does it have signal information? can you get the EDID information in this state? Does it answer to I2C requests?
https://github.com/falahati/NvAPIWrapper/blob/master/NvAPISample/I2CSample.cs
You can ask for EDID via I2C messages. Here is a sample. Since you can send these to specific outputs, you don't need to have the display as part of the active display path and therefore it should work in Mosaic mode too. I am just proposing this with the idea that a turned-off projector can not answer to DDC/DI requests.
Thanks for the response. I didn't know what EDID was, so I looked into it and I am trying to figure out how to query it through I2C from the sample you referenced. Meanwhile this is the information my current code displays. I have a monitor and a projector attached to my machine. Information displayed is same irrespective of whether projector is turned off or being used as extended display.
(If useful, I am currently also using TCP Client to control the projector to turn on, turn off, ask for brightness etc. I have to keep the signal active, as I would like to programmatically turn them on, change their settings and turn them off if not wanted anymore. But if they turn off by themselves, I need to detect this change)
How are the EDIDSlaveAddress and the GPUOutput to be send to the I2CReadEDID function read?
in your sample data, Output
is the GPUOutput of the display that you can use with I2C and other commands (DisplayDevice.Output
). in fact, I think we have the EDID function embedded into the library without the need to handle DDC/CI directly. PhysicalGPU.ReadEDIDData()
method can be used to read EDID, but based on the data you have provided, I supposed it should work even if the device is turned off.
If useful, I am currently also using TCP Client to control the projector to turn on, turn off, ask for brightness, etc. I have to keep the signal active, as I would like to programmatically turn them on, change their settings and turn them off if not wanted anymore. But if they turn off by themselves, I need to detect this change
So with your TCP connection, you can turn them on or off, but if they turn off by other means, you can't access them anymore? well, why not just use this fact to figure out which one is off then? If not, cant you query their state via the TCP connection you have?
Otherwise, the other thing I can think of if you have found no way to detect a turned-off projector via the code is to get the DDC/CI commands supported by the projector and communicate with it via I2C to query configs or modify it. For example, you should be able to set brightness and contrast this way and if supported by the device you might even be able to turn them on or off without using any TCP client at all. it depends on the device and supported commands tho. For example, some devices support the 0xe1
or 0xd1
or 0xd6
register that is responsible for it being on or off.
These are the valid values for the 0xd1
or 0xd6
register address:
https://cgit.freedesktop.org/~aplattner/nvidia-settings/tree/src/libXNVCtrl/NVCtrl.h?id=b27db3d10d58b821e87fbe3f46166e02dc589855#n2468
And this is a great read to know more about DDC/CI commands: https://milek7.pl/ddcbacklight/mccs.pdf
These all depend on functions supported by the device tho.
EDIDSlaveAddress
is a special constant that is used for getting EDID info from a display.
So with your TCP connection, you can turn them on or off, but if they turn off by other means, you can't access them anymore? well, why not just use this fact to figure out which one is off then? If not, cant you query their state via the TCP connection you have?
I have kept the LAN signal to always active, so I can turn it on or off whenever needed without the remote. I am worried that it can happen that the lamp of the projector fails and internally the projector knows that it's off but would still communicate normally over TCP accepting my instructions.
Otherwise, the other thing I can think of if you have found no way to detect a turned-off projector via the code is to get the DDC/CI commands supported by the projector and communicate with it via I2C to query configs or modify it. For example, you should be able to set brightness and contrast this way and if supported by the device you might even be able to turn them on or off without using any TCP client at all. it depends on the device and supported commands tho. For example, some devices support the 0xe1 or 0xd1 or 0xd6 register that is responsible for it being on or off.
I haven't tried the DDC/CI commands before. I will work on it today and update you if I can know communicate through these commands with the projector.
I actually ended up using TCP signals to determine if the projector is active. If it is on, it will return the commands for brightness value with an integer. If it is turned off, it will return with 'F' status.
Hi, For my application, I have to differentiate between all projectors that are connected to the system. Some of the projectors are turned off but are still connected and they show up in the device manager settings too as well as in NVAPI's All displays. I wanted to know if it would be possible to somehow distinguish which projectors are just connected and not displaying anything.
(Application goal: In mosaic mode, I would want to know if any of the projectors stops displaying for some reason)
Thanks, Sarvesh