Ubuntu Studio 8.04 (Hardy Heron) on a Vaio VGN-nr160e:
Initial woes: no internet applications (other than Firefox 3 Beta), no office suite (at all),, no automount, no email or IM, no “Custom” radio button in Visual Effects…. oh, and we’re out of coffee.
I can understand the decision not to automount. The constant polling for automount devices makes Jackd jittery. I can understand if they decided to release Studio sans Visual effects, they’re more resource intensive than someone needing to do audio/video/graphics work should need, but this was a Compiz/Ubuntu problem. Compiz is actually installed, but I don’t think the manager was. It took me a while to find out that it has its own icon in System->Preferences cleverly named “Advanced Desktop Effects Settings”. I was just used to finding it in the Visual Effects tab of “Appearance”. I’m happy again. I can do some light recording and wow onlookers at my eye-candy desktop (before anyone trolls this: I do like Enlightenment, but E-17 is too jumpy for my taste. I run E-16 on my production box)
Initial weirdness: wireless works, but there’s no activity light. The range seems to have improved considerably, but I’ll have to test it more over time. I can now access my wireless from my back patio… errrrr… I mean office (before I had to be halfway down the hall to my office in order to get signal). The package manager said that Network Manager was already the newest version, but it took a reboot before the panel icon would show up. I no longer have to type in my keyring password twelve times to get WPA authentication. After all this was said and done, I was excited again. When I got to work and booted up, I discovered the AP and was immediately on the network. I was soon wracked with despair and was going to sail my laptop into the pond when the internet stopped responding, then I discovered that my boss unplugged the uplink (yes, on purpose).
Less weirdness as this hasn’t changed from Gutsy: [Fn] + Volume keys and mute key works, but there is no nice on screen notification as there was in 7.10 (note: later, it has magickally reappeared I think maybe it had something to do with compiz… but I dunno). [Fn] + Brightness still does not work. Plugging the headphones in does not turn off the built in speakers (again, as it did in 7.10). There is a conf file fix for this which I’ll get to below. The mic works. Last time I had to manually build alsa and then edit a .conf file, but it worked perfect after that. I’ll track the steps.
sudo apt-get install linux-backports-modules-generic
I had to do this in 7.10, Gutsy Gibbon which will work if you have that version, but is unneccessary as Hardy already has this alsa version built in (alsa-1.0.15). There’s already a bit too much betaware in 8.04 for my fancy and I’m even usually the “bleeding edge” kinda geek. Alsa version 1.0.16 is out. It has been out. I compiled it two months ago onto this very laptop. Why is Hardy shipping with 1.0.15?
So, I tried this:
cat /proc/asound/card0/codec#* | grep Codec
and get the string for the card model (in my case ALC262):
Codec: Realtek ALC262 Codec: Conexant ID 2c06…then went to
http://ubuntuforums.org/showthread.php?p=3796486#post3796486
and matched it with one of the headings (in my case ALC262):
ALC262
fujitsu Fujitsu Laptop
hp-bpc HP xw4400/6400/8400/9400 laptops
hp-bpc-d7000 HP BPC D7000
benq Benq ED8
benq-t31 Benq T31
hippo Hippo (ATI) with jack detection, Sony UX-90s
hippo_1 Hippo (Benq) with jack detection
sony-assamd Sony ASSAMD
basic fixed pin assignment w/o SPDIF
auto auto-config reading BIOS (default)
the leading bold line on the list should be put into your modprobe configuration file by editing the respective file using gedit, nano, or vim. For the copy/pasters:
gksudo gedit /etc/modprobe.d/alsa-base
or
gksudo gedit /etc/modprobe.conf
There should only be one or the other, and if you’re using 8.04, then you’re going to want the prior with /etc/modprobe.d/alsa-base. Last time around (this time as well), I had to add:
options snd-hda-intel model=sony-assamd
to /etc/modprobe.d/alsa-base
…as a side note, I tried (unsuccessfully) adding:
options snd-hda-intel model=vaio
to /etc/modprobe.d/alsa-base. If you have some other model, then you may try this, but YMMV.
I Added the following @audio lines to /etc/security/limits.conf
@audio - rtprio 99
@audio - memlock 1024000
@audio - nice -19
# End of file
NOTE: USING THE MEMLOCK SETTING LISTED HERE WITH YOUR SYSTEM WILL LOCK UP TO 1GB of your RAM. I do not know what will happen if you attempt to lock the memory and you DO NOT have the memory available. I’ve got 2GB of RAM in my system which is plenty for the OS, desktop and the audio applications to run and still lock up that much RAM. You may want to adjust this number accordingly
@audio is for the group that your user account should belong to. I apparently belonged to the group, but there was no “audio” group…. weeeeeiiiiird. So, I added audio in System -> Administration -> Users and Groups then added my username to the group. The last parts of this conf settings means: Real time priority, maximum memory to lock, and default nice level. The lower the nice number is, the better, but -19 is as low as you can get with a nice setting.
Then I started getting
late driver wakeup: nframes to process = 1024.
late driver wakeup: nframes to process = 1024.
…over and over again. I figured out that this number is directly equal to double the “frames/period” setting.
This may have been happening before, but I’ve just turned on Verbose messaging. I swear this worked once, and only once. I was even playing my keyboard through Qsynth… Chop stix off of vkeyboard using the “z x c v b n m ,” and “.” keys. …regardless.
time to try compiling alsa from source:
install the kernel-headers and glibc-devel
sudo apt-get install build-essential libncurses-dev gettext linux-headers-`uname -r`
I downloaded the alsa-driver, alsa-lib and alsa-utils packages, then
sudo tar xjf alsa-driver*.bz2 sudo tar xjf alsa-lib*.tar.bz2 sudo tar xjf alsa-utils*.tar.bz2
I ran the following on each:
./configure make sudo make install
…and lastly reboot.
got the previous from:
https://help.ubuntu.com/community/HdaIntelSoundHowto
where it also says to:
sudo apt-get install libncurses5-dev
…but this may not need to be done. My alsamixer and alsaconf already worked just fine. Now, I’ve got a really strange “problem”. When I run jackd on my Intel built-in card, I’m getting soft xruns for days and a lot of hard xruns with the same “late driver wakeup” errors filling up the message log as above (I guess computers are sleeping late like their owners), but Qsynth and my Maudio keyboard are not producing jittering or crunchy sounds. The output sounds actually normal. Of course, I haven’t put the system under stress yet, and I grew tired of troubleshooting the built in card so I grabbed my FastTrack USB box to try it. It works fantastic with no xruns yet. I apologize for any previous comments in the forums about throwing this at the next Mac user I see. I even have the latency down to 8ms running it at a sampling rate of 96000. I’m done with the audio for now.
Next issue: video. Miro works! Unless I’m using the desktop cube that is. then it looks like a crashed Windows computer without the wor
ds “Fatal Exception error at XXXXXXXX”. Just blue. Sound comes out, but it’s like I’m watching the Phantom Menace before any CG frames get added… blue. I hear Patrick Norton from Sysm, but the screen is like my jewels on my Junior Prom night…
…hopefully, you get the idea. The Totem Player works, MPlayer works, VLC media player works, PiTiVi even works (PiTiVi never worked for my Gutsy install)! Now I just have to go grab Cinelerra and Jahshaka to see if they’ll compile or break my system.
My webcams are still a no-go. I’ve got a glimmer of hope in the future purchase dept…. I see that the Cliquecam HUE comes with drivers for Linux kernels 2.6 and up. I just don’t think I can afford to shuck out 80 bucks for something that I can’t find a real review on. Everything I find about it is pre-release PR or people citing the PR, Engadget and GeekBrief rehashing the specs in a humorous or cute way. Has anyone in consumerland actually plugged one of these into a USB port yet? Side note: it does find the USB audio device on my Micro Innovations webcam, but no video driver. Video Skyping is out of the question for daddy nobucks still.
Burnt like the last forgotten hot dog on Labor Day. Oh well, more later…

