Re: [mythtv-users] Re: Tearing in playback
Doug Larrick wrote: William Uther wrote: Quick question: how does RTC sync work? RTC stands for Real Time Clock, right? I assume that the frequency has to be higher than the total number of horizontal lines in your X modeline. If myth then got a known sync signal at any point in the image display it could use that to find the blacking period. Do you know at what point in the frame the sync signal is sent and how myth gets it? Actually, the RTC vsync method is not one that synchronizes to the vertical retrace... you have to use /dev/nvidia0, OpenGL, or DRI for that. It simply uses the programmable interrupt timer to sleep for an accurate delay until it's time to display the next frame. That said, it uses less CPU than "usleep with busy wait," so you are more likely to get accurate frame timing. There's still a possibility of tearing, but it will most likely either consistently be OK, or consistently tear (at which point you'll probably get fed up and start playback over). Good explaination, Doug. A couple things. Busy wait only uses ~6% of the CPU time with 100Hz timeslices (6% of the time regardless of the CPU speed ;-). at 1024 it's ~0.6%. The RTC only refreshes on the next 1/1024th of a second whereas busy wait sleeps until delay is close to zero then spins the rest of the way. As it stands right now, busy wait is more accurate. However, without retrace info, either of these are subject to periods of rapid fire jitter. -- bjm ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: [mythtv-users] Re: Tearing in playback
On Friday 07 January 2005 07:45 pm, Doug Larrick wrote: > William Uther wrote: > > Quick question: how does RTC sync work? > > > > RTC stands for Real Time Clock, right? > > I assume that the frequency has to be higher than the total number of > > horizontal lines in your X modeline. If myth then got a known sync > > signal at any point in the image display it could use that to find the > > blacking period. Do you know at what point in the frame the sync signal > > is sent and how myth gets it? > > Actually, the RTC vsync method is not one that synchronizes to the > vertical retrace... you have to use /dev/nvidia0, OpenGL, or DRI for > that. It simply uses the programmable interrupt timer to sleep for an > accurate delay until it's time to display the next frame. That said, it > uses less CPU than "usleep with busy wait," so you are more likely to > get accurate frame timing. There's still a possibility of tearing, but > it will most likely either consistently be OK, or consistently tear (at > which point you'll probably get fed up and start playback over). It shouldn't tear if it's using the right Xv port, though, even with RTC or busy wait. Most drivers sync the flip internally to the retrace. Isaac ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: [mythtv-users] Re: Tearing in playback
William Uther wrote: Quick question: how does RTC sync work? RTC stands for Real Time Clock, right? I assume that the frequency has to be higher than the total number of horizontal lines in your X modeline. If myth then got a known sync signal at any point in the image display it could use that to find the blacking period. Do you know at what point in the frame the sync signal is sent and how myth gets it? Actually, the RTC vsync method is not one that synchronizes to the vertical retrace... you have to use /dev/nvidia0, OpenGL, or DRI for that. It simply uses the programmable interrupt timer to sleep for an accurate delay until it's time to display the next frame. That said, it uses less CPU than "usleep with busy wait," so you are more likely to get accurate frame timing. There's still a possibility of tearing, but it will most likely either consistently be OK, or consistently tear (at which point you'll probably get fed up and start playback over). -Doug signature.asc Description: OpenPGP digital signature ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
[mythtv-users] Re: Tearing in playback
On 08/01/2005, at 12:52 AM, Tom Hughes wrote: [snip] That sounds likely. I'd try checking the other setting with: sysctl dev.rtc.max-user-freq heh: % sysctl dev.rtc.max-user-freq dev.rtc.max-user-freq = 64 If it is less than 1024 then that is probably the problem. You can increase it with: sysctl -w dev.rtc.max-user-freq=1024 and add it to /etc/sysctl.conf to make it permanent. 2005-01-08 09:55:33 nVidiaVideoSync: Could not open device /dev/nvidia0, No such file or directory 2005-01-08 09:55:33 DRMVideoSync: Could not open device /dev/dri/card0, No such file or directory 2005-01-08 09:55:33 Using audio as timebase 2005-01-08 09:55:33 Video timing method: RTC Looks like that was it. :) Quick question: how does RTC sync work? RTC stands for Real Time Clock, right? I assume that the frequency has to be higher than the total number of horizontal lines in your X modeline. If myth then got a known sync signal at any point in the image display it could use that to find the blacking period. Do you know at what point in the frame the sync signal is sent and how myth gets it? Thanks for your help, Will :-} -- Dr William UtherNational ICT Australia Phone: +61 2 9385 6357 School of Computer Science and Engineering Email: [EMAIL PROTECTED] University of New South Wales Web: http://www.cse.unsw.edu.au/~willu/Sydney, Australia ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
[mythtv-users] Re: Tearing in playback
In message <[EMAIL PROTECTED]> William Uther <[EMAIL PROTECTED]> wrote: > On 07/01/2005, at 9:51 PM, Tom Hughes wrote: > >> If you're root then that seems odd. The only things I would have >> thought likely to do that are the permissions on /dev/rtc which >> should be irrelevant as root can open any file. The other thing >> would be the dev.rtc.max-user-freq kernel configuration value but >> that only limits non-root users. >> >> Maybe your kernel (or your hardware) has some hard limit on the >> setting of the RTC frequency? > > I guess I lied slightly. :) I'm running the front end setuid root. > Maybe the front end is dropping root privs in the relevant thread > before trying to do what it is doing? Hmm, /dev/rtc is rw by group > audio, and user mythtv is in that group. That sounds likely. I'd try checking the other setting with: sysctl dev.rtc.max-user-freq If it is less than 1024 then that is probably the problem. You can increase it with: sysctl -w dev.rtc.max-user-freq=1024 and add it to /etc/sysctl.conf to make it permanent. Tom -- Tom Hughes ([EMAIL PROTECTED]) http://www.compton.nu/ ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: [mythtv-users] Re: Tearing in playback
William Uther wrote: On 07/01/2005, at 9:51 PM, Tom Hughes wrote: [snip] If you're root then that seems odd. The only things I would have thought likely to do that are the permissions on /dev/rtc which should be irrelevant as root can open any file. The other thing would be the dev.rtc.max-user-freq kernel configuration value but that only limits non-root users. [snip] I guess I lied slightly. :) I'm running the front end setuid root. Maybe the front end is dropping root privs in the relevant thread before trying to do what it is doing? Hmm, /dev/rtc is rw by group audio, and user mythtv is in that group. Then your problem with RTC timing is almost certainly /proc/sys/dev/rtc/max-user-freq -Doug signature.asc Description: OpenPGP digital signature ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
[mythtv-users] Re: Tearing in playback
On 07/01/2005, at 9:51 PM, Tom Hughes wrote: The first line makes sense - I don't have an NVIDIA card :). I'm confused as to why RTC is giving permission denied - I'm running my front end as root. I've got things to look at now - Thanks. If you're root then that seems odd. The only things I would have thought likely to do that are the permissions on /dev/rtc which should be irrelevant as root can open any file. The other thing would be the dev.rtc.max-user-freq kernel configuration value but that only limits non-root users. Maybe your kernel (or your hardware) has some hard limit on the setting of the RTC frequency? I guess I lied slightly. :) I'm running the front end setuid root. Maybe the front end is dropping root privs in the relevant thread before trying to do what it is doing? Hmm, /dev/rtc is rw by group audio, and user mythtv is in that group. I'm looking into building an Xorg server with DRM... we'll see how it goes :) Will :-} -- Dr William UtherNational ICT Australia Phone: +61 2 9385 6357 School of Computer Science and Engineering Email: [EMAIL PROTECTED] University of New South Wales Web: http://www.cse.unsw.edu.au/~willu/Sydney, Australia ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
[mythtv-users] Re: Tearing in playback
In message <[EMAIL PROTECTED]> William Uther <[EMAIL PROTECTED]> wrote: > On 06/01/2005, at 11:00 PM, [EMAIL PROTECTED] wrote: > >> If you start the frontend with "-v playback" then the log messages >> should include something like this when you start watching something: > > Thank you very much for this. I get: > > 2005-01-07 17:30:24 nVidiaVideoSync: Could not open device > /dev/nvidia0, No such file or directory > 2005-01-07 17:30:24 DRMVideoSync: Could not open device > /dev/dri/card0, No such file or directory > 2005-01-07 17:30:24 RTCVideoSync: Could not set RTC frequency, > Permission denied. > 2005-01-07 17:30:24 Using audio as timebase > 2005-01-07 17:30:24 Video timing method: USleep with busy wait > > The first line makes sense - I don't have an NVIDIA card :). I'm > confused as to why RTC is giving permission denied - I'm running my > front end as root. I've got things to look at now - Thanks. If you're root then that seems odd. The only things I would have thought likely to do that are the permissions on /dev/rtc which should be irrelevant as root can open any file. The other thing would be the dev.rtc.max-user-freq kernel configuration value but that only limits non-root users. Maybe your kernel (or your hardware) has some hard limit on the setting of the RTC frequency? Tom -- Tom Hughes ([EMAIL PROTECTED]) http://www.compton.nu/ ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
[mythtv-users] Re: Tearing in playback
On 06/01/2005, at 11:00 PM, [EMAIL PROTECTED] wrote: What sync method are you using? I'm on RTC because the ATrpms build of 0.16 seems to have OpenGL sync turned off and when I rebuilt with it on something chewed so much CPU that playback kept breaking up. I use the same rpm as you (ATRPMS FC2 0.16), so my bet is RTC. But where do you configure the type of video sync used. Or is that a build option? I do not have an OpenGL enabled driver (Xorg Radeon), so I can't use that. I'm using the Dijkstra MythTV deb packages - 0.16. I assume it has most sync methods compiled in. It tries each sync type in order until it finds one that works. OpenGL is only included if you specify it at build time however. I'm guessing the Dijkstra debs don't have OpenGL syncing compiled in as it is not tested (trace below). If you start the frontend with "-v playback" then the log messages should include something like this when you start watching something: Thank you very much for this. I get: 2005-01-07 17:30:24 nVidiaVideoSync: Could not open device /dev/nvidia0, No such file or directory 2005-01-07 17:30:24 DRMVideoSync: Could not open device /dev/dri/card0, No such file or directory 2005-01-07 17:30:24 RTCVideoSync: Could not set RTC frequency, Permission denied. 2005-01-07 17:30:24 Using audio as timebase 2005-01-07 17:30:24 Video timing method: USleep with busy wait The first line makes sense - I don't have an NVIDIA card :). I'm confused as to why RTC is giving permission denied - I'm running my front end as root. I've got things to look at now - Thanks. Be well, Will :-} -- Dr William UtherNational ICT Australia Phone: +61 2 9385 6357 School of Computer Science and Engineering Email: [EMAIL PROTECTED] University of New South Wales Web: http://www.cse.unsw.edu.au/~willu/Sydney, Australia ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users