[lug] Forcing a Sound Device

stimits at comcast.net stimits at comcast.net
Mon Nov 13 11:09:39 MST 2017


I'm very familiar with strace and ltrace, but until had not heard of fatrace...I'll dig into this, it seems like a good place to start. Only issue I can see is that many audio applications have to be run by the user logged in to the X GUI...and cannot be run by root...yet some tracing tools only allow running by root. I am curious if anyone here has experience with running root-only diagnostic tools such that they trace commands run by non-root? Is there some general utility for doing this?
 
----- Original Message -----From: Ralf Mattes <rm at seid-online.de>To: Boulder (Colorado) Linux Users Group -- General Mailing List <lug at lug.boulder.co.us>Sent: Mon, 13 Nov 2017 09:10:57 -0000 (UTC)Subject: Re: [lug] Forcing a Sound Device

Just a few remarks from a long-time lurker:

On Sun, Nov 12, 2017 at 07:33:08PM -0700, Davide Del Vento wrote:

> I have no clues about the issue at hand, but you can relatively easily> find out which file a program alters using strace: run the program> with it, redirecting the stdout/err to a file, and do the "thing" that> triggers the change you want to find out. Try to minimize everything> else you do, because the output is huge.

For such tasks I prefer to use fatrace which only reports fileoperations without having to juggle with strace '-e' filters. This toolis especially useful if you don't know which process is altering files.

Also, I often find the info from ltrace better for tracing than onlylooking at system calls with strace.

But ...

> On Sun, Nov 12, 2017 at 11:46 AM, <stimits at comcast.net> wrote:> ...> > analog audio...the device setting works for one song, then reverts. Wish I> > knew what file pavucontrol alters...I'd use SElinux and make it immutable to> > everything. Or if I knew what it is that tells pavucontrol to change, I'd> > bzip2 the binary so it can't be used (at this point I don't care if it> > brings down the system...I just want to know debugging information).

Most likely pavucontrol won't alter any files. That tool onlyremote-controls the pulseaudio server process and it's doing this bymeans of shared memory access.

(Side note: I'm one of those pro-audio users that hates pulse audio, sothe followin might be slightly biased).My current setup: all my audio input and output is handled by a jackserver that gets started at login (as a systemd user service). I usejack2 gives me the possibility to control the server over dbus.

This control interface I use to run Cadence(http://kxstudio.linuxaudio.org/Applications:Cadence). In that tool Iactivate both the pulseaudio bridge as well as the alsa bridge.That gives me a running pulseaudio server that provides pulseaudio forprograms that only work with pa (firefox and skype et al.) as well as adefault virtual alsa device. Both bridges route all audio data to jack.

If this sounds too complex (it really isn't): the usual way to changealsa's default device is to re-order the card by means of kernel moduleparameters. Edit (or create) '/etc/modprobe.d/alsa-base.conf' and addentries like:

options snd-hda-intel index=-2 options snd-usb-audio index=0

That way, the USB interface will be loaded first and show up as alsa'sdefault interface.

HTH, Ralf Mattes

_______________________________________________Web Page: http://lug.boulder.co.usMailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lugJoin us on IRC: irc.hackingsociety.org port=6667 channel=#hackingsociety
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20171113/6348a4f0/attachment.html>


More information about the LUG mailing list