Me and U(buntu)

My Ubuntu Experience!

XFCE, SLiM, PAM, and Jack

Posted by ushimitsudoki on September 6, 2008

One of the things I did was to replace GDM with SLiM as my login manager. It seems to mostly work fine, but today I tried to start up Jack (via qjackctl), and I kept getting this error:

cannot use real-time scheduling (FIFO at priority 10) [for thread SOMENUBER, from thread SOMENUMBER] (1: Operation not permitted)
cannot create engine

The set-up

Now, if you search out that error, you’ll see lots of talk about how you need to set up your /etc/security/limits.conf to allow non-root users to set real-time tasks.

In our case, we want the audio group to do so, so /etc/security/limits.conf should have something like this in it:


# Added for realtime operations for JACK
@audio 		- 	rtprio 		95
@audio 		- 	memlock 	1024000
@audio 		- 	nice 		-19

And, if the current user is a member of the audio group, then you should be able to start up qjacktl as non-root and still get realtime scheduling.

The problem

And yet, it stopped working — I could only launch qjackctl with sudo. Eventually, I figured out this is because GDM supports PAM which was loading pam_limits.so (and others). But, the version of SLiM in the Hardy repos (1.2.6-1) does not.

The solution

You can get a version of SLiM which does support PAM (1.3.0-1) from the Intrepid repositories here. You can look at /etc/pam.d/gdm to see what GDM was loading (if you were using GDM in the past as I was. Here’s what I have there:


#%PAM-1.0
auth    requisite       pam_nologin.so
auth    required        pam_env.so readenv=1
auth    required        pam_env.so readenv=1 envfile=/etc/default/locale
@include common-auth
auth    optional        pam_gnome_keyring.so
@include common-account
session required        pam_limits.so
@include common-session
session optional        pam_gnome_keyring.so auto_start
@include common-password

To address this specific issue, you will need to create /etc/pam.d/slim and add this line:


session required pam_limits.so

If you are having a similar problem in a different area, you might want to try bringing over some more stuff from /etc/pam.d/gdm. (I just copied everything over and I don’t think there are any problems there).

Note that /etc/pam.d/slim is currently not created when you install the package, although some people think that is a bug – I agree.

BONUS! Another problem with solution!

Goofing around somewhere I caused a problem where the qjackctl GUI would not appear if I ran the program as myself, but only when I ran it as root.

The qjackctl and qjackctl.bin processes and jackd would start, but the qjackctl window would not appear. Some other people have had this problem. The output would look like:

jason@apollo:~$ qjackctl & 
[1] 25226 
jason@apollo:~$ Warning: no locale found: /usr/share/locale/qjackctl_en_US.qm 
jason@apollo:~$ ps -A | grep jack 
25226 pts/0    00:00:00 qjackctl 
25229 pts/0    00:00:00 qjackctl.bin 
25239 ?        00:00:00 jackd

I tried everything I could think of – including compiling the latest version of qjackctl – but couldn’t get it working.

Finally, I posted for help on the qjackctl sourceforge help forum … and the developer gave me the right answer in like 15 minutes! So happy!

(The answer is that a change in window manager required me to delete the existing configuration file found at: ~/.config/rncbc.org/QjackCtl.conf)

Strangeness Revealed?

Here’s what is strange (and revealing) about this: I have been using fusion-icon to toggle between compiz-fusion and Xfwm4 as my window managers. Until yesterday, even if I had it set to use Xfwm4 if I went into Settings Manager and tried to click on “Window Manager” or “Window Manager Tweaks” I would get an “Unknown Window Manager” error in a dialog box.

However, yesterday I noticed that if I clicked on either, it had started working, and I could customize Xfwm4.

The major change I made was changing to slim as the default login manager, but I have also been removing other GNOME packages that were left behind. Something in there must have been “blocking” Xfwm4 from fully working or registering or something. I wish I had investigated that point better beforehand.

One Response to “XFCE, SLiM, PAM, and Jack”

  1. Jam said

    hmm, I’ll have to give SLiM a try out. :)

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>