Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Dev

OpenGL vsync broken on Intel i945

 

 

MythTV dev RSS feed   Index | Next | Previous | View Threaded


tino.keitel at gmx

Nov 22, 2007, 12:21 PM

Post #1 of 18 (2471 views)
Permalink
OpenGL vsync broken on Intel i945

Hi folks,

for some months now I can not use OpenGL vsync with SVN trunk
(currently multirec). When I enable it, LiveTV only shows a short
moment of too fast video every few seconds. I use Xorg with the Intel
driver and Mesa 7.0.2. Does anyone else knows about this problem? Is
there a fix/workaround? Should I open a bug?

I attached the frontend log.

Regards,
Tino
Attachments: broken-GL-sync.txt (26.7 KB)


mythtv at woox

Nov 22, 2007, 2:00 PM

Post #2 of 18 (2350 views)
Permalink
Re: OpenGL vsync broken on Intel i945 [In reply to]

You should be using the drm sync method instead of opengl. I got
better results that way.

Using the normal sync method, I fixed my vsync problem using the
following patch.

--- mythtv/libs/libmythtv/videoout_xv.cpp~ 2007-11-14
18:38:48.000000000 +0000
+++ mythtv/libs/libmythtv/videoout_xv.cpp 2007-11-14
18:39:56.000000000 +0000
@@ -636,7 +636,7 @@
// figure out if we want chromakeying..
VideoDisplayProfile vdp;
vdp.SetInput(QSize(width, height));
- bool check_for_colorkey = (vdp.GetOSDRenderer() == "chromakey");
+ bool check_for_colorkey = true;

// if we want colorkey capability try to get an adapter with them
if (check_for_colorkey)


On Nov 22, 2007 8:21 PM, Tino Keitel <tino.keitel [at] gmx> wrote:
> Hi folks,
>
> for some months now I can not use OpenGL vsync with SVN trunk
> (currently multirec). When I enable it, LiveTV only shows a short
> moment of too fast video every few seconds. I use Xorg with the Intel
> driver and Mesa 7.0.2. Does anyone else knows about this problem? Is
> there a fix/workaround? Should I open a bug?
>
> I attached the frontend log.
>
> Regards,
> Tino
>
>
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev [at] mythtv
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
>
>
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


tino.keitel at gmx

Nov 22, 2007, 2:13 PM

Post #3 of 18 (2356 views)
Permalink
Re: OpenGL vsync broken on Intel i945 [In reply to]

On Thu, Nov 22, 2007 at 22:00:39 +0000, Riz wrote:
> You should be using the drm sync method instead of opengl. I got
> better results that way.

What is the difference between drm sync and opengl? How do I choose
this?

Regards,
Tino
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


mythtv at woox

Nov 22, 2007, 3:09 PM

Post #4 of 18 (2343 views)
Permalink
Re: OpenGL vsync broken on Intel i945 [In reply to]

As I understand it, the DRM method is the better method, as it access
the video card directly to sync to vertical refresh. Have a look at
the comments in libs/libmythtv/vsync.h

Unselecting "Enable OpenGL vertical sync for timing" in Playback
options should use the DRM method, if it is available. You should have
a look at mythfrontend logs to see what method is used.

Also the problem with the Intel drivers (at least on my system), is
that the overlay for Xv is on the second adaptor, the first being
textured video. Myth uses the first by default (as do most programs).

Using the patch should force myth to select the "better" adapter,
solving the sync issues (hopefully).

On Nov 22, 2007 10:13 PM, Tino Keitel <tino.keitel [at] gmx> wrote:
> On Thu, Nov 22, 2007 at 22:00:39 +0000, Riz wrote:
> > You should be using the drm sync method instead of opengl. I got
> > better results that way.
>
> What is the difference between drm sync and opengl? How do I choose
> this?
>
>
> Regards,
> Tino
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev [at] mythtv
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
>
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


gnassas at mac

Nov 22, 2007, 4:51 PM

Post #5 of 18 (2348 views)
Permalink
Re: OpenGL vsync broken on Intel i945 [In reply to]

On 22-Nov-07, at 3:21 PM, Tino Keitel wrote:

> for some months now I can not use OpenGL vsync with SVN trunk
> (currently multirec). When I enable it, LiveTV only shows a short
> moment of too fast video every few seconds. I use Xorg with the Intel
> driver and Mesa 7.0.2.

There's a diagnosis and workaround described here that should get you
going:

