Announcement

Collapse
No announcement yet.

Strangest Linux Problem Ever

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Strangest Linux Problem Ever

    Hello Phoronix,

    I have been having the most annoying problem with Linux (particularly my 64bit Ubuntu distribution) for many years now.

    It is as follows:
    3D/2D accelerated OpenGL applications sometimes (but more often than not) use up all of my CPU! (screenshot from my old PC)
    Yes, that is right. When I run a game or app such as xmoto, openttd, mupen64plus... It may use very little CPU (the way it's supposed to work) OR it will hog up all of the CPU.
    Usually when I run such an application it will be hogging the CPU. When I close it, and reopen it, it will work fine. When I close it again and reopen it, it will be hogging the CPU again. It seems to be random.

    It gets better:
    I have actually bought a new graphic card (ATI now, had nvidia previously). The problem is still here.
    I have bought a new motherboard. The problem persists.
    I have bought a new CPU (AMD 3500+ previously, AMD X4 640 now). The problem persists.
    I have bought new RAM. The problem persists.
    I have wiped my /home and my OS and reinstalled it. The problem persists.

    Basically I've bought a new computer (except the case, the PSU, the hard drives and the sound card) and reinstalled the OS, and I'm still getting this problem.
    This leads me to believe that either I am cursed or that X is deeply broken in Ubuntu.

    What do the experts of Phoronix have to say about this?
    Thanks for whatever answers/help I may get!

  • #2
    This is normal if you don't have VSync enabled. What happens is that without VSync, the 3D application will render with hunders, even thousands of frames per second (FPS). This stresses CPU and GPU to their maximum. Even glxgears without VSync eats 90% of one core here (and runs at 5000FPS). Enabling VSync fixes the problem.

    This is by no means a Linux problem. Exactly the same applies to Windows and other systems.

    You can enable VSync in Catalyst Control Center if you're using the binary drivers (3D->More Settings->Wait for vertical refresh->On, unless application specifies).

    If you're using the open source drivers, you might be able to enable it with the "driconf" utility.

    Comment


    • #3
      It happens no matter what my VSync setting is. And even if it did matter, why does it sometimes happen and sometimes doesn't (using the same setting)?

      And glxgears is a special case. It doesn't do any throttling (as the other games do) and will always eat up your CPU if you don't have vsync enabled.

      EDIT:
      Also here is more proof that you are wrong. A screenshot from my laptop, where everything works as expected (no CPU hogging): http://img193.imageshack.us/img193/4...ectnovsync.png. As you can see VSync is off.
      3D/2D apps (except glxgears) should NOT use all of your CPU even if VSync is off. This has to be a Linux/X/Ubuntu bug of some sort.
      Last edited by unimatrix; 10-27-2009, 10:29 AM.

      Comment


      • #4
        Maybe it's the strangest nvidia problem? Did you post a bug report somewhere?

        Comment


        • #5
          As I've said. I've switched my graphic card FROM nVidia TO ATI and the problem did not go away.
          Last edited by unimatrix; 10-27-2009, 10:30 AM.

          Comment


          • #6
            What type of soundcard do you have there... If the application is having difficulty getting control of the soundcard it might manifest in the behaviour you are seeing. Try running the applications with sound dissabled.

            Comment


            • #7
              Originally posted by kayosiii View Post
              What type of soundcard do you have there... If the application is having difficulty getting control of the soundcard it might manifest in the behaviour you are seeing. Try running the applications with sound dissabled.
              Oh my... You're right.
              I just took the sound card out of my computer, and the problem went away.

              Well this sucks, because I paid a lot for it.
              It's an Echo Gina 3G, using the driver module snd_echo3g with alsa & pulseaudio (strangely pulseaudio itself seems to work fine all the time).
              I actually had to use the Medibuntu repository to install the alsa-firmware package to make it work.

              So what are my options now?
              Last edited by unimatrix; 10-28-2009, 03:37 PM.

              Comment


              • #8
                Well, try without pulseaudio and let the game use ALSA directly. Also try ALSA's OSS support just to check.

                Comment


                • #9
                  Best thing to do is to rip pulseaudio out of the system entirely. Unfortunately you're using Ubuntu so that's not an option; it infects everything right down to gdm.

                  Comment


                  • #10
                    Like the others I would tend to suspect pulse-audio as the culprit. I would try removing it from the system temporarily. and see if that aleviates the problem.

                    The following forum thread discusses how to remove pulse audio from jaunty.
                    http://ubuntuforums.org/showthread.php?t=1193561
                    good luck.

                    Otherwise a few other things to try -
                    1) check the seating of the card, have a look at the contacts I had an old soundcard (audiowerks2) that was very sensitive to this as it got older.
                    2) talk to the alsa developers about the specifics of your soundcard.

                    Comment


                    • #11
                      Originally posted by Ant P. View Post
                      Best thing to do is to rip pulseaudio out of the system entirely. Unfortunately you're using Ubuntu so that's not an option; it infects everything right down to gdm.
                      Thankfully Kubuntu doesn't use it. There's some pulseaudio package installed, but It's not running.

                      Comment


                      • #12
                        Solution

                        Problem solved!

                        It was this bug:
                        https://bugs.launchpad.net/ubuntu/+s...rs/+bug/454879
                        It's an SDL audio issue, and virtually all linux OpenGL games are SDL-based.

                        So the solution was to remove libsdl1.2debian-alsa and install libsdl1.2debian-pulseaudio.
                        Go figure right?

                        Comment


                        • #13
                          Originally posted by unimatrix View Post
                          Problem solved!

                          It was this bug:
                          https://bugs.launchpad.net/ubuntu/+s...rs/+bug/454879
                          It's an SDL audio issue, and virtually all linux OpenGL games are SDL-based.

                          So the solution was to remove libsdl1.2debian-alsa and install libsdl1.2debian-pulseaudio.
                          Go figure right?

                          Great to hear this is fixed. And basically a great bit THANK YOU for posting the details and solution of the problem. This just helped me out.

                          Comment

                          Working...
                          X