April 30, 2008 at 5:34 pm
How did you get realtime schedualing to work acceptably with the new 2.6.24 kernel?, when CONFIG_SECURITY_CAPABILITIES is now, not allowed as an lsm module.
I can not get any scheds above 51
jackd – supposed to be rtprio=70
/etc/security/limits.conf
audio group apps supposed to limit to 99
and yet freewheeling is continuously crashing unless I run everything as root.
htop shows no audio related processes with priorities higher than 51.
In fact many other non-audio and system processes have that magic limit -51 – leaving audio to compete with them.
googling has brought no answers to this new problem yet.
It’s Torvalds who wants the lsm (securities) modules out of the kernel in favor of static-built-in alternative with no option to build as a module.
This kind of leaves us Audio users high, and dry untill there are workable alternatives.
So far the built-in way is not working as well as the realtime.lsm module has worked in the past.
What do you think about this issue?
JWM
May 8, 2008 at 9:28 pm
…as a long time user of Debian, which then begat Agnula (which has not begat anything, but the guy in charge now works for 64Studio), then 64Studio, and now I’m using Ubuntu Studio. I’m used to not running the most bleeding edge kernels and dealing with slow release cycles. I’m also used to having 64studio’s apt-get tell me that my older 2.19-10-multimedia (or whatever) kernel package needs to be removed before I can install fitzy-pop-ver_6.9. All that being said, this laptop is a daily use computer which I would like to also handle audio and light video applications. On to the question:
Originally, I did not check to see if qjackd was /actually/ running in realtime priority. Honestly, the thought never struck me. Anyway, I dl’d htop (yet another non-pre-install app on UbStud) and ran it to the following results: I’ve got jackd running and showing PRI numbers at -11 and -21 (qjackctl running at -10). These were the lowest numbers in the list. I did not see any -51 processes, so Jack has the highest priority. Whether its -99 or -21, it still gets priority. The nice number was not set as low as it could go, but I was able to change it easily which made my xruns start screaming by a lot faster. Sorry, one more note: this is also on the Intel sound card. When I put in my M-Audio Fast Track, which is a USB 1.0 device, I’m getting only 8 msec lag and I don’t get xruns unless I load a bunch of windows on my cube and start rotating in compiz while qsynth and hydrogen are under light Rosegarden control (3 instruments in MIDI). The aggrevating part about this is that I have to break out my external and heaphones or speakers even if I want to just play with drum beats for a little bit.
The *nix kernel was built with stability in mind, so there has to be a gradual evolution of the kernel into a true swiss army knife kernel. On a server, I want that stability of my kernel to not fritz out and possibly preempt my rendering a spot of video with a cute sound which lets me know that tea’s ready. I know that’s a bit extreme, but would be nice to have as a switch to turn on if I’m needing to “break” that stability and my streaming videos be damned if they try to interfere with my (somehow miraculous) Aki Takahashi-ish solo at the end of a recording… yeah right.
I like the idea of having a more monolithic kernel as it is faster and more stable; but, yes, this would mean that we are out in the cold until real time scheduling is a reality in a later evolution of the kernel. If it is left in, then developers will continue to use the lsm as a crutch and not work towards developing a real fix. This leaves us with older kernels for a little while until this happens.
The other option would be to fork the kernel development for a possible merge later down the road, but that ain’t gonna happen.
…I wish Haiku would gain some steam and hurry up with development. While I’m at wishing, I wish I had a cheap, high peformance renewable energy source for my car.