http://www.gossamer-threads.com/lists/mythtv/users/301160#301160

- George

_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


tino.keitel at gmx

Nov 22, 2007, 11:59 PM

Post #6 of 18 (2342 views)
Permalink
Re: OpenGL vsync broken on Intel i945 [In reply to]

On Thu, Nov 22, 2007 at 23:09:26 +0000, Riz wrote:
> As I understand it, the DRM method is the better method, as it access
> the video card directly to sync to vertical refresh. Have a look at
> the comments in libs/libmythtv/vsync.h
>
> Unselecting "Enable OpenGL vertical sync for timing" in Playback
> options should use the DRM method, if it is available. You should have

When I unselect it, I have tearing video. That's why I want to select
it.

Regards,
Tino
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


tino.keitel at gmx

Nov 23, 2007, 12:00 AM

Post #7 of 18 (2339 views)
Permalink
Re: OpenGL vsync broken on Intel i945 [In reply to]

On Thu, Nov 22, 2007 at 19:51:18 -0500, George Nassas wrote:
> On 22-Nov-07, at 3:21 PM, Tino Keitel wrote:
>
> > for some months now I can not use OpenGL vsync with SVN trunk
> > (currently multirec). When I enable it, LiveTV only shows a short
> > moment of too fast video every few seconds. I use Xorg with the Intel
> > driver and Mesa 7.0.2.
>
> There's a diagnosis and workaround described here that should get you
> going:
>
> http://www.gossamer-threads.com/lists/mythtv/users/301160#301160

Thanks a lot, that sounds promising.

Regards,
Tino
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


tino.keitel at gmx

Nov 23, 2007, 7:26 AM

Post #8 of 18 (2324 views)
Permalink
Re: OpenGL vsync broken on Intel i945 [In reply to]

On Fri, Nov 23, 2007 at 08:59:42 +0100, Tino Keitel wrote:
> On Thu, Nov 22, 2007 at 23:09:26 +0000, Riz wrote:
> > As I understand it, the DRM method is the better method, as it access
> > the video card directly to sync to vertical refresh. Have a look at
> > the comments in libs/libmythtv/vsync.h
> >
> > Unselecting "Enable OpenGL vertical sync for timing" in Playback
> > options should use the DRM method, if it is available. You should have
>
> When I unselect it, I have tearing video. That's why I want to select

For the records: I think the tearing video is caused by the fallback to
USleep. DRM doesn't work because of driver restrictions, RTC doesn't
work because of missing permissions (does the frontend has to run with
root permissions to use RTC?). I'll try a patched intel driver that
provides vblank even in 2D mode.

Regards,
Tino
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


danielk at cuymedia

Nov 23, 2007, 7:29 AM

Post #9 of 18 (2331 views)
Permalink
Re: OpenGL vsync broken on Intel i945 [In reply to]

On Fri, 2007-11-23 at 16:26 +0100, Tino Keitel wrote:
> On Fri, Nov 23, 2007 at 08:59:42 +0100, Tino Keitel wrote:
> > On Thu, Nov 22, 2007 at 23:09:26 +0000, Riz wrote:
> > > As I understand it, the DRM method is the better method, as it access
> > > the video card directly to sync to vertical refresh. Have a look at
> > > the comments in libs/libmythtv/vsync.h
> > >
> > > Unselecting "Enable OpenGL vertical sync for timing" in Playback
> > > options should use the DRM method, if it is available. You should have
> >
> > When I unselect it, I have tearing video. That's why I want to select
>
> For the records: I think the tearing video is caused by the fallback to
> USleep. DRM doesn't work because of driver restrictions, RTC doesn't
> work because of missing permissions (does the frontend has to run with
> root permissions to use RTC?). I'll try a patched intel driver that
> provides vblank even in 2D mode.

If you run this at root at startup:
echo 1024 > /proc/sys/dev/rtc/max-user-freq
Then MythTV will be able to use RTC. It does not need root.

-- Daniel

_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


pstehlik at sophics

Nov 23, 2007, 7:30 AM

Post #10 of 18 (2344 views)
Permalink
Re: OpenGL vsync broken on Intel i945 [In reply to]

Tino Keitel wrote:
> does the frontend has to run with root permissions to use RTC?

Nope.

echo 1024 > /proc/sys/dev/rtc/max-user-freq

Petr

_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


tino.keitel at gmx

Nov 23, 2007, 7:49 AM

