Selecting Default Sound Card

Post here if you are a new Porteus member and you're looking for some help.
ilya17
Ronin
Ronin
Posts: 3
Joined: 13 Sep 2013, 06:23
Distribution: Ubuntus, Puppys
Location: Canada

Selecting Default Sound Card

Post#1 by ilya17 » 13 Sep 2013, 07:03

Hi, Linux novice here and Slackware noob.

I've been searching the forum for answers but this post is the best I could find: http://forum.porteus.org/viewtopic.php?f=53&t=1676

I'm running Porteus with KDE4 and that post essentially explains my problem with selecting a sound card. I have tried the script user Ahau provided but the problem is I can't seem to properly close the applications that interact with ALSA/sound.

Through trial and error I have discovered that I need to disable KMix and the processes it depends on. Problem is the process is a KDE dependancy (is that the right term?) So when I end the process my desktop environment crashes and I have to restart it, which restarts KMix with incorrect settings and puts me back at square one. One time KDE didn't crash for some reason and I was able to pick and configure the proper sound card, but the settings didn't survive a reboot.

That thread is kind of old so if there's already a known fix that I missed it a link would be much appreciated. :)

User avatar
wread
Module Guard
Module Guard
Posts: 1256
Joined: 09 Jan 2011, 18:48
Distribution: Porteus v5.0-kde-64 bits
Location: Santo Domingo
Contact:

Re: Selecting Default Sound Card

Post#2 by wread » 13 Sep 2013, 11:13

If you are using KDE, try Start>Kde System Settings>Multimedia!

Good luck!
Porteus is proud of the FASTEST KDE ever made.....(take akonadi, nepomuk and soprano out and you will have a decent OS).
The Porteus Community never sleeps!

User avatar
Ahau
King of Docs
King of Docs
Posts: 1331
Joined: 28 Dec 2010, 15:18
Distribution: LXDE & Xfce 32/64-bit
Location: USA

Re: Selecting Default Sound Card

Post#3 by Ahau » 13 Sep 2013, 14:07

Are you using 32-bit Porteus KDE? Looking through my script, it looks like I did not update it for 32-bit KDE4, it still assumes you are using trinity (doh!)

If that is the case, then please download this updated script: http://porteus-xfce.googlecode.com/file ... ard-select

Just save that file, run 'chmod +x gtk-soundcard-select' to make it executable, and run it with './gtk-soundcard-select'

And let me know if it works. If not, I'll dig a little deeper and find out what's going on.
Please take a look at our online documentation, here. Suggestions are welcome!

ilya17
Ronin
Ronin
Posts: 3
Joined: 13 Sep 2013, 06:23
Distribution: Ubuntus, Puppys
Location: Canada

Re: Selecting Default Sound Card

Post#4 by ilya17 » 14 Sep 2013, 21:17

It works perfectly now thanks for the help.
I was having trouble getting the script to run after elevating to root, but fortunately Porteus comes with a super user mode command line which made things a lot simpler.

Also, it was 32bit as you mentioned.

kwhitefoot
White ninja
White ninja
Posts: 5
Joined: 14 Nov 2013, 19:42
Distribution: Porteus-v2.1 Razor
Location: Europe

Re: Selecting Default Sound Card

Post#5 by kwhitefoot » 14 Nov 2013, 20:08

I'm also having problems selecting a sound card.

I first tried using System Tools|Porteus Settings Centre|System Settings|SoundSettings which gets me the Porteus Sound Card Selector.

It shows a drop down list with two identical entries:

HDA-Intel HD-Audio Generic

I know from running alsamixer and pressing F6 that it is the second one that I should choose.

So I do that and click Apply. After a moment I get a message box saying:
One or more programs that utilize your sound device ...

The program it complains about is razor-panel.

I tried running the script from Ahau but all it did for me was to run the Sound Card Selector.

So it looks as though I could choose the right card if only I could close the program that is using the sound system, but how?

I know the sound works because the machine is normally used with Lubuntu and everything works.

Apart from this I'm quite impressed with Porteus; wifi worked straightaway without any fuss at all.

