Git Product home page Git Product logo

Comments (8)

falahati avatar falahati commented on May 27, 2024

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?

from nvapiwrapper.

falahati avatar falahati commented on May 27, 2024

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.

from nvapiwrapper.

marsarCV avatar marsarCV commented on May 27, 2024

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)
In-active projector

from nvapiwrapper.

marsarCV avatar marsarCV commented on May 27, 2024

How are the EDIDSlaveAddress and the GPUOutput to be send to the I2CReadEDID function read?

from nvapiwrapper.

falahati avatar falahati commented on May 27, 2024

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.

from nvapiwrapper.

falahati avatar falahati commented on May 27, 2024

EDIDSlaveAddress is a special constant that is used for getting EDID info from a display.

from nvapiwrapper.

marsarCV avatar marsarCV commented on May 27, 2024

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.

from nvapiwrapper.

marsarCV avatar marsarCV commented on May 27, 2024

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.

from nvapiwrapper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.