Post #11 of 18 (2325 views)
Permalink
Re: OpenGL vsync broken on Intel i945 [In reply to]

On Fri, Nov 23, 2007 at 10:29:23 -0500, Daniel Kristjansson wrote:
> On Fri, 2007-11-23 at 16:26 +0100, Tino Keitel wrote:
> > On Fri, Nov 23, 2007 at 08:59:42 +0100, Tino Keitel wrote:
> > > On Thu, Nov 22, 2007 at 23:09:26 +0000, Riz wrote:
> > > > As I understand it, the DRM method is the better method, as it access
> > > > the video card directly to sync to vertical refresh. Have a look at
> > > > the comments in libs/libmythtv/vsync.h
> > > >
> > > > Unselecting "Enable OpenGL vertical sync for timing" in Playback
> > > > options should use the DRM method, if it is available. You should have
> > >
> > > When I unselect it, I have tearing video. That's why I want to select
> >
> > For the records: I think the tearing video is caused by the fallback to
> > USleep. DRM doesn't work because of driver restrictions, RTC doesn't
> > work because of missing permissions (does the frontend has to run with
> > root permissions to use RTC?). I'll try a patched intel driver that
> > provides vblank even in 2D mode.
>
> If you run this at root at startup:
> echo 1024 > /proc/sys/dev/rtc/max-user-freq

This doesn't work with the new RTC driver (rtc_cmos, or
CONFIG_RTC_DRV_CMOS).

Regards,
Tino
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


danielk at cuymedia

Nov 23, 2007, 8:14 AM

Post #12 of 18 (2327 views)
Permalink
Re: OpenGL vsync broken on Intel i945 [In reply to]

On Fri, 2007-11-23 at 16:49 +0100, Tino Keitel wrote:
> On Fri, Nov 23, 2007 at 10:29:23 -0500, Daniel Kristjansson wrote:
> > On Fri, 2007-11-23 at 16:26 +0100, Tino Keitel wrote:
> > > On Fri, Nov 23, 2007 at 08:59:42 +0100, Tino Keitel wrote:
> > > > On Thu, Nov 22, 2007 at 23:09:26 +0000, Riz wrote:
> > > > > As I understand it, the DRM method is the better method, as it access
> > > > > the video card directly to sync to vertical refresh. Have a look at
> > > > > the comments in libs/libmythtv/vsync.h
> > > > >
> > > > > Unselecting "Enable OpenGL vertical sync for timing" in Playback
> > > > > options should use the DRM method, if it is available. You should have
> > > >
> > > > When I unselect it, I have tearing video. That's why I want to select
> > >
> > > For the records: I think the tearing video is caused by the fallback to
> > > USleep. DRM doesn't work because of driver restrictions, RTC doesn't
> > > work because of missing permissions (does the frontend has to run with
> > > root permissions to use RTC?). I'll try a patched intel driver that
> > > provides vblank even in 2D mode.
> >
> > If you run this at root at startup:
> > echo 1024 > /proc/sys/dev/rtc/max-user-freq
>
> This doesn't work with the new RTC driver (rtc_cmos, or
> CONFIG_RTC_DRV_CMOS).

It should according to 2.6.22.9 Documentation/rtc.txt...
Maybe your distro changed this somehow? The Linux documentation
could be wrong of course. But it appears to still work with the
latest Ubuntu kernel.

I googled fedora core 8, since I've noticed some Fedora users
complaining. It looks like /proc/sys/dev/hpet/max-user-freq
might work there instead.

But this is quickly becoming a discussion for mythtv-users as
MythTV can't actually set this, it must be set by the distro,
or the distro packagers of MythTV.

-- Daniel

_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


tino.keitel at gmx

Nov 23, 2007, 9:39 AM

Post #13 of 18 (2326 views)
Permalink
Re: OpenGL vsync broken on Intel i945 [In reply to]

On Fri, Nov 23, 2007 at 11:14:50 -0500, Daniel Kristjansson wrote:

[...]

> It should according to 2.6.22.9 Documentation/rtc.txt...

It is documented in the section "Old PC/AT-Compatible driver:
/dev/rtc". This is CONFIG_RTC. However, I use CONFIG_RTC_DRV_CMOS, and
only one of them can be used. The new driver has a sysfs interface, but
something like max-user-freq seems to be missing.

