I have Fedora Core 6 and vdr installed using yum. The problem is that it takes all the cpu time after boot and I have to restart vdr to make it run properly. I have vdr-1.4.4 with softdevice-0.3.1 and subtitles-0.4.0. My cpu is PIII 550MHz and I use softdevice with Matrox G400 (and DirectFB). After restarting vdr it works fine but that is not very convenient :) I've tried changing the point when vdr starts by modifying the init scripts chkconfig values.
After restarting vdr cpu load is about 60%.
Any hints? I.e. how/when should matroxfb kernel module be loaded? Now I load it in rc.modules.
\Kartsa
In 45ACF11B.7010600@kniivila.com, Kartsa wrote:
You could try the xine output plugin with df_xine instead. It's better at A/V sync than softdevice IME, and you can turn the video on and off to save power, or to watch something else, eg a DVD, while VDR is still running in the background for recording etc. Use http://boxstar.sourceforge.net to tie it all together all under the control of one remote.
In 45AD23CC.4050905@kniivila.com, Kartsa wrote:
I've never tried xine plugin. Does it need X to work?
The plugin doesn't really care what version of xine you use to connect to it. df_xine is a version of xine that uses DirectFB instead of X. I use it myself on a Matrox G450.
On Tue, Jan 16, 2007 at 05:36:59PM +0200, Kartsa wrote:
Any hints? I.e. how/when should matroxfb kernel module be loaded? Now I load it in rc.modules.
Have you tried OProfile or strace -p <pid of vdr>, or attaching gdb to the running vdr process?
I'm using a statically compiled matroxfb. I've used vdr+softdevice for almost 2 years now, and I haven't had any problems for about a year. (I reported quite a few issues that were fixed.)
A few times during the two years, I've seen softdevice displaying fewer than one frame per second, running at very low CPU consumption. I presume that there is some race condition in the thread setup. You might be running into a similar problem. Post some debugging results, and we'll see.
Marko Mäkelä kirjoitti:
Hmm, what's OProfile? I am not quite sure if I am starting matroxfb in the right place. For some reason I can not get it to load automatically with udev settings. There is a
I selected vdr+softdevice with matrox because I've read so many good things about it. Like small cpu resource needs since I've got only PII 550. And one reason is also the lack of A/V sync problem. My other vdr is with FF card and I have A/V sync problems every single day at least once.
What should I do to get debugging info since there is nothing in the syslog. Log shows that vdr seems to have started normally and I can get a picture which ofcource is a slideshow of still pictures because of the cpu load. Normally changing to a radiostation drops cpu load to some 5% but even that dont have any effect. Only restarting vdr helps.
Can poor antenna signal cause something like this? Normally I have cable at home and I and constructing a "new" vdr to be taken to my summer home where we have aerial. At home my dvb-t signal if avfully poor.
On Tue, Jan 16, 2007 at 09:53:21PM +0200, Kartsa wrote:
OProfile is a continuous profiler for processors that contain performance counters, such as CPU_CLK_UNHALTED (which is incremented on every clock cycle when the processor is unhalted). Similar tools include DCPI on Digital UNIX and Intel VTune on Windows.
For some reason I can not get it to load automatically with udev settings. There is a
There is a what?
You could add matroxfb to /etc/modules.
I have a Celeron running at 900 MHz, and the CPU load is around 60%. The VGA output of the Matrox saves some 10% or 20% of CPU, because the colour space transformation can be avoided. But I'm using the TV output with a self-built Matrox to SCART cable.
What should I do to get debugging info since there is nothing in the syslog.
Attach strace to the vdr process to see the system calls. Redirect the output to a file, and kill vdr after a couple of seconds.
Or start OProfile with opcontrol for a few seconds during the CPU diversion. After opcontrol --stop, you can view the statistics with something like opreport -l /path/to/vdr|less
I don't know if the Pentium II implements any performance counters. I've only run OProfile on Celeron and later processors from Intel and AMD.
Poor antenna signal used to crash softdevice, but I'm not sure about the CPU load. I usually have very good reception, so I cannot say. Does it make any difference if you suspend the output of softdevice?
Marko
Marko Mäkelä kirjoitti:
There was something braking my thoughts. Dont really know now what I was going to say :) I'll get back to that if it comes to mind.
You could add matroxfb to /etc/modules.
There is no /etc/modules file in FC but there is rc.modules in which I have matroxfb.
I have a self-built cable also.
My typo, I ment PIII 550 :)
I have to test this out. top shows that its vdr that takes all the cpu but I hav to use one of the methods you mentioned to check the real reason.
Marko Mäkelä kirjoitti:
Tried with strace and got
gettimeofday({1169044896, 580954}, NULL) = 0 clock_gettime(CLOCK_REALTIME, {1169044896, 581713131}) = 0 futex(0x81dc204, FUTEX_WAIT, 6667, {0, 999240869}) = -1 ETIMEDOUT (Connection timed out) gettimeofday({1169044897, 905042}, NULL) = 0 futex(0x81dc1d8, FUTEX_WAKE, 1) = 0 time(NULL) = 1169044897 time(NULL) = 1169044897 time(NULL) = 1169044897 time(NULL) = 1169044897 time(NULL) = 1169044897 alarm(30) = 29 time(NULL) = 1169044897 time(NULL) = 1169044897 time(NULL) = 1169044897 time(NULL) = 1169044897 stat64("/srv/vdr/.update", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0 time(NULL) = 1169044897 gettid() = 2600 time(NULL) = 1169044898 accept(23, 0xbfc07588, [16]) = -1 EAGAIN (Resource temporarily unavailable)
over and over again. This was with vdr's pid.
And this is oprofiler output
CPU: CPU with timer interrupt, speed 0 MHz (estimated) Profiling through timer interrupt samples % image name symbol name 9500 98.0595 anon (tgid:2600 range:0x48c000-0x48d000) (no symbols) 188 1.9405 vdr (no symbols)
And it is the same results after I restart vdr. The difference is that before restart vdr caused cpu load of 99,5% and after restart vdr caused cpu load of 1%. And this is because of the channel being a radio channel.
Oprofilers output is slightly different
CPU: CPU with timer interrupt, speed 0 MHz (estimated) Profiling through timer interrupt samples % image name symbol name 9500 96.7216 anon (tgid:2600 range:0x48c000-0x48d000) (no symbols) 313 3.1867 vdr (no symbols) 9 0.0916 anon (tgid:4479 range:0xf5a000-0xf5b000) (no symbols)
I suspended softdevice output from the settings but it made no change. Still after reboot vdr takes all cpu time. When I changed softdevice playback setting to playing from the main menu it caused restart of vdr and cpu load dropped to normal (~60%). So suspending did not help either.
I tried also plugin option -vo shm: to see the effect and this dropped cpu load of vdr to 2%. But this is ofcourse not usable
\Kartsa
On Wed, Jan 17, 2007 at 06:43:04PM +0200, Kartsa wrote:
accept(23, 0xbfc07588, [16]) = -1 EAGAIN (Resource temporarily unavailable)
This doesn't feel right. It would make sense to monitor connection attempts with select(2) or to use a blocking call.
Please try appending "lapic" to the kernel command line. The timer interrupt is the last resort to use when the performance counters are unavailable.
Please compile softdevice and vdr with -g, or at the very least do not strip them. We're interested in the function names.
I suspended softdevice output from the settings but it made no change. Still after reboot vdr takes all cpu time.
I would suspect that you haven't set up TCP/IP networking before starting vdr for the first time.
Have you applied any patches to vdr? I don't think that this is affected by softdevice at all.
Marko
Marko Mäkelä kirjoitti:
I have to test this out also.
What do you mean by -g? Where does that option go? I must point out that I am quite a novice in linuxe still.
I did make a working linux box with all updates before even installing vdr.
Have you applied any patches to vdr? I don't think that this is affected by softdevice at all.
As I said in the first post (and some lines up) I set this box up by first installing FC6 and updating it. Then by using yum installed vdr and subtitles plugin. Then I downloaded vdr source and used it to compile softdevice because there is no ready made package for it. I downloaded also subtitles plugin to have vdr compiled as the yum installed version. Somewhere in the middle I also installed DirectFB. Now that I try to think afterwards what I did and when I am not sure about anything. I wanted to use yum to get all installed as easily as possible. Maybe I should get FF card and forget softdevice - its much easier :) Thats how I have my other vdr box. Maybe I'll start from the scratch and install everything in right order.
I made a test and recompiled vdr and plugins and put starting command in rc.local. Now it starts ok and cpu load is about 60%. But if I let FC6 initscript start vdr I get 99%cpu load on startup.
\Kartsa
On Wed, Jan 17, 2007 at 10:16:55PM +0200, Kartsa wrote:
The -g option of gcc requests the inclusion of debugging symbols to the executable. Without -g, symbols with static linkage would be excluded from the object files. AFAIK, also the native cc of proprietary Unix platforms follow that convention.
Can you add the line
(/sbin/ifconfig; /sbin/route -n) > /tmp/inet.txt
to the script that starts vdr, right before the vdr command? That would answer my question if TCP/IP networking is set up before vdr is started for the first time.
This is another hint that the original init script might be run before configuring TCP/IP networking.
Marko
Marko Mäkelä kirjoitti:
I have not yet tried this but I did set up networking before installing vdr. I this for I did a network installation and updated everything before installing vdr.
I actually fixed this now by not letting vdr start by the system init but added "/etc/init.d/vdr start" in rc.local. Maybe the 550 PIII is just too slow in an environment where is matrox G400 and DirectFB :)
\Kartsa
On Fri, Jan 26, 2007 at 08:44:50PM +0200, Kartsa wrote:
I meant that vdr probably should be started later in the boot process than TCP/IP networking.
Possibly. I'm using softdevice-dfb on Matrox G450, but the processor is a 900 MHz Celeron. I found the VGA output to be 10% or 20% less CPU intensive than the TV output, which I am currently using.
Marko
Marko Mäkelä kirjoitti:
Ok, then I misunderstood. I did try to make vdr start later by changing its start order Now anyway network is started before vdr.
Vdr is taking about 60% of cpu time with softdevice on my 550MHz PIII. I ment that maybe 550 is too slow when vdr is started in the system initialization causing network to start slower and thus making it a problem. Maybe if I had waited long enough it would have stabilized.
\Kartsa