GN245HQ 3D mode detection
-
- One Eyed Hopeful
- Posts: 20
- Joined: Wed May 25, 2011 6:03 am
GN245HQ 3D mode detection
Hello,
I have an acer GN245HQ LCD screen with integrated 3D Vision emitter. It is connected via the DVI-DL port to my NVidia Card. The screen autodetect 3D Vision content, and the IR emitter is activated. There is a status LED showing that 3D is on and settings are saved for 3D mode.
I want to do some 3D experiments under Linux, but I don't understand how the screen detect that 3d is active. I first thought that 3d was assumed on with 120Hz refresh rate, but I can set my ms windows desktop with 120Hz without activating 3D mode.
Do someone knows which DVI signal is used ? if is it following a standard ? Is there any specification for 3D over DVI-DL (as in HDMI 1.4a).
I tried to search on web but found nothing interesting on the subject.
Best regards
I have an acer GN245HQ LCD screen with integrated 3D Vision emitter. It is connected via the DVI-DL port to my NVidia Card. The screen autodetect 3D Vision content, and the IR emitter is activated. There is a status LED showing that 3D is on and settings are saved for 3D mode.
I want to do some 3D experiments under Linux, but I don't understand how the screen detect that 3d is active. I first thought that 3d was assumed on with 120Hz refresh rate, but I can set my ms windows desktop with 120Hz without activating 3D mode.
Do someone knows which DVI signal is used ? if is it following a standard ? Is there any specification for 3D over DVI-DL (as in HDMI 1.4a).
I tried to search on web but found nothing interesting on the subject.
Best regards
- Fredz
- Petrif-Eyed
- Posts: 2255
- Joined: Sat Jan 09, 2010 2:06 pm
- Location: Perpignan, France
- Contact:
Re: GN245HQ 3D mode detection
I think you should be able to activate the glasses when connected through HDMI by setting one of the following modes (no 1080p at 60 Hz per eye though) :
Mode Resolution
1 1920x2205p 24 Hz
2 1280x1470p 60 Hz
3 1280x1470p 50 Hz
4 1920x1080i 60 Hz
5 1920x1080i 50 Hz
6 1920x1080p 24 Hz
7 1280x720p 60 Hz
8 1280x720p 50 Hz
I don't know what type of signaling they are using for the dual-link DVI connection, maybe you could try with DDC signals as they were used in the old NVIDIA stereo driver for XP. This thread may help you testing that :
- DDC glasses activation for NVIDIA graphics cards under Linux
But then the problem would be to find a way to send this signal synchronized with the vertical retraces, which is quite complicated. You could use SoftGenlock for this as shown in this thread, but the HDMI 1.4 route seems a lot simpler, even if limited to 720p@60Hz or 1080@24Hz per eye :
- Compiling and using Genlock on Linux
Mode Resolution
1 1920x2205p 24 Hz
2 1280x1470p 60 Hz
3 1280x1470p 50 Hz
4 1920x1080i 60 Hz
5 1920x1080i 50 Hz
6 1920x1080p 24 Hz
7 1280x720p 60 Hz
8 1280x720p 50 Hz
I don't know what type of signaling they are using for the dual-link DVI connection, maybe you could try with DDC signals as they were used in the old NVIDIA stereo driver for XP. This thread may help you testing that :
- DDC glasses activation for NVIDIA graphics cards under Linux
But then the problem would be to find a way to send this signal synchronized with the vertical retraces, which is quite complicated. You could use SoftGenlock for this as shown in this thread, but the HDMI 1.4 route seems a lot simpler, even if limited to 720p@60Hz or 1080@24Hz per eye :
- Compiling and using Genlock on Linux
- cybereality
- 3D Angel Eyes (Moderator)
- Posts: 11407
- Joined: Sat Apr 12, 2008 8:18 pm
Re: GN245HQ 3D mode detection
I believe Nvidia is doing this using DDC, specifically DDC/CI (just guessing here). There are programs/APIs that will allow you to access this, like WinI2CDDC: http://www.nicomsoft.com/wini2cddc/" onclick="window.open(this.href);return false; , but that one is pretty expensive.
Here is some spec I found, but I don't know how accurate or useful it will be (you can at least see the stuff to search for):
http://www.boichat.ch/nicolas/ddcci/specs.html" onclick="window.open(this.href);return false;
Here is some spec I found, but I don't know how accurate or useful it will be (you can at least see the stuff to search for):
http://www.boichat.ch/nicolas/ddcci/specs.html" onclick="window.open(this.href);return false;
- Fredz
- Petrif-Eyed
- Posts: 2255
- Joined: Sat Jan 09, 2010 2:06 pm
- Location: Perpignan, France
- Contact:
Re: GN245HQ 3D mode detection
He wants to do some tests in Linux, so I guess WinI2CDDC won't help him much. In nvclock he can find everything that is needed to program DDC at low-level.
But if DDC/CI is used it's going to be more complicated because it would mean bidirectionnal communication and basically a different (and unknown) protocol compared to standard DDC 3D signaling.
But if DDC/CI is used it's going to be more complicated because it would mean bidirectionnal communication and basically a different (and unknown) protocol compared to standard DDC 3D signaling.
-
- One Eyed Hopeful
- Posts: 20
- Joined: Wed May 25, 2011 6:03 am
Re: GN245HQ 3D mode detection
Thank you for informations.
Nvidia driver creates i2c device. I wrote a small peace of code to read EDID and it works correctly.
Now I need to spy under windows. I don't know if it can be done by software or if I need to create DVI Adapter to output the two i2c wires.
Here the edid read code if someone is interested :
I get the same result as one read with nvidia tools.
Nvidia driver creates i2c device. I wrote a small peace of code to read EDID and it works correctly.
Now I need to spy under windows. I don't know if it can be done by software or if I need to create DVI Adapter to output the two i2c wires.
Here the edid read code if someone is interested :
Code: Select all
/** @file edid.c */
#include <errno.h>
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <linux/i2c-dev.h>
int main(int argc, char ** argv)
{
int fd, retval;
unsigned char buf[256];
struct i2c_rdwr_ioctl_data rdwr;
struct i2c_msg msg[2];
if (argc != 2)
{
return 1;
}
if ((fd = open(argv[1], O_RDWR)) < 0)
{
perror(argv[1]);
return 2;
}
buf[0] = 0;
msg[0].addr = 0x50;
msg[0].flags = 0;
msg[0].len = 1;
msg[0].buf = (void*)buf;
msg[1].addr = 0x50;
msg[1].flags = I2C_M_RD;
msg[1].len = sizeof(buf);
msg[1].buf = (void*)buf;
rdwr.msgs = &msg[0];
rdwr.nmsgs = 2;
if ((retval = ioctl(fd, I2C_RDWR, &rdwr) < 0))
{
perror("ioctl");
close(fd);
return retval;
}
fwrite(buf, 1, sizeof(buf), stdout);
close(fd);
return 0;
}
Code: Select all
sudo modprobe i2c-core
sudo modprobe i2c-dev
gcc -o edid -Wall edid.c
sudo ./edid /dev/i2c-0 | hexdump -C
- cybereality
- 3D Angel Eyes (Moderator)
- Posts: 11407
- Joined: Sat Apr 12, 2008 8:18 pm
Re: GN245HQ 3D mode detection
Interesting. Thanks for posting the code.
-
- One Eyed Hopeful
- Posts: 20
- Joined: Wed May 25, 2011 6:03 am
Re: GN245HQ 3D mode detection
I opened a DVI Dual Link cable to attach 2 wires on DDC clk and DDC data. Then I used a FTDI chip in bit bang mode to made some logs.
And as suspected there are some exchanges on this I2C bus during 3D activation.
Attached logs are in the following format : Rel. time in seconds: @Address [R|W]: { DATA };
Next step is to analyze theses logs and reproduce the protocol under Linux.
For Information my recorder is based on pportmon (http://www.boichat.ch/nicolas/ddcci/method.html" onclick="window.open(this.href);return false;) but did not use a parallel port (none available) but a FTDI 4232 mini module used with libftdi in bitbangmode.
Here is the code :
And as suspected there are some exchanges on this I2C bus during 3D activation.
Attached logs are in the following format : Rel. time in seconds: @Address [R|W]: { DATA };
Next step is to analyze theses logs and reproduce the protocol under Linux.
For Information my recorder is based on pportmon (http://www.boichat.ch/nicolas/ddcci/method.html" onclick="window.open(this.href);return false;) but did not use a parallel port (none available) but a FTDI 4232 mini module used with libftdi in bitbangmode.
Here is the code :
You do not have the required permissions to view the files attached to this post.
- cybereality
- 3D Angel Eyes (Moderator)
- Posts: 11407
- Joined: Sat Apr 12, 2008 8:18 pm
Re: GN245HQ 3D mode detection
Thank you for posting this. Hopefully it will prove useful to people in the community.
- Fredz
- Petrif-Eyed
- Posts: 2255
- Joined: Sat Jan 09, 2010 2:06 pm
- Location: Perpignan, France
- Contact:
Re: GN245HQ 3D mode detection
Very nice, maybe you could have a look at this thread about hacking the USB 3D Vision emitter if you didn't already, I suppose the protocol may be similar :
http://www.mtbs3d.com/phpBB/viewtopic.php?f=26&t=3130" onclick="window.open(this.href);return false;
If you succeed in reverse engineering the protocol you could also try to adapt this OpenGL demo to display something in 3D which synchronizes the 3D Vision glasses with the vertical retrace :
http://users.csc.calpoly.edu/~rsomers/cpe572/index.html" onclick="window.open(this.href);return false;
But as is said on this page there is a restriction for the synchronization, it can be effective only if each image takes less than 8,33 ms to render (=1000ms/120Hz). The author says that it might be corrected with multithreading but at the expense of a slower swapping of the buffers.
If this doesn't work out you would need something like SoftGenlock which doesn't have these restrictions, but there is no guarantee it will work with recent GPUs due to the old trick used (legacy VGA registers). In this case you would have to identify the native registers used for hardware page flipping, looking at the Nouveau Open Source driver for NVIDIA GPUs may help. Some more work is also needed to clean the code and make something really useful from it.
Good luck...
http://www.mtbs3d.com/phpBB/viewtopic.php?f=26&t=3130" onclick="window.open(this.href);return false;
If you succeed in reverse engineering the protocol you could also try to adapt this OpenGL demo to display something in 3D which synchronizes the 3D Vision glasses with the vertical retrace :
http://users.csc.calpoly.edu/~rsomers/cpe572/index.html" onclick="window.open(this.href);return false;
But as is said on this page there is a restriction for the synchronization, it can be effective only if each image takes less than 8,33 ms to render (=1000ms/120Hz). The author says that it might be corrected with multithreading but at the expense of a slower swapping of the buffers.
If this doesn't work out you would need something like SoftGenlock which doesn't have these restrictions, but there is no guarantee it will work with recent GPUs due to the old trick used (legacy VGA registers). In this case you would have to identify the native registers used for hardware page flipping, looking at the Nouveau Open Source driver for NVIDIA GPUs may help. Some more work is also needed to clean the code and make something really useful from it.
Good luck...
-
- One Eyed Hopeful
- Posts: 20
- Joined: Wed May 25, 2011 6:03 am
Re: GN245HQ 3D mode detection
It works I can now control the (de)activation of the emitter !
It require first a correct resolution mode, that I can activate for the moment only with nvidia proprietary drivers.
I created a project on google code with the program and xorg sample files.
http://code.google.com/p/a3dcontrol/source/browse/" onclick="window.open(this.href);return false;
Next steps are :
- activate 3D mode with nouveau driver and with a non nvidia graphic card.
- try to render some 3D photo and opengl scenes.
It require first a correct resolution mode, that I can activate for the moment only with nvidia proprietary drivers.
I created a project on google code with the program and xorg sample files.
http://code.google.com/p/a3dcontrol/source/browse/" onclick="window.open(this.href);return false;
Next steps are :
- activate 3D mode with nouveau driver and with a non nvidia graphic card.
- try to render some 3D photo and opengl scenes.
- Fredz
- Petrif-Eyed
- Posts: 2255
- Joined: Sat Jan 09, 2010 2:06 pm
- Location: Perpignan, France
- Contact:
Re: GN245HQ 3D mode detection
Nice job ! Don't hesitate to keep posting about your progress.
- cybereality
- 3D Angel Eyes (Moderator)
- Posts: 11407
- Joined: Sat Apr 12, 2008 8:18 pm
-
- One Eyed Hopeful
- Posts: 20
- Joined: Wed May 25, 2011 6:03 am
Re: GN245HQ 3D mode detection
My repository now contains a pulsar example that works in opengl vsync mode.
It works well with my GTX460.
It works well with my GTX460.
- Fredz
- Petrif-Eyed
- Posts: 2255
- Joined: Sat Jan 09, 2010 2:06 pm
- Location: Perpignan, France
- Contact:
Re: GN245HQ 3D mode detection
Very nice. Did you experience any eye inversion doing the rendering this way or is it ok ?
-
- One Eyed Hopeful
- Posts: 20
- Joined: Wed May 25, 2011 6:03 am
Re: GN245HQ 3D mode detection
Yes as I did not start the IR in the same program, so I added a key to switch eyes.
I made a google+ page also:
https://plus.google.com/b/110601485908665661074/" onclick="window.open(this.href);return false;
I made a google+ page also:
https://plus.google.com/b/110601485908665661074/" onclick="window.open(this.href);return false;
- Fredz
- Petrif-Eyed
- Posts: 2255
- Joined: Sat Jan 09, 2010 2:06 pm
- Location: Perpignan, France
- Contact:
Re: GN245HQ 3D mode detection
I mean, did you experience eye inversions during rendering independently of the start up phase ? Because the technique based on glutSwapBuffers and vsync enabling doesn't guarantee a good synchronization, frames can be missed.
It's nice you have set up a page for your project. Maybe you could contact other Linux projects that could be interested in your findings/code so it's not forgotten, like these ones :
- Bino (3D video player) : http://bino3d.org/" onclick="window.open(this.href);return false;
- sView (3D video player) : http://www.sview.ru/" onclick="window.open(this.href);return false;
- VLC 3D (3D video player) : http://wiki.videolan.org/SoC_2011/Stereoscopic_Video" onclick="window.open(this.href);return false;
- SIV (3D photo viewer) : http://www.mygnu.de/index.php/siv-a-ste ... for-linux/" onclick="window.open(this.href);return false;
- Plascolin (3D photo viewer) : http://www.schrammel.org/stereo-plascolin.php" onclick="window.open(this.href);return false;
- Tux Stereo Viewer (3D photo viewer) : http://doc.ubuntu-fr.org/tux_stereo_viewer" onclick="window.open(this.href);return false;
- stereowrap (stereo 3D driver) : http://code.google.com/p/stereowrap/" onclick="window.open(this.href);return false;
- MediaPortal 3D plugin : http://forum.team-mediaportal.com/media ... tal-85727/" onclick="window.open(this.href);return false;
It's nice you have set up a page for your project. Maybe you could contact other Linux projects that could be interested in your findings/code so it's not forgotten, like these ones :
- Bino (3D video player) : http://bino3d.org/" onclick="window.open(this.href);return false;
- sView (3D video player) : http://www.sview.ru/" onclick="window.open(this.href);return false;
- VLC 3D (3D video player) : http://wiki.videolan.org/SoC_2011/Stereoscopic_Video" onclick="window.open(this.href);return false;
- SIV (3D photo viewer) : http://www.mygnu.de/index.php/siv-a-ste ... for-linux/" onclick="window.open(this.href);return false;
- Plascolin (3D photo viewer) : http://www.schrammel.org/stereo-plascolin.php" onclick="window.open(this.href);return false;
- Tux Stereo Viewer (3D photo viewer) : http://doc.ubuntu-fr.org/tux_stereo_viewer" onclick="window.open(this.href);return false;
- stereowrap (stereo 3D driver) : http://code.google.com/p/stereowrap/" onclick="window.open(this.href);return false;
- MediaPortal 3D plugin : http://forum.team-mediaportal.com/media ... tal-85727/" onclick="window.open(this.href);return false;
-
- Two Eyed Hopeful
- Posts: 79
- Joined: Tue Dec 22, 2009 11:48 am
Re: GN245HQ 3D mode detection
Hey interesting thread
So what about activating 3D mode with Nouveau ? Any progress ?
Nvidia proprietary driver support 3D monitors by adding just a line in your xorg.conf. But good job on reversing the I2C protocol. Now we need to make this work with Nouveau !
Let me know if you need any help.
So what about activating 3D mode with Nouveau ? Any progress ?
Nvidia proprietary driver support 3D monitors by adding just a line in your xorg.conf. But good job on reversing the I2C protocol. Now we need to make this work with Nouveau !
Let me know if you need any help.
-
- One Eyed Hopeful
- Posts: 20
- Joined: Wed May 25, 2011 6:03 am
Re: GN245HQ 3D mode detection
I made some progress with my ACER GN245HQ on the subject :
DVI 3D mode can now be activated with the correct modline in xorg.conf and then activate the IR emitter with a3dcontrol.
After some experiment with nvidia tools to create personalized resolution and synchronization I found that to activate3D stereo modeIi have to change the number of vertical lines. It must be greater than 1147 1150 is the max supported.
I used then powerstrip on windows to extract the modlines while 3D stereo active or not.
1080p 120Hz without stereo modeline:
1080p 120Hz stereo modeline:
When this mode is active a3dcontrol permit to activate the integrated emitter via I2C.
So it should now work with nouveau (don't know if I2C easily available with nouveau).
Here my xorg.conf : http://a3dcontrol.googlecode.com/git/X11/xorg.conf
Next step is to try to activate IR synchronously with right or left eye display, to prevent eye inversion at startup.
After that I'll try with nouveau and with an intel integrated GPU.
I would also like to find someone with asus 3D Vision 2 screen to extract modlines while 3D stereo active and inactive and to known if the same technique is used to discriminate 3D content.
DVI 3D mode can now be activated with the correct modline in xorg.conf and then activate the IR emitter with a3dcontrol.
After some experiment with nvidia tools to create personalized resolution and synchronization I found that to activate3D stereo modeIi have to change the number of vertical lines. It must be greater than 1147 1150 is the max supported.
I used then powerstrip on windows to extract the modlines while 3D stereo active or not.
1080p 120Hz without stereo modeline:
Code: Select all
ModeLine "1920x1080_120.std" 285.545 1920 1968 2000 2080 1080 1083 1088 1144 +hsync +vsync # standard
Code: Select all
ModeLine "1920x1080_120.3ds" 286.754 1920 1968 2000 2080 1080 1083 1088 1149 +hsync +vsync # stereo
So it should now work with nouveau (don't know if I2C easily available with nouveau).
Here my xorg.conf : http://a3dcontrol.googlecode.com/git/X11/xorg.conf
Next step is to try to activate IR synchronously with right or left eye display, to prevent eye inversion at startup.
After that I'll try with nouveau and with an intel integrated GPU.
I would also like to find someone with asus 3D Vision 2 screen to extract modlines while 3D stereo active and inactive and to known if the same technique is used to discriminate 3D content.
Last edited by ynsta on Thu May 24, 2012 2:49 am, edited 1 time in total.
-
- One Eyed Hopeful
- Posts: 20
- Joined: Wed May 25, 2011 6:03 am
Re: GN245HQ 3D mode detection
I'd also like to test with another screen preferably 3D Vision 2 like asus one, if i can find someone with it.
It would permit to know if there is some kind of nvidia standard or if each screen uses different techniques to detect 3D content and to activate integrated emitter.
It would permit to know if there is some kind of nvidia standard or if each screen uses different techniques to detect 3D content and to activate integrated emitter.
-
- One Eyed Hopeful
- Posts: 20
- Joined: Wed May 25, 2011 6:03 am
Re: GN245HQ 3D mode detection
Fredz I'll contact other project soon, when I'll understand how the R/L start synchronization is done.
I have to try if is only the timing of i2c messages.
I have to try if is only the timing of i2c messages.
-
- One Eyed Hopeful
- Posts: 20
- Joined: Wed May 25, 2011 6:03 am
Re: GN245HQ 3D mode detection
I have a clue on how to sync my IR, with the following I2C message :
It seams to be a sync frame, when I send this frame, it switch my eyes 50% of times but I don't known when I can send it to synchronize with my opengl code.
Maybe I can monitor with a scope the time between an opengl flip and the effective display on my screen with some kind of photo sensible component.
Someone with a better idea ?
Code: Select all
struct i2c_msg sync_msg[] = {
{
.addr = 0x50,
.flags = 0,
.len = 1,
.buf = &zero,
},
{
.addr = 0x50,
.flags = I2C_M_RD,
.len = 256,
.buf = buf,
},
};
Maybe I can monitor with a scope the time between an opengl flip and the effective display on my screen with some kind of photo sensible component.
Someone with a better idea ?
- Fredz
- Petrif-Eyed
- Posts: 2255
- Joined: Sat Jan 09, 2010 2:06 pm
- Location: Perpignan, France
- Contact:
Re: GN245HQ 3D mode detection
Did you try to use Genlock ? It gives you an interrupt at each vertical retrace.
-
- One Eyed Hopeful
- Posts: 20
- Joined: Wed May 25, 2011 6:03 am
Re: GN245HQ 3D mode detection
No I'll look at it.
I didn't know that there is a vretrace interrupt.
I'll look at it and try to synchronize my I2C message on this interrupt.
Thank you.
I didn't know that there is a vretrace interrupt.
I'll look at it and try to synchronize my I2C message on this interrupt.
Thank you.