CONFIG_RTC_DRV_CMOS has the advantage that the wakeup time can be
written in seconds since epoch, as it is proviced my MythTV. No messing
around with date/time conversions between local time and UTC time are
needed.

> Maybe your distro changed this somehow? The Linux documentation

This is a vanilla kernel (2.6.23.1).

> could be wrong of course. But it appears to still work with the
> latest Ubuntu kernel.

It just depends on the RTC driver that is loaded at runtime (rtc.ko or
rtc-cmos.ko, if the latter is provided by the distro).

>
> I googled fedora core 8, since I've noticed some Fedora users
> complaining. It looks like /proc/sys/dev/hpet/max-user-freq
> might work there instead.

I already set this, but it doesn't seem to be sufficient for
mythfrontend. It still falls back to USleep.

> But this is quickly becoming a discussion for mythtv-users as
> MythTV can't actually set this, it must be set by the distro,
> or the distro packagers of MythTV.

When /proc/sys/dev/rtc/max-user-freq is mentioned somewhere in the
MythTV documentation, then it should be mentioned that this doesn't
work with the new RTC driver anymore.

Regards,
Tino
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


mythtv at woox

Nov 23, 2007, 10:02 AM

Post #14 of 18 (2314 views)
Permalink
Re: OpenGL vsync broken on Intel i945 [In reply to]

IIRC /dev/rtc was renamed to /dev/rtc0. Maybe symlinking it to
/dev/rtc may enable RTC?

Did forcing the use of the overlay not work?

On Nov 23, 2007 5:39 PM, Tino Keitel <tino.keitel [at] gmx> wrote:
> On Fri, Nov 23, 2007 at 11:14:50 -0500, Daniel Kristjansson wrote:
>
> [...]
>
> > It should according to 2.6.22.9 Documentation/rtc.txt...
>
> It is documented in the section "Old PC/AT-Compatible driver:
> /dev/rtc". This is CONFIG_RTC. However, I use CONFIG_RTC_DRV_CMOS, and
> only one of them can be used. The new driver has a sysfs interface, but
> something like max-user-freq seems to be missing.
>
> CONFIG_RTC_DRV_CMOS has the advantage that the wakeup time can be
> written in seconds since epoch, as it is proviced my MythTV. No messing
> around with date/time conversions between local time and UTC time are
> needed.
>
> > Maybe your distro changed this somehow? The Linux documentation
>
> This is a vanilla kernel (2.6.23.1).
>
> > could be wrong of course. But it appears to still work with the
> > latest Ubuntu kernel.
>
> It just depends on the RTC driver that is loaded at runtime (rtc.ko or
> rtc-cmos.ko, if the latter is provided by the distro).
>
> >
> > I googled fedora core 8, since I've noticed some Fedora users
> > complaining. It looks like /proc/sys/dev/hpet/max-user-freq
> > might work there instead.
>
> I already set this, but it doesn't seem to be sufficient for
> mythfrontend. It still falls back to USleep.
>
> > But this is quickly becoming a discussion for mythtv-users as
> > MythTV can't actually set this, it must be set by the distro,
> > or the distro packagers of MythTV.
>
> When /proc/sys/dev/rtc/max-user-freq is mentioned somewhere in the
> MythTV documentation, then it should be mentioned that this doesn't
> work with the new RTC driver anymore.
>
> Regards,
> Tino
>
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev [at] mythtv
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
>
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


tino.keitel at gmx

Nov 23, 2007, 11:07 AM

Post #15 of 18 (2321 views)
Permalink
Re: OpenGL vsync broken on Intel i945 [In reply to]

On Fri, Nov 23, 2007 at 18:02:23 +0000, Riz wrote:
> IIRC /dev/rtc was renamed to /dev/rtc0. Maybe symlinking it to
> /dev/rtc may enable RTC?

Yes, /dev/rtc is no more. Instead, the devices supported by the
RTC_CLASS device drivers (a computer can have more than one), are named
/dev/rtc[number], where number starts at 0. I aready created the
symlink, otherwise the frontend complains about a missing /dev/rtc.

Regards,
Tino
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


tino.keitel at gmx

Nov 23, 2007, 11:37 AM

Post #16 of 18 (2316 views)
Permalink
Re: OpenGL vsync broken on Intel i945 [In reply to]

