Bug 28238

Summary: VSync to secondary monitor over VGA using GL fails (succeeds with xv, however)
Product: xorg Reporter: Jason Wigg <jw5801>
Component: Driver/RadeonAssignee: xf86-video-ati maintainers <xorg-driver-ati>
Status: RESOLVED INVALID QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium CC: jw5801
Version: 7.4 (2008.09)   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Xorg log
none
dmesg output none

Description Jason Wigg 2010-05-25 04:03:41 UTC
I have a laptop with an Xpress 200M integrated graphics card. I use the VGA output of this to connect to my TV. I don't have anything particularly fancy set up, I log in then use xrandr to switch off the laptop monitor and set a reasonable resolution on the TV.

Once I've done this, I cannot play video using the gl output of mplayer (or xbmc, where I really want to use it) without disabling VSync, which results in video tearing. If I try to run with VSync, the video only refreshes about every 5 seconds, and mplayer reports:
"do_wait: drmWaitVBlank returned -1, IRQs don't seem to be working correctly."

If I use xrandr to turn the laptop screen back on, then video plays fine, however is synced to the laptop monitor, and there is regular tearing on the TV. Curiously, if I use the xv or x11 output of mplayer, I have no problems syncing to the TV, which leads me to believe it is a bug in the GL implementation.

It appears to be an issue using the GLX_SGI_video_sync extension when the primary monitor is not responding.

Some background:
Distro: Gentoo AMD64 stable (mostly)
Driver: xf86-video-ati-6.13.0
xorg-X11: 7.4
xorg-server: 1.7.6
Kernel: 2.6.33-zen2

Anything else that is needed, let me know. I can attach the full xorg.log and mplayer output if need be.
Comment 1 Alex Deucher 2010-05-25 08:00:58 UTC
Are you using kms?  Please attach your xorg log and dmesg.
Comment 2 Jason Wigg 2010-05-25 13:37:06 UTC
Created attachment 35853 [details]
Xorg log
Comment 3 Jason Wigg 2010-05-25 13:37:33 UTC
Created attachment 35854 [details]
dmesg output
Comment 4 Jason Wigg 2010-05-25 13:38:56 UTC
I'm not using KMS.
Comment 5 meneerjansen00 2010-08-07 10:19:12 UTC
[CODE]
do_wait: drmWaitVBlank returned -1, IRQs don't seem to be working correctly.
Try adjusting the vblank_mode configuration parameter.
[/CODE]
I experience the same thing (on S-video out and VGA crt monitor). Searched the internet for the term "vblank_mode". Error existed even when dinosaurs walked the earth. The term seems not to be 'invented' by mplayer but by GL.

Anyway installed the program 'driconf' to get a .drirc file in ~. Adjusted the parameter vblank_mode from 1 to 0 as suggested on the 'net. Did not help (of course). Some rumors about this error finally solved in kernel 2.6.33 which is not yet available for my package manager. Probably only solved for the newer Ati/AMD cards.

Further data:
Ubuntu 10.04.
Ati Radeon 9600 w/ Xorg open 'Radeon' driver.
mplayer -vo gl = error and sluggish playback, if any. mplayer -vo xv = fine.  
NO kms of course.
No 3D desktop effects (compostite).
kernel 2.6.32
TV out acchieved by:
[code]
xrandr --output S-video --set load_detection 1
xrandr --output S-video --mode 800x600
xrandr --output S-video --primary
xrandr --output S-video --set tv_horizontal_size 2
xrandr --output S-video --set tv_horizontal_position -5
xrandr --output S-video --set tv_vertical_position -3
xrandr --output VGA-0 --off
[/code]

Would like to know what is the matter: faulty implementation of GL by Radeon driver or hardware problem?

(In reply to comment #4)
> I'm not using KMS.
Comment 6 Adam Jackson 2018-06-12 19:07:16 UTC
Mass closure: This bug has been untouched for more than six years, and is not
obviously still valid. Please reopen this bug or file a new report if you continue to experience issues with current releases.

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.