Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Strangest Linux Problem Ever

  1. #1
    Join Date
    Mar 2009
    Posts
    131

    Unhappy 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. #2
    Join Date
    Jul 2008
    Location
    Greece
    Posts
    3,798

    Default

    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.

  3. #3
    Join Date
    Mar 2009
    Posts
    131

    Default

    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 at 10:29 AM.

  4. #4

    Default

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

  5. #5
    Join Date
    Mar 2009
    Posts
    131

    Default

    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 at 10:30 AM.

  6. #6
    Join Date
    Oct 2009
    Posts
    172

    Default

    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.

  7. #7
    Join Date
    Mar 2009
    Posts
    131

    Default

    Quote 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 at 03:37 PM.

  8. #8
    Join Date
    Jul 2008
    Location
    Greece
    Posts
    3,798

    Default

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

  9. #9
    Join Date
    Jan 2009
    Location
    UK
    Posts
    331

    Default

    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.

  10. #10
    Join Date
    Oct 2009
    Posts
    172

    Default

    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.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •