MPlayer can use the RTC device to synchronise audio and video very accurately. This is necessary on some of the software based el-cheapo soundchips that motherboards come with. A friend of mine has one of these. When watching movies as root, all is fine, but as normal user (where MPlayer doesn't have access to the RTC), the sound runs away. I've seen this on a few boards, one of them was a Gigabyte GA-7DXE. MPlayer docs suggest either making the RTC readable by normal users (I did a chmod a+r /dev/rtc, but it still didn't work), or installing MPlayer suid. How do I do this? I tried stuff like man suid or man setuid, with no luck. Thanks Hans == Download ringtones, logos and picture messages at Ananzi Mobile Fun. http://www.ananzi.co.za/cgi-bin/goto.pl?mobile
On Thursday 05 December 2002 11:29, H du Plooy wrote:
MPlayer can use the RTC device to synchronise audio and video very accurately. This is necessary on some of the software based el-cheapo soundchips that motherboards come with. A friend of mine has one of these.
Do you know the exact technical reasons for this? I'm just curious. Does the soundcard offload too much onto the CPU or something?
When watching movies as root, all is fine, but as normal user (where MPlayer doesn't have access to the RTC), the sound runs away. I've seen this on a few boards, one of them was a Gigabyte GA-7DXE.
MPlayer docs suggest either making the RTC readable by normal users (I did a chmod a+r /dev/rtc, but it still didn't work), or installing MPlayer suid.
Just FYI, from the mplayer man page: -softsleep Uses high quality software timers. Efficient as the RTC, doesn't need root, but requires more CPU. I don't know how effective this actually is, though, as I have no problems on my el-cheapo onboard soundcard. :) [I'm using an EPoX 8K5A2.]
How do I do this? I tried stuff like man suid or man setuid, with no luck.
The syntax is as follows (of course, you will need to be root to change the permissions of most system files): chmod +s `which command_to_make_setuid` e.g., chmod +s `which mplayer` I think there's a better solution printed out by MPlayer itself: $ mplayer some_file.avi [snip] Linux RTC init error in ioctl (rtc_irqp_set 1024): Permission denied Try adding "echo 1024 > /proc/sys/dev/rtc/max-user-freq" to your system startup scripts. Using usleep() timing [snip] $ su Password: # cat /proc/sys/dev/rtc/max-user-freq 64 # echo 1024 > /proc/sys/dev/rtc/max-user-freq # exit exit $ mplayer some_file.avi [snip] init_freetype Using Linux hardware RTC timing (1024Hz) [snip] NOTE: world needs read permissiont to /dev/rtf. i.e., 'chmod a+r /dev/rtf` As you can tell from the output above, I did what MPlayer recommends and it worked. No need to make mplayer suid root. -- Karol Pietrzak <noodlez84@earthlink.net> PGP KeyID: 3A1446A0
On Thu, 05 Dec 2002 12:31:14 -0500 Karol Pietrzak <kap4020@osfmail.isc.rit.edu> wrote:
Do you know the exact technical reasons for this? I'm just curious. Does the soundcard offload too much onto the CPU or something?
I suspect that it has something to do with the sound driver or the way that mplayer communicates with it, combined with the fact that most of these onboard sound chips are largely software driven (just check out their CPU usage on a slower machine). This perticular machine is an Athlon 1800+ and the sound plays a bit too fast (with raised pitch and all). I might be wrong about the why though.
Just FYI, from the mplayer man page:
-softsleep
Doesn't work in this case.
chmod +s `which command_to_make_setuid`
Thanks!
I think there's a better solution printed out by MPlayer itself:
$ mplayer some_file.avi [snip] Linux RTC init error in ioctl (rtc_irqp_set 1024): Permission denied Try adding "echo 1024 > /proc/sys/dev/rtc/max-user-freq" to your system startup scripts.
I tried but it didn't work - turns out that there is no such directory and file. I don't know if I'm supposed to create it by hand - I'll play with it some more. Thanks Hans == Download ringtones, logos and picture messages at Ananzi Mobile Fun. http://www.ananzi.co.za/cgi-bin/goto.pl?mobile
On Saturday 07 December 2002 07:52, H du Plooy wrote:
I suspect that it has something to do with the sound driver or the way that mplayer communicates with it, combined with the fact that most of these onboard sound chips are largely software driven (just check out their CPU usage on a slower machine). This perticular machine is an Athlon 1800+ and the sound plays a bit too fast (with raised pitch and all). I might be wrong about the why though.
OK, thanks for the info. I know that my sound card (builtin on my EPoX 8K5A2) uses up huge amounts of CPU time on my 1.6GHz Athlon XP. Good thing I don't listen to much of anything.
chmod +s `which command_to_make_setuid`
Thanks!
NP.
$ mplayer some_file.avi [snip] Linux RTC init error in ioctl (rtc_irqp_set 1024): Permission denied Try adding "echo 1024 > /proc/sys/dev/rtc/max-user-freq" to your system startup scripts.
I tried but it didn't work - turns out that there is no such directory and file. I don't know if I'm supposed to create it by hand - I'll play with it some more.
Perhaps you don't have RTC support in your kernel. Are you using the default SuSE kernel? What does the output of the following command say?: $ dmesg | grep -i "real time clock" Real Time Clock Driver v1.10e $ -- Karol Pietrzak <noodlez84@earthlink.net> PGP KeyID: 3A1446A0
participants (2)
-
H du Plooy
-
Karol Pietrzak