1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[How to] Fix WINE underrun occurred problem

Discussion in 'Linux Guides (Generic)' started by allenskd, Feb 7, 2014.

  1. allenskd

    allenskd Active Member

    Joined:
    Feb 5, 2014
    Messages:
    510
    Likes Received:
    52
    Trophy Points:
    28
    Hey guys, I need a few testers. This is a new guide on how to fix the underrun problem many people are having. Check the how-to out and leave comments here. I'll be sure to come back and try to answer as many questions as possible.
    DOOM guy and mrdeathjr28 like this.
  2. booman

    booman Grand High Exalted Mystic Emperor of Linux Gaming Staff Member

    Joined:
    Dec 17, 2012
    Messages:
    8,278
    Likes Received:
    614
    Trophy Points:
    113
    Location:
    Linux, Virginia
    Home page:
    You are a GodSend!!!
    I was just working on this exact same problem this week.
    I'll follow your guide as well and see if it fixed my Alsa/Pulseaudio problem too.
    Thanks for posting... and welcome to the forum
  3. booman

    booman Grand High Exalted Mystic Emperor of Linux Gaming Staff Member

    Joined:
    Dec 17, 2012
    Messages:
    8,278
    Likes Received:
    614
    Trophy Points:
    113
    Location:
    Linux, Virginia
    Home page:
    Very nice guide!
    Thank you for taking the time to help us Linux gamers with this "buffer underrun" problem.
    It was driving me nuts and I couldn't find anything usefull to help me. someone on the PlayOnLinux forum showed me a similar trick.
    I actually did the changes in my user folder so it wouldn't affect the system as a whole. But I havn't confirmed if the settings stick or are re-set after reboot.
    I'll try it your way next.

    By the way, I would put the screenshots after the steps so readers can see how it should look after they try it.
  4. allenskd

    allenskd Active Member

    Joined:
    Feb 5, 2014
    Messages:
    510
    Likes Received:
    52
    Trophy Points:
    28
    Yea, it was driving me nuts too, haha.

    PulseAudio most of the time works at the user-level... I just edited the /etc/pulse/default.pa because:

    • If I add more users in my computer, it will pick that file automatically, which means less copy/pasting and less managing if I add new cards
    • I'm planning a new concept like PoL, but lighter. In no way I'm planning to replace PlayOnLinux, more like, I want to compliment it with new workflow
    By the way, if you killall pulseaudio in your console, you will notice your changes in pavucontrol :) I just recommend that people should reboot their machines, audio in linux is a bit t
  5. booman

    booman Grand High Exalted Mystic Emperor of Linux Gaming Staff Member

    Joined:
    Dec 17, 2012
    Messages:
    8,278
    Likes Received:
    614
    Trophy Points:
    113
    Location:
    Linux, Virginia
    Home page:
    Thats perfect.
    Oh, I didn't know killall pulseaudio would be quicker.
    I posted your tutorial on the PlayOnLinux forum as well.
    I've seen many posts about this exact problem.
  6. booman

    booman Grand High Exalted Mystic Emperor of Linux Gaming Staff Member

    Joined:
    Dec 17, 2012
    Messages:
    8,278
    Likes Received:
    614
    Trophy Points:
    113
    Location:
    Linux, Virginia
    Home page:
    Now that I'm in Mint 16 64-bit, I have only seen the ALSA "buffer underrun" error.
    I was playing Crysis Warhead and the audio started getting crackly and fast. So I saved, closed it and ran Crysis again. After that everything has been fine.
    Strange huh?
    Even as I have tested a few games, I havn't noticed the "buffer underrun" errors at all...
  7. allenskd

    allenskd Active Member

    Joined:
    Feb 5, 2014
    Messages:
    510
    Likes Received:
    52
    Trophy Points:
    28
    Hey booman, I just saw this reply but yea. I haven't seen any problems with my How-To yet.

    Sometimes if it gets a bit choppy, as in there's some noises that shouldn't be there. Try to give a higher priority to the game, in KDE you can use ksysguard, right click the process and set priority
  8. booman

    booman Grand High Exalted Mystic Emperor of Linux Gaming Staff Member

    Joined:
    Dec 17, 2012
    Messages:
    8,278
    Likes Received:
    614
    Trophy Points:
    113
    Location:
    Linux, Virginia
    Home page:
    No problem, I'm in Mint 17 long-term-stable and all is fine.
    Thanks
  9. allenskd

    allenskd Active Member

    Joined:
    Feb 5, 2014
    Messages:
    510
    Likes Received:
    52
    Trophy Points:
    28
    Just some headsup with SimpleScreenRecorder.

    If you have dmix active, there's a high chance SSR won't pick up the audio for some reason, not even changing backends with ALSA works, but if you change the monitor to another source (managed by PA) it works.
  10. booman

    booman Grand High Exalted Mystic Emperor of Linux Gaming Staff Member

    Joined:
    Dec 17, 2012
    Messages:
    8,278
    Likes Received:
    614
    Trophy Points:
    113
    Location:
    Linux, Virginia
    Home page:
    I'm using SimpleScreenRecorder and audio is definitely not working. I don't have dmix set, so that isn't the problem.
    SimpleScreenRecorders allows you to select Pulseaudio or Alsa, but I've tried both and audio still doesn't work.
  11. allenskd

    allenskd Active Member

    Joined:
    Feb 5, 2014
    Messages:
    510
    Likes Received:
    52
    Trophy Points:
    28
    I've thought up of a solution after spending a few hours yesterday researching but, I'm gonna try reporting the problem first to see what the developers have to say.

    It doesn't really bother me that much that I can't record, the one video I did for astebreed game was an experiment that worked but not for long when I launched Skyrim.
  12. DOOM guy

    DOOM guy New Member

    Joined:
    Jul 11, 2014
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Hello. First of all thanks a lot for the fix for the underrun error however I've come to report something not working in the hope that you (or anyone else) can tell me how to sort it. Bear in mind I'm quite a linux newbie.

    My problem is that I can't play sound through an HDMI anymore. I cannot select the device from sound options because after applying the fix in your guide all the gui sound options are greyed out. I planned on adding a line in default.pa specifying my TV's device ID but the output of
    Code:
    cat /proc/asound/cards
    is the same when the HDMI is plugged in:
    Code:
     0 [PCH            ]: HDA-Intel - HDA Intel PCH
                          HDA Intel PCH at 0xc2510000 irq 44
    How can I send sound through my HDMI without reverting the fix for alsa underrrun?
  13. allenskd

    allenskd Active Member

    Joined:
    Feb 5, 2014
    Messages:
    510
    Likes Received:
    52
    Trophy Points:
    28
    @DOOM guy:

    Sorry, I've never used GNOME volume app to test the guide, mostly because I'm a KDE user. Does sound still works even when it's greyed out?
  14. allenskd

    allenskd Active Member

    Joined:
    Feb 5, 2014
    Messages:
    510
    Likes Received:
    52
    Trophy Points:
    28
    I've been busy lately, so I haven't made any progress with my pet project, or well anything related to linux gaming.

    However, I decided to downgrade my main OS (Debian unstable). I'm now using Debian (Wheezy) stable. The experience has been pretty neat, since I have /home in another partition (like any rational person would) all I had to do is install libraries and libraries and libraries, jesus, so many libraries to install in both amd64 and i386. I had problems installing Steam, mostly because Steam was compiled against a newer version of libc6 and I didn't want to tamper with it in any way. (Thankfully I found a solution)

    One thing I noticed, which for me has been a VERY important: PulseAudio older version doesn't get distorted audio. I'm using PulseAudio 2.0:

    # david at debianbox in ~/Downloads [20:58:39]
    $ pulseaudio --version
    pulseaudio 2.0

    And I've yet to run into an underrun. In fact, I have run into an underrun but it maintains the audio normal. Meaning, somewhere someone screwed up something in the newer versions of PulseAudio.

    I just wanted to say this, because it's quite relevant to those who want to do linux gaming peacefully.

    To those who want to know what i've been up to: (shameless plug) A Taste of Slackware (14.1) I used it extensively but... the whole thing of enabling multilib was a real deal breaker. I would like to argue that Slackware is violating its own KISS philosophy... but alas, this ain't the thread for it. I'll also talk about why I did the downgrade later on.
  15. booman

    booman Grand High Exalted Mystic Emperor of Linux Gaming Staff Member

    Joined:
    Dec 17, 2012
    Messages:
    8,278
    Likes Received:
    614
    Trophy Points:
    113
    Location:
    Linux, Virginia
    Home page:
    I'm using pulseaudio 4.0
    What does that mean? I thought 2.0 was the new one?
  16. Daerandin

    Daerandin Well-Known Member

    Joined:
    Oct 18, 2013
    Messages:
    1,130
    Likes Received:
    243
    Trophy Points:
    63
    Location:
    Northern Norway
    Home page:
    The newest is 5.0. I need to make one change to /etc/pulse/daemon.conf

    Otherwise I can't use my headphones with several Alsa applications such as Timidity and Munt.

    I simply add

    Code:
    default-fragment-size-msec = 5
    then it works.

    I never had any problems with 4.0
  17. allenskd

    allenskd Active Member

    Joined:
    Feb 5, 2014
    Messages:
    510
    Likes Received:
    52
    Trophy Points:
    28
    Yea, in a rolling release distro PulseAudio 5.0 is the newest (I think it also received some updates too while I was on Debian unstable). I'm using Debian stable which contains old libraries and applications.

    I did tweak default fragment size, it never did any good with PA 4 or 5.

    I would say that if users purely want just gaming, either start tweaking the fragment size (which has never worked for me) or downgrade PulseAudio, honestly unless you are looking for new features it's a pretty neat idea itself, you won't even do the dmix how-to, which is a big plus.

    I do bring it because I heard a rumor that downgrading PA gets rid of the underrun problems. I was pretty skeptic about it, but it works.
  18. booman

    booman Grand High Exalted Mystic Emperor of Linux Gaming Staff Member

    Joined:
    Dec 17, 2012
    Messages:
    8,278
    Likes Received:
    614
    Trophy Points:
    113
    Location:
    Linux, Virginia
    Home page:
    What are the steps for downgrading?
    Can you simply download a deb or tar file from pulseaudio website? or does it require some terminal intervention?
    ... for new users of course ;)
  19. allenskd

    allenskd Active Member

    Joined:
    Feb 5, 2014
    Messages:
    510
    Likes Received:
    52
    Trophy Points:
    28
    Terminal intervention... yep. I don't think it's hard to compile older version of PulseAudio in newer systems. I think what I really have to look at is the init script for user per session.
  20. ThunderRd

    ThunderRd Irreverent Query Chairman Staff Member

    Joined:
    Dec 17, 2012
    Messages:
    2,756
    Likes Received:
    87
    Trophy Points:
    48
    Location:
    Northern Thailand, the Land of Smiles
    Home page:
    In Debian and its friends, just use apt-get to place the undesired package on 'hold'. Sid users should be familiar with this, because it's done fairly often while waiting for the moving target to settle down:
    Code:
    echo package hold|dpkg --set-selections
    To take it off hold:
    Code:
    echo package install|dpkg --set-selections
    To see what packages are on hold:
    Code:
    dpkg --get-selections | grep hold
    In Gentoo, you would have to mask the package in package.mask, or emerge --exclude<package> for a one time result.
    Last edited: Aug 8, 2014

Share This Page