Distro used Ubuntu (gnome)
Soundcard: my laptop has one of those onboard High Definition Audio soundcards. Even worse mine is made by SIS.
Problem: Sound getting interrupted (xruns)
Big villain: Window Manager
How I came to that conclusion: Installed KDE, XFCE, LXDE and tested renoise with “DemoSong - soon soon” and openned lots of programs, shaked windows, to see if interrupts ocurred.
Which one peformed best?: lxde because it uses openbox as window manager.
Which one peformed worst? Gnome because it uses compiz, or metacity if you disable desktop effects.
Metacity sucks too?: Yes it sucks big time.
What does the window mnager has to do with sound chopping?: it steals system resources, even worst for us with crappy soundcards.
Give it a try, simple steps:
Install lxde
apt-get install lxde
Logout from gnome, at the graphical login screen, select the user you want to login, type your password, but before you hit enter to login, check the botton of this screen, theres a menu to select the desktop environment. Select lxde and login. Run renoise, go to soundcard options in renoise and increase periods to 3. Play a heavy music and see if the sound goes ok.
Also try with jack.
You can also choose Gnome/openbox at the login screen. Gnome will be simplier, but faster.
I didn’t even had to set realtime options in pam.
FULL AND BORING HISTORY ABOVE
Dual boot system, linux sucks, Windows works perfectly.
So what I think? Maybe its the driver right? The Windows one is good, the linux one is crappy. Curious enough, I can even agressivly open lots of programs, shake the windows all at the same time and no sound interruption on Windows. If I even think of doing this on gnome I get a xrun.
Then, one day I try and install KDE which is known for beeing more resource hungry than gnome, I run renoise and it peforms waaaaaaaaaaaay better! I do that trick to increase the period to 3 and that’s it, perfect. No choppy sound with alsa. Try jack, same thing, perfect. Openning other programs and shaking windows gives me little xruns. But waaay less.
So, how is that possible, I asked to myself. it’s the same driver loaded, a heavier Desktop environment, and its all good.
Maybe QT is lighter than GTK.
To test if that’s true, I installed XFCE, which uses GTK and it’s lighter than both gnome and KDE. Result? CHOPPY SOUND! Messing with windows? HORRIBLE CHOPPY SOUNDS!
OMG, gtk is the villain? One last test.
Installed lxde, even lighter than xfce, uses gtk as well. results: PERFECT!
So, the module driver is the same, alsa, jack, renoise, all the same. GTK, QT doens’t matter. What else changed between these Desktop environment answer: THE WINDOW MANAGER.
Gnome uses metacity or compiz if you have desktop effects enabled. Both are horrible for peformance.
XFCE uses xfwm4 which is horrible as well.
KDE uses kwin which proved to peform better.
lxde uses openbox which is really fast.
For me, running openbox and setting 3 periods did the trick. I can now happly use renoise in linux.