Here are some details from System Information in case they help:

System Information
Manufacturer: Acer
Product Name: AO725
Version: V1.05

Porteus-v2.1
Kernel: 3.9.11-porteus

SOUND CARDS:

HDA-Intel - HD-Audio Generic
HDA-Intel - HD-Audio Generic
Advanced Micro Devices [AMD] nee ATI Wrestler HDMI Audio [Radeon HD 6250/6310]
Advanced Micro Devices [AMD] Hudson Azalia Controller (rev 01)

**** List of PLAYBACK Hardware Devices ****
card 0: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Generic_1 [HD-Audio Generic], device 0: ALC271X Analog [ALC271X Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0

User avatar
Ahau
King of Docs
King of Docs
Posts: 1331
Joined: 28 Dec 2010, 15:18
Distribution: LXDE & Xfce 32/64-bit
Location: USA

Re: Selecting Default Sound Card

Post#6 by Ahau » 14 Nov 2013, 20:31

hmmm... I wonder if the fact that two identical devices are presented is causing my script to foul up. Your logs probably give me this information already, but just to make sure I have things formatted correctly, would you please give me the output of the following:

Code: Select all

cat /proc/asound/cards
cat /proc/asound/modules
And also let me know which of the cards (output by cat /proc/asound/cards) is the one you want to be using (I'm assuming it's also the one you're using in Lubuntu).

I recently added a new feature into the soundcard selector to accomodate cards that show up as two devices to alsa, but that fix requires non-identical naming; hopefully I'll get that from the information I"m asking for above.
Please take a look at our online documentation, here. Suggestions are welcome!

kwhitefoot
White ninja
White ninja
Posts: 5
Joined: 14 Nov 2013, 19:42
Distribution: Porteus-v2.1 Razor
Location: Europe

Re: Selecting Default Sound Card

Post#7 by kwhitefoot » 14 Nov 2013, 21:52

Now that's what I like about free software: near instantaneous support!

cards:
0 [Generic ]: HDA-Intel - HD-Audio Generic
HD-Audio Generic at 0xf0244000 irq 45
1 [Generic_1 ]: HDA-Intel - HD-Audio Generic
HD-Audio Generic at 0xf0240000 irq 46

modules:
0 snd_hda_intel
1 snd_hda_intel

As far as I can tell the first one is really for HDMI. So I presume it is the second one that I need to use. I'll have to reboot and check what it all looks like in Lubuntu.

User avatar
Ahau
King of Docs
King of Docs
Posts: 1331
Joined: 28 Dec 2010, 15:18
Distribution: LXDE & Xfce 32/64-bit
Location: USA

Re: Selecting Default Sound Card

Post#8 by Ahau » 15 Nov 2013, 00:10

Ok, that is good. generic and generic_1. I have modified the script such that I believe it will work for you, but I was on the bus without a network connection (now posting by phone). Will upload and link to it later tonight, 7 or 8 hours from now.
Please take a look at our online documentation, here. Suggestions are welcome!

User avatar
Ahau
King of Docs
King of Docs
Posts: 1331
Joined: 28 Dec 2010, 15:18
Distribution: LXDE & Xfce 32/64-bit
Location: USA

Re: Selecting Default Sound Card

Post#9 by Ahau » 15 Nov 2013, 06:20

Ok, updated script has been uploaded, it's here: http://porteus-xfce.googlecode.com/file ... ard-select

That's the same path as the link I posted above; I deleted the old file and replaced it with the new one. Instructions are the same; download it, open a terminal, su to root, chmod +x to make it executable, then ./gtk-soundcard-select to open the GUI. kwhitefoot, you'll probably want to select the second option down, which will be shown as "Generic_1: HDA-Intel - HD-Audio Generic" or something similar; click "apply" and then test. If it doesn't work, please give me the output of 'cat /etc/asound.conf'. This will find its way into Porteus 3.0, so this early testing is great :)

Also, I'm thinking about making it so that the "test" button gets deactivated after you select a new card and before you hit the "apply" button, because if you test it before you apply a change, it will be testing the existing configuration (it has to unload drivers and restart alsa and such before it can test the new configuration). Let me know what you think about that, I want it to be easy to use.

Thanks!
Please take a look at our online documentation, here. Suggestions are welcome!

kwhitefoot
White ninja
White ninja
Posts: 5
Joined: 14 Nov 2013, 19:42
Distribution: Porteus-v2.1 Razor
Location: Europe

Re: Selecting Default Sound Card

Post#10 by kwhitefoot » 18 Nov 2013, 18:51

Thanks for the script.

Now I get choices Generic and Generic_1.

I choose Generic_1 and then click Apply. Then I get the same message as before:

One or more programs that utilize your device ... Please try closing the following programs ...

razor-panel

I think that for me and my specific setup this is the first problem that needs to be solved.

kwhitefoot
White ninja
White ninja
Posts: 5
Joined: 14 Nov 2013, 19:42
Distribution: Porteus-v2.1 Razor
Location: Europe

Re: Selecting Default Sound Card

Post#11 by kwhitefoot » 18 Nov 2013, 19:45

Got it working by installing another desktop manager running xwmconfig to choose it (fvwm95) then reboot.

Opened a terminal became root ran the script again chose Generic_1, Apply.

Clicked Test but still no sound. Clicked Exit.

Ran xwmconfig again to switch back to razor and rebooted.

Ran VLC picked Harvest Moon Natural Beauty and those glorious harmonica notes came soaring out of my cans.

So I think my problem all along was that razor was preventing the switch from Generic to Generic_1.

I celebrated by finding a Youtube video of Natural Beauty https://www.youtube.com/watch?v=RL3mt2WJZtAto see if that would play too, and yes it did, flawlessly both sound and video.

So I think that what is needed is to somehow make razor not hold on to the resource, presumably the culprit is the volume control but I tried removing it and it didn't help.

Alternatively change the settings without trying to activate them and then reboot.

User avatar
Ahau
King of Docs
King of Docs
Posts: 1331
Joined: 28 Dec 2010, 15:18
Distribution: LXDE & Xfce 32/64-bit
Location: USA

Re: Selecting Default Sound Card

Post#12 by Ahau » 18 Nov 2013, 19:48

Ok, i'll have to do some testing to find out why it's not managing the panel properly and come up with a fix.

For now, try opening a terminal and kill your razor panel:

Code: Select all

kill `pidof razor-panel`
That will remove your panel. Then run the script, hopefully it will all get through, then you can restart the panel, I'm guessing it's as simple as running 'razor-panel'.

I'll poke through razor and see if I can find a solution within the script this afternoon.
Please take a look at our online documentation, here. Suggestions are welcome!

User avatar
brokenman
Site Admin
Site Admin
Posts: 6105
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v4 all desktops
Location: Brazil

Re: Selecting Default Sound Card

Post#13 by brokenman » 18 Nov 2013, 22:20

Killing the process will probably see it bounce right back. You'll need to find a way to kill just the panel applet before running the sound config as the volume applet is what is using the sound card.
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
Ahau
King of Docs
King of Docs
Posts: 1331
Joined: 28 Dec 2010, 15:18
Distribution: LXDE & Xfce 32/64-bit
Location: USA

Re: Selecting Default Sound Card

Post#14 by Ahau » 18 Nov 2013, 23:34

Oh yeah, I had to use qdbus for stopping it :)

I found the problem, I transposed a variable wrong. "for a in $rzuser; do su --login $x" should be $a in both cases.

will update once again tonight; in the mean time, you can log on to razor as root at it will work there.
Please take a look at our online documentation, here. Suggestions are welcome!

User avatar
Ahau
King of Docs
King of Docs
Posts: 1331
Joined: 28 Dec 2010, 15:18
Distribution: LXDE & Xfce 32/64-bit
Location: USA

Re: Selecting Default Sound Card

Post#15 by Ahau » 19 Nov 2013, 06:54

Ok, here we go:

http://porteus-xfce.googlecode.com/file ... ard-select

Sorry this one has been such a mess ;)
Please take a look at our online documentation, here. Suggestions are welcome!

Post Reply