On Fri, Nov 23, 2007 at 09:00:26 +0100, Tino Keitel wrote:
> On Thu, Nov 22, 2007 at 19:51:18 -0500, George Nassas wrote:
> > On 22-Nov-07, at 3:21 PM, Tino Keitel wrote:
> >
> > > for some months now I can not use OpenGL vsync with SVN trunk
> > > (currently multirec). When I enable it, LiveTV only shows a short
> > > moment of too fast video every few seconds. I use Xorg with the Intel
> > > driver and Mesa 7.0.2.
> >
> > There's a diagnosis and workaround described here that should get you
> > going:
> >
> > http://www.gossamer-threads.com/lists/mythtv/users/301160#301160
>
> Thanks a lot, that sounds promising.

I now tried a patched driver, and the frontend reports this:

Video timing method: DRM

However, I still have tearing video.

I also enabled OpenGL vsync in the playback settings of the frontend.
This works now with the patched driver, but the tearing didn't get
better.

Regards,
Tino
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


emansl at gmail

Nov 25, 2007, 6:43 PM

Post #17 of 18 (2288 views)
Permalink
Re: OpenGL vsync broken on Intel i945 [In reply to]

On 11/23/07, Tino Keitel <tino.keitel [at] gmx> wrote:
> On Fri, Nov 23, 2007 at 09:00:26 +0100, Tino Keitel wrote:
> > On Thu, Nov 22, 2007 at 19:51:18 -0500, George Nassas wrote:
> > > On 22-Nov-07, at 3:21 PM, Tino Keitel wrote:
> > >
> > > > for some months now I can not use OpenGL vsync with SVN trunk
> > > > (currently multirec). When I enable it, LiveTV only shows a short
> > > > moment of too fast video every few seconds. I use Xorg with the Intel
> > > > driver and Mesa 7.0.2.
> > >
> > > There's a diagnosis and workaround described here that should get you
> > > going:
> > >
> > > http://www.gossamer-threads.com/lists/mythtv/users/301160#301160
> >
> > Thanks a lot, that sounds promising.
>
> I now tried a patched driver, and the frontend reports this:
>
> Video timing method: DRM
>
> However, I still have tearing video.
>
> I also enabled OpenGL vsync in the playback settings of the frontend.
> This works now with the patched driver, but the tearing didn't get
> better.
>
> Regards,
> Tino

Hello,

I've also been having tearing problems with the i945 (intel mac mini)
while using trunk. Changing OSD Renderer from softblend to chromakey
stopped the tearing. The OSD doesn't look as good but it's a good
work-around.

-emmanuel
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


mythtv at woox

Nov 25, 2007, 11:05 PM

Post #18 of 18 (2279 views)
Permalink
Re: OpenGL vsync broken on Intel i945 [In reply to]

If you use the patch I posted earlier, you should be able to use the
normal OSD, and use the chroma-capable Xv adapter, which does not
suffer from tearing problems.

On Nov 26, 2007 2:43 AM, emmanuel <emansl [at] gmail> wrote:
> On 11/23/07, Tino Keitel <tino.keitel [at] gmx> wrote:
> > On Fri, Nov 23, 2007 at 09:00:26 +0100, Tino Keitel wrote:
> > > On Thu, Nov 22, 2007 at 19:51:18 -0500, George Nassas wrote:
> > > > On 22-Nov-07, at 3:21 PM, Tino Keitel wrote:
> > > >
> > > > > for some months now I can not use OpenGL vsync with SVN trunk
> > > > > (currently multirec). When I enable it, LiveTV only shows a short
> > > > > moment of too fast video every few seconds. I use Xorg with the Intel
> > > > > driver and Mesa 7.0.2.
> > > >
> > > > There's a diagnosis and workaround described here that should get you
> > > > going:
> > > >
> > > > http://www.gossamer-threads.com/lists/mythtv/users/301160#301160
> > >
> > > Thanks a lot, that sounds promising.
> >
> > I now tried a patched driver, and the frontend reports this:
> >
> > Video timing method: DRM
> >
> > However, I still have tearing video.
> >
> > I also enabled OpenGL vsync in the playback settings of the frontend.
> > This works now with the patched driver, but the tearing didn't get
> > better.
> >
> > Regards,
> > Tino
>
> Hello,
>
> I've also been having tearing problems with the i945 (intel mac mini)
> while using trunk. Changing OSD Renderer from softblend to chromakey
> stopped the tearing. The OSD doesn't look as good but it's a good
> work-around.
>
> -emmanuel
>
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev [at] mythtv
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
>
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev

MythTV dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.