XV video output is a black screen on my notebook (Packard Bell Easy Note R1800). I use a Debian Squeeze distribution. I get the same bug with Ubuntu 12.04. I have compiled the lastest release of openchrome (0.3.0) but the bug still exists. Here is the output of the 'lscpi' command : 01:00.0 VGA compatible controller: VIA Technologies, Inc. CN400/PM800/PM880/PN800/PN880 [S3 UniChrome Pro] (rev 02)
Can you please provide the full xorg log and the xorg conf ?
Created attachment 66125 [details] Xorg log
Thank you for your response. You will find the Xorg log in attachment. Here is the Xorg configuration file : Section "Device" Identifier "devname" Driver "openchrome" #Option "NoXVDMA" "false" #Option "EnableAGPDMA" "false" EndSection
Created attachment 66141 [details] Xorg log with debug support enabled I have compiled openchrome-0.3.0 with debug support with the following commands : ./configure --prefix=/usr --enable-debug --enable-xv-debug make make install You will find the Xorg log after GDM restart and video playing (with totem). Thank you for your help :-)
Created attachment 66143 [details] xdpyinfo command output In attachment, you will find the output of the xdpyinfo command.
Created attachment 66144 [details] output of the xvinfo command In attachment, you will find the output of the xvinfo command.
Since my window manager (Metacity) is a compositing window manager, I have tried to kill its process and to play a video : I have the same bug : the content of Totem is a black window...
ould you please try with another video player not based on gstreamer, like xine or mplayer ? This is just to make sure, as I suspect the issue is something else. I have Xv working on a similar chipset, but on the VGA port. I guess in your case, the Xv window is not enabled on the proper CRTC.
I have the same bug with Skype which can only play video with XV. I can't try to connect a screen on the VGA port of the laptop because it's not my computer and it's 60 km far from my home... Maybe you can add an option in the Xorg.conf to force the CRTC.
I have the same bug after adding the following options in xorg.conf : Option "ForcePanel" "true" Option "ActiveDevice" "LCD" I have removed VIA_DEVICE_CRT in the following line of via_id.c : {"Packard Bell Easynote R1100",VIA_PM800,0x1631,0xC015,VIA_DEVICE_CRT|VIA_DEVICE_LCD} After compiling and installing, it doesn't change anything...
In openchrome, master source code, open src/via_xv_overlay.c file. Then localize following code: /* * Enable video on secondary */ if ((pVia->VideoEngine == VIDEO_ENGINE_CME || pVia->Chipset == VIA_VM800) && iga->index) { /* V1_ON_SND_DISPLAY */ vidCtl |= V1_ON_SND_DISPLAY; /* SECOND_DISPLAY_COLOR_KEY_ENABLE */ compose |= SECOND_DISPLAY_COLOR_KEY_ENABLE | 0x1; } Replace it with following and check if it works: /* * Enable video on secondary */ if ((pVia->VideoEngine == VIDEO_ENGINE_CME || pVia->Chipset == VIA_PM800 || pVia->Chipset == VIA_VM800) && iga->index) { /* V1_ON_SND_DISPLAY */ vidCtl |= V1_ON_SND_DISPLAY; /* SECOND_DISPLAY_COLOR_KEY_ENABLE */ compose |= SECOND_DISPLAY_COLOR_KEY_ENABLE | 0x1; }
If solution above will not work, try to comment out/delete following lines: /* * Enable video on secondary */ if ((pVia->VideoEngine == VIDEO_ENGINE_CME || pVia->Chipset == VIA_VM800) && iga->index) { /* V1_ON_SND_DISPLAY */ vidCtl |= V1_ON_SND_DISPLAY; /* SECOND_DISPLAY_COLOR_KEY_ENABLE */ compose |= SECOND_DISPLAY_COLOR_KEY_ENABLE | 0x1; }
Another thing to try, add Option "ModeSwitchMethod" "legacy" to your conf file.
(In reply to comment #13) > Another thing to try, add Option "ModeSwitchMethod" "legacy" to your conf file. After adding this option and restarting GDM, I have a black screen.
As you suggest, I have replaced : if ((pVia->VideoEngine == VIDEO_ENGINE_CME || pVia->Chipset == VIA_VM800) && iga->index) { By : if ((pVia->VideoEngine == VIDEO_ENGINE_CME || pVia->Chipset == VIA_PM800 || pVia->Chipset == VIA_VM800) && iga->index) { After compiling, installing and video playing, it's always the same thing : the content of totem is a black window... For your information, I'm sure that this modification was successfully considered, because I have added a debug message in via_xv_overlay.c (just before the modification) and I can see this message in Xorg.0.log. I also tried to delete the following code but it doesn't change anything : if ((pVia->VideoEngine == VIDEO_ENGINE_CME || pVia->Chipset == VIA_VM800) && iga->index) { /* V1_ON_SND_DISPLAY */ vidCtl |= V1_ON_SND_DISPLAY; /* SECOND_DISPLAY_COLOR_KEY_ENABLE */ compose |= SECOND_DISPLAY_COLOR_KEY_ENABLE | 0x1; }
Created attachment 66845 [details] XV video displayed on VGA screen and not on LCD screen When a VGA screen is plugged, the XV video is displayed on the VGA screen and not on the LCD screen (where the content of the window is a black screen). I presume it's the same thing when VGA screen is disconnected : XV video is sended on the VGA port and not on the LCD. With the following option, the two screen are disabled : Option "ModeSwitchMethod" "legacy" With this option, the VGA screen is disabled, but the content of mplayer window on the LCD screen is a black scare. Option "ActiveDevice" "LCD" The following options don't change anything : Option "ForcePanel" "true" Option "NoXVDMA" "false" Option "EnableAGPDMA" "false"
Thanks for information. It is very useful. Localize following code: /* * Enable video on secondary */ if ((pVia->VideoEngine == VIDEO_ENGINE_CME || pVia->Chipset == VIA_VM800) && iga->index) { /* V1_ON_SND_DISPLAY */ vidCtl |= V1_ON_SND_DISPLAY; /* SECOND_DISPLAY_COLOR_KEY_ENABLE */ compose |= SECOND_DISPLAY_COLOR_KEY_ENABLE | 0x1; } Replace it with following and check if it works: /* * Enable video on secondary */ if ((pVia->VideoEngine == VIDEO_ENGINE_CME || pVia->Chipset == VIA_VM800)) { /* V1_ON_SND_DISPLAY */ vidCtl |= V1_ON_SND_DISPLAY; /* SECOND_DISPLAY_COLOR_KEY_ENABLE */ compose |= SECOND_DISPLAY_COLOR_KEY_ENABLE | 0x1; }
Created attachment 66846 [details] Wrong colors when forcing video output on LCD screen SOME RELATIVE GOOD NEWS : ========================= In the ViaInitVideoStatusFlag function (src/via_xv_overlay.c), I have replaced : static unsigned long ViaInitVideoStatusFlag(VIAPtr pVia) { switch (pVia->ChipId) { case PCI_CHIP_VT3205: case PCI_CHIP_VT3204: case PCI_CHIP_VT3259: case PCI_CHIP_VT3314: return VIDEO_HQV_INUSE | SW_USE_HQV | VIDEO_3_INUSE; By : static unsigned long ViaInitVideoStatusFlag(VIAPtr pVia) { switch (pVia->ChipId) { case PCI_CHIP_VT3205: case PCI_CHIP_VT3204: case PCI_CHIP_VT3259: case PCI_CHIP_VT3314: return VIDEO_HQV_INUSE | SW_USE_HQV | VIDEO_1_INUSE; Now the XV video output is on the LCD screen but the colors are wrong. You will find in attachment a screenshot of the same video with X11 output and with XV output.
(In reply to comment #17) Sorry, but the following modification does not work : > > /* > * Enable video on secondary > */ > if ((pVia->VideoEngine == VIDEO_ENGINE_CME || > pVia->Chipset == VIA_VM800)) { > /* V1_ON_SND_DISPLAY */ > vidCtl |= V1_ON_SND_DISPLAY; > /* SECOND_DISPLAY_COLOR_KEY_ENABLE */ > compose |= SECOND_DISPLAY_COLOR_KEY_ENABLE | 0x1; > } With a VGA screen connected, the XV output goes on the VGA screen and the content of the window of the LCD screen is black. When the VGA screen is disconnected (and GDM restarted), the content of the window on the LCD screen is black... For your information, I have tried to remove the if condition to be sure that `vidCtl' and `compose' variables are set and I still have the same bug.
Great news. To fix this issue you have to modify viaSetColorSpace function. Your chipset ID is PCI_CHIP_VT3259. Replace following code: void viaSetColorSpace(VIAPtr pVia, int hue, int saturation, int brightness, int contrast, Bool reset) { CARD32 col1, col2; viaCalculateVideoColor(pVia, hue, saturation, brightness, contrast, reset, &col1, &col2); switch (pVia->ChipId) { case PCI_CHIP_VT3205: case PCI_CHIP_VT3204: case PCI_CHIP_VT3259: case PCI_CHIP_VT3314: VIASETREG(V3_ColorSpaceReg_1, col1); VIASETREG(V3_ColorSpaceReg_2, col2); DBG_DD(ErrorF("000002C4 %08lx\n", col1)); DBG_DD(ErrorF("000002C8 %08lx\n", col2)); break; case PCI_CHIP_VT3327: case PCI_CHIP_VT3336: case PCI_CHIP_VT3324: with: void viaSetColorSpace(VIAPtr pVia, int hue, int saturation, int brightness, int contrast, Bool reset) { CARD32 col1, col2; viaCalculateVideoColor(pVia, hue, saturation, brightness, contrast, reset, &col1, &col2); switch (pVia->ChipId) { case PCI_CHIP_VT3205: case PCI_CHIP_VT3204: case PCI_CHIP_VT3314: VIASETREG(V3_ColorSpaceReg_1, col1); VIASETREG(V3_ColorSpaceReg_2, col2); DBG_DD(ErrorF("000002C4 %08lx\n", col1)); DBG_DD(ErrorF("000002C8 %08lx\n", col2)); break; case PCI_CHIP_VT3259: case PCI_CHIP_VT3327: case PCI_CHIP_VT3336: case PCI_CHIP_VT3324: (In reply to comment #18) > Created attachment 66846 [details] > Wrong colors when forcing video output on LCD screen > > SOME RELATIVE GOOD NEWS : > ========================= > > In the ViaInitVideoStatusFlag function (src/via_xv_overlay.c), I have replaced > : > > static unsigned long > ViaInitVideoStatusFlag(VIAPtr pVia) > { > switch (pVia->ChipId) { > case PCI_CHIP_VT3205: > case PCI_CHIP_VT3204: > case PCI_CHIP_VT3259: > case PCI_CHIP_VT3314: > return VIDEO_HQV_INUSE | SW_USE_HQV | VIDEO_3_INUSE; > > By : > > static unsigned long > ViaInitVideoStatusFlag(VIAPtr pVia) > { > switch (pVia->ChipId) { > case PCI_CHIP_VT3205: > case PCI_CHIP_VT3204: > case PCI_CHIP_VT3259: > case PCI_CHIP_VT3314: > return VIDEO_HQV_INUSE | SW_USE_HQV | VIDEO_1_INUSE; > > Now the XV video output is on the LCD screen but the colors are wrong. You will > find in attachment a screenshot of the same video with X11 output and with XV > output.
Created attachment 66850 [details] [review] Fix CN400 Xv on IGA2 Your findings plus some cleanup are in the attached patch. I tested it on a VGA only CN400, it works fine. Please confirm the same patch on top of git master works too on your CN400 laptop.
(In reply to comment #21) Bad news... With your patch, the video is displayed on the LCD screen, but the content of the totem window is very bad : something with yellow and black lines... Sorry, I can't send you a screenshot because I'm not in front of the computer (which is 60km far from me)...
Created attachment 66993 [details] [review] Fix CN400 Xv on IGA2 (v2) Does that patch work better ?
(In reply to comment #23) > Created attachment 66993 [details] [review] [review] > Fix CN400 Xv on IGA2 (v2) With the second patch : - if I play a video with MPlayer with XV output, the result is good :-) - if I play the same video with totem, the result is bad with differents colors stripes (diagonal) - with Skype, colors seems to be inverted but the correspondant is visible. I can't send you screenshots because the computer is 60 km far from me...
Created attachment 67392 [details] Mplayer and Totem outputs In attachment, you will find the same video output with MPlayer (which is OK) and with Totem (which is wrong).
I've pushed the first iteration of the patch to git master. I think the color issue with some of the video players is a different bug. I'll try to reproduce on my CN400 but it's currently not available.
Since the older OpenChrome code is no longer support, I will be closing the bug. If the bug persists with the latest version, please reopen or refile the bug. There has been virtually no changes to the Xv code since Version 0.3.3.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.