Please mail/cc me at with any relevant information! Update 7 sept 2005: Installed Breezy, Colony 3. The problem has reappeared. It's very clear that dropping frequency causes a (roughly) 1 sec system freeze. (I've no idea why, but my Hoary installation lost this behavior at some point, and I reenabled frequency scaling) Update 17 jun 2005: (I've forgotten to update this log lately.) I've "solved" the problem by disabling scaling, just running the "performance" governor. No frequency drop, no pause. (i.e. "echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor) Update 27 apr 2005: Tried the stock 2.6.11.7 kernel from kernel org. Frequency scaling works, and scaling down still pauses the computer. (I.e. either mingo's patches or something in 2.6.12-rc2 breaks frequency scaling) Using 'cat' on the frequency scaling stuff in /sys causes a segv(!) on 2.6.12-rc2 w/ Ingo's patches. Update 22 apr 2005: I realize there are some other differences between my kernel and the stock one: CPU freq applet no longer works, and neither does GHC profiling. One of the bugzilla or forum threads was about performance problem and CPU frequency scaling, ISTR it was AMD specific, but could that be the problem? A latency issue in the frequency scaling module? Okay, I made a quick test: 1. CPU on low frequency. 2. Run CPU- intensive program. 3. Check that CPU switches to high freq. 4. ^C the program. 5. keep moving the mouse while keeping an eye on the CPU freq applet. There is a very noticable lag at exactly the moment the CPU-freq applet switches to display the lower frequency! This also causes the sound to cycle. Here's the bug: https://bugzilla.ubuntu.com/show_bug.cgi?id=7121 Update 18 apr 2005: It's official - the segfaults were just caused by incorrect libGL (and friends?) left over from the nvidia module. Removing the nvidia packages gives a working xmms with the message: libGL.so: cannot open shared object file: nsfod Update 13 apr 2005: Rebooted with ACPI on, but still using "nv" driver. Also commented in the GLCore and DRI modules. No perceptible difference, xmms still segfaults, but mpg123 plays smoothly. It seems the the latency problem is mainly with the nvidia module? Update 12 apr 2005: Rebooted, now with acpi=off. Failed to bring up nvidia driver, xmms et al. segfault. mpg123 plays without a hitch, not able to make it skip ... so far. But latencytest shows a lot more overruns than with acpi and nvidia, though. (Should test acpi=on+nvidia and mpg123 instead of xmms) * * * Running latencytest on 2.6.12-rc2 +mingo-patches, X the display hangs solid (and lots of evnts are lost) whenever sound is output. The results show almost all latencies <1ms, though. Perhaps the sound is really due to some IRQ problem? Update 11 apr 2005: Apparently, other people have problems also, and Ingo has been working on this: http://people.redhat.com/mingo/realtime-preempt/ So far, the patch seems to have gotten rid of the lagging X response, although I still have choppy sound... Lots of debug output (dmesg) that I don't understand. * * * Tried again with acpi=off. Now xmms and gmplayer both segfault! OTOH, mpg123 plays more smoothly -- but I still get the occasional repeat, and laggy interactivity. *sigh* * * * This is getting surreal. I got a word document in mail. Opening it from Gnus/XEmacs, everything goes smoothly. Opening it from command line, I get laggy playback. I even use the same file in /tmp. I've tried it a lot of times. WTF? It's all ReiserFS and device mapper-- could that be the problem? Do I really need to reinstall? Shit. * * * Checked out a box with CentOS. Firefox doesn't affect mp3 playback, but changing transparency of gnome-term gives a short interruption. Seems to have smooth response otherwise. * * * Not sure how reliable this is, but I tried to 'strace -T' gnome-terminal while dragging the window (ie. breaking playback). I then grepped for delays > 0.01s: poll([{fd=6, events=POLLIN}, {fd=12, events=POLLIN|POLLPRI, revents=POLLIN}, {fd=13, events=POLLIN|POLLPRI}, {fd=14, events=POLLIN|POLLPRI}, {fd=16, events=POLLIN|POLLPRI}, {fd=15, events=POLLIN|POLLPRI}], 6, -1) = 1 <0.049311> read(17, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`\6\0\000"..., 512) = 512 <0.013690> read(17, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`\6\0\000"..., 512) = 512 <0.011541> ..more read/write/polls/ioctl/select. These *do* preempt, right? These system calls account for ~all calls > 0.5ms time. * * * Installed 2.6.12-rc2. Same crap - if I start playing an mp3, and then open Firefox, playback will still interrupt and/or stutter (cycle short fragments). Ditto for switching workspaces to/from firefox. * * * Discussing this with a colleague, I discover this is also a problem on a bunch of CentOS-machines -- using a 2.4 kernel! Update 10 apr 2005: Browsed the LKML archives. Latency in 2.6 with network traffic: http://www.uwsg.iu.edu/hypermail/linux/kernel/0503.3/1018.html http://www.uwsg.iu.edu/hypermail/linux/kernel/0503.3/1044.html Latency.c to measure latency: http://www.uwsg.iu.edu/hypermail/linux/kernel/0409.0/1490.html USB-related? latency problems: http://www.uwsg.iu.edu/hypermail/linux/kernel/0504.0/0156.html 2.6.12rc1 may have fixed latency related to 4-level page tables (I will test it) http://www.uwsg.iu.edu/hypermail/linux/kernel/0503.2/0822.html Downloaded and installed 2.6.11.7 from kernel.org. Same difference - I still get lags in X responsiveness. Update 7 apr 2005: Tried the older 2.6.8-5 kernel, and nv drivers. I'm not able to block playback entirely, but I still get lagging causing mp3 playback to cycle (buffer that doesn't get refilled?) I think this is the same as 2.6.10 with ACPI disabled. Background Dell C810, PIII 1.13GHz, 512Mb, GeForce2Go 32Mb Ubuntu Hoary with Gnome 2.10 and nvidia drivers (7174 and earlier) Tested both linux-image-2.10-5, 386 and 686 versions Problem description X performs erratically, response occasionally lags 0.5-1 seconds The Xorg process consumes extreme amounts of CPU - 80-90% while moving a window Noticeable, but not extremly annoying, window flicker when dragging. Loading a page in firefox blocks other tasks completely, e.g. mp3 playback Ubuntu Hoary (Gnome 2.8 had no such problem) Observations - Transparent background *severely* increases the magnitude of the problem - This has been observed in Hoary for some months, upgrades have not fixed it - Option RenderAccel in xorg.conf or the nvidia-agp module do not help. - Disbling Composite doesn't seem to help - CPU use increases for top in a gnome-terminal, and dragging still chops mp3 playback. - Ditto for the DAMAGE extension. - Replacing Metacity with xfwm4 does not change the behavior noticably either. - This affects Gnome applications, in particular, dragging around an Xterm does not show the same CPU consumption, and can be dragged without any bad effect. - But Firefox is also affected (i.e. loading pages interrupts playback) - Using "nv" instead of "nvidia" driver seems to be slightly better, but dragging gnome-terminals still cause interrupts in playback. - I'm not able to cause any adverse effects with Gimp 2.2.2 and either nv or nvidia driver. - Some sources claim reiserfs is to blame for poor latency, but running updatedb doesn't affect mp3 playback. Test: 1. set gmplayer to play an mp3 2. drag an xterm over it -- playback is smooth 3. drag a gnome-term over it -- playback stutters/interrupts Hmm... there could be two different problems: performance of (transparent) gnome-terms etc, *and* a latency problem somewhere, possibly in the nvidia driver or even the kernel. I experience the lags when only moving the mouse on an otherwise relatively idle machine. No process seems to consume much CPU, but the display visibly hangs. This could well play a part in the choppy mp3 playback, and be worsened by the performance issue. I've run latencytest, the results are at: http://www.ii.uib.no/~ketil/latency_test/html/3x256.html During this test, I was unable to move the mouse smoothly at all -- traversal of the pointer from left to right was done in three or four jumps. Similar results when kernel is upgraded from -386 to -686. References to similar problems: http://www.ubuntuforums.org/printthread.php?t=18197 http://bugzilla.gnome.org/show_bug.cgi?id=135739 https://bugzilla.ubuntu.com/show_bug.cgi?id=8756 Apparently, ACPI can cause something similar: https://bugzilla.ubuntu.com/show_bug.cgi?id=8412 disabling ACPI *seems* to have made things slightly more robust, but I still get repeats in the mp3 playback. Latencytest without acpi: http://www.ii.uib.no/~ketil/latency_acpi=off/html/3x256.html Librares used by Gimp (-) and gnome-terminal (+): --- gimp.ldd.cut 2005-04-06 10:49:00.522758328 +0200 +++ gt.ldd.cut 2005-04-06 10:49:00.528757416 +0200 @@ -1,34 +1,59 @@ libart_lgpl_2.so.2 => libatk-1.0.so.0 => + libaudiofile.so.0 => + libbonobo-2.so.0 => + libbonobo-activation.so.4 => + libbonoboui-2.so.0 => libc.so.6 => libdl.so.2 => + libesd.so.0 => libexpat.so.1 => libfontconfig.so.1 => libfreetype.so.6 => + libgconf-2.so.4 => + libgcrypt.so.11 => libgdk_pixbuf-2.0.so.0 => libgdk-x11-2.0.so.0 => - libgimpbase-2.0.so.0 => - libgimpcolor-2.0.so.0 => - libgimpmath-2.0.so.0 => - libgimpmodule-2.0.so.0 => - libgimpthumb-2.0.so.0 => - libgimpwidgets-2.0.so.0 => + libglade-2.0.so.0 => libglib-2.0.so.0 => libgmodule-2.0.so.0 => + libgnome-2.so.0 => + libgnomecanvas-2.so.0 => + libgnome-keyring.so.0 => + libgnomeui-2.so.0 => + libgnomevfs-2.so.0 => + libgnutls.so.11 => libgobject-2.0.so.0 => + libgpg-error.so.0 => + libgthread-2.0.so.0 => libgtk-x11-2.0.so.0 => + libICE.so.6 => + libjpeg.so.62 => libm.so.6 => + libncurses.so.5 => + libnsl.so.1 => + libORBit-2.so.0 => + libORBitCosNaming-2.so.0 => libpango-1.0.so.0 => libpangoft2-1.0.so.0 => libpangox-1.0.so.0 => libpangoxft-1.0.so.0 => + libpopt.so.0 => + libpthread.so.0 => + libresolv.so.2 => + librt.so.1 => + libSM.so.6 => + libstartup-notification-1.so.0 => + libtasn1.so.2 => + libvte.so.4 => libX11.so.6 => libXcursor.so.1 => libXext.so.6 => libXft.so.2 => libXinerama.so.1 => libXi.so.6 => + libxml2.so.2 => libXrandr.so.2 => libXrender.so.1 => libz.so.1 =>