Bug 302021 - PA ignores default sound device on gnome-sound-properties
PA ignores default sound device on gnome-sound-properties
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: pulseaudio (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Lennart Poettering
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-09-23 00:39 EDT by sangu
Modified: 2008-03-28 15:44 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-03-28 15:44:14 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Made sound log file from system-config-soundcard (56.68 KB, text/plain)
2007-09-23 00:39 EDT, sangu
no flags Details
scsconfig.log (58.36 KB, text/plain)
2007-11-11 16:09 EST, Christian Nolte
no flags Details

  None (edit)
Description sangu 2007-09-23 00:39:38 EDT
Description of problem:
PA ignores default sound device(hw:0) on gnome-sound-properties and
system-config-soundcard.

But hw1 is always default on pavucontrol. 

Version-Release number of selected component (if applicable):


How reproducible:
always

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
alsa-lib-1.0.15-0.2.rc2.fc8
control-center-2.20.0-1.fc8
pavucontrol-0.9.5-0.3.svn20070905.fc8
dbus-1.1.2-6.fc8
hal-0.5.10-0.git20070831.fc8

$cat /etc/modprobe.conf
[...]
options snd-card-0 index=0
options snd-emu10k1 index=0
remove snd-emu10k1 { /usr/sbin/alsactl store 0 >/dev/null 2>&1 || : ; };
/sbin/modprobe -r --ignore-remove snd-emu10k1
alias snd-card-1 snd-intel8x0
options snd-card-1 index=1
options snd-intel8x0 index=1
remove snd-intel8x0 { /usr/sbin/alsactl store 1 >/dev/null 2>&1 || : ; };
/sbin/modprobe -r --ignore-remove snd-intel8x0
[...]
see also : bug 290381
Comment 1 sangu 2007-09-23 00:39:38 EDT
Created attachment 203331 [details]
Made sound log file from system-config-soundcard
Comment 2 Lennart Poettering 2007-09-23 20:21:48 EDT
Most likely something was blocking your sound card so that PulseAudio couldn't
access it. Please run

pulseaudio -k
pulseaudio -vv

and paste the output. This will most likely tell you what the reason was why PA
couldn't open the device.
Comment 3 sangu 2007-09-25 07:42:08 EDT
$ pulseaudio -k
$ pulseaudio -vv
I: main.c: Page size is 4096 bytes
I: main.c: Fresh high-resolution timers available! Bon appetit!
D: cli-command.c: Checking for existance of
'/usr/lib/pulse-0.9/modules//module-hal-detect.so': success
I: module-hal-detect.c: Trying capability alsa
D: module-hal-detect.c: Not loaded device
/org/freedesktop/Hal/devices/computer_alsa_timer
D: module-hal-detect.c: Not loaded device
/org/freedesktop/Hal/devices/computer_alsa_sequencer
D: module-hal-detect.c: Not loaded device
/org/freedesktop/Hal/devices/pci_10de_59_alsa_playback_2
D: module-hal-detect.c: Not loaded device
/org/freedesktop/Hal/devices/pci_10de_59_alsa_capture_1
D: module-hal-detect.c: Loading module-alsa-sink with arguments 'device=hw:1
sink_name=alsa_output.pci_10de_59_alsa_playback_0'
W: alsa-util.c: Device hw:1 doesn't support 44100 Hz, changed to 48000 Hz.
I: module-alsa-sink.c: Successfully enabled mmap() mode.
I: alsa-util.c: Using mixer control "Master".
I: sink.c: Created sink 0 "alsa_output.pci_10de_59_alsa_playback_0" with sample
spec "s16le 2ch 48000Hz"
I: source.c: Created source 0 "alsa_output.pci_10de_59_alsa_playback_0.monitor"
with sample spec "s16le 2ch 48000Hz"
I: module-alsa-sink.c: Using 4 fragments of size 4408 bytes.
D: module-alsa-sink.c: ALSA device has separate volumes controls for all 2 channels.
D: module-alsa-sink.c: Thread starting up
D: rtpoll.c: Acquired POSIX realtime signal SIGRTMIN+10
I: module.c: Loaded "module-alsa-sink" (index: #0; argument: "device=hw:1
sink_name=alsa_output.pci_10de_59_alsa_playback_0").
I: module-alsa-sink.c: Starting playback.
D: module-hal-detect.c: Loading module-alsa-source with arguments 'device=hw:1
source_name=alsa_input.pci_10de_59_alsa_capture_0'
W: alsa-util.c: Device hw:1 doesn't support 44100 Hz, changed to 48000 Hz.
I: module-alsa-source.c: Successfully enabled mmap() mode.
I: alsa-util.c: Using mixer control "Capture".
I: source.c: Created source 1 "alsa_input.pci_10de_59_alsa_capture_0" with
sample spec "s16le 2ch 48000Hz"
I: module-alsa-source.c: Using 4 fragments of size 4408 bytes.
D: module-alsa-source.c: Thread starting up
D: rtpoll.c: Acquired POSIX realtime signal SIGRTMIN+11
I: module.c: Loaded "module-alsa-source" (index: #1; argument: "device=hw:1
source_name=alsa_input.pci_10de_59_alsa_capture_0").
D: module-hal-detect.c: Not loaded device
/org/freedesktop/Hal/devices/pci_1102_2_alsa_playback_3
D: module-hal-detect.c: Not loaded device
/org/freedesktop/Hal/devices/pci_1102_2_alsa_playback_2
D: module-hal-detect.c: Not loaded device
/org/freedesktop/Hal/devices/pci_1102_2_alsa_capture_2
D: module-hal-detect.c: Not loaded device
/org/freedesktop/Hal/devices/pci_1102_2_alsa_capture_1
D: module-hal-detect.c: Loading module-alsa-sink with arguments 'device=hw:0
sink_name=alsa_output.pci_1102_2_alsa_playback_0'
I: module-alsa-sink.c: Successfully enabled mmap() mode.
I: alsa-util.c: Using mixer control "Master".
I: sink.c: Created sink 1 "alsa_output.pci_1102_2_alsa_playback_0" with sample
spec "s16le 2ch 44100Hz"
I: source.c: Created source 2 "alsa_output.pci_1102_2_alsa_playback_0.monitor"
with sample spec "s16le 2ch 44100Hz"
I: module-alsa-sink.c: Using 4 fragments of size 4408 bytes.
D: module-alsa-sink.c: ALSA device has separate volumes controls for all 2 channels.
D: module-alsa-sink.c: Thread starting up
D: rtpoll.c: Acquired POSIX realtime signal SIGRTMIN+12
I: module.c: Loaded "module-alsa-sink" (index: #2; argument: "device=hw:0
sink_name=alsa_output.pci_1102_2_alsa_playback_0").
I: module-alsa-sink.c: Starting playback.
D: module-hal-detect.c: Loading module-alsa-source with arguments 'device=hw:0
source_name=alsa_input.pci_1102_2_alsa_capture_0'
I: module-alsa-source.c: Successfully enabled mmap() mode.
I: alsa-util.c: Using mixer control "Capture".
I: source.c: Created source 3 "alsa_input.pci_1102_2_alsa_capture_0" with sample
spec "s16le 2ch 44100Hz"
I: module-alsa-source.c: Using 2 fragments of size 4096 bytes.
D: module-alsa-source.c: Thread starting up
D: rtpoll.c: Acquired POSIX realtime signal SIGRTMIN+13
I: module.c: Loaded "module-alsa-source" (index: #3; argument: "device=hw:0
source_name=alsa_input.pci_1102_2_alsa_capture_0").
D: module-hal-detect.c: Not loaded device
/org/freedesktop/Hal/devices/pci_1102_2_alsa_midi_2
D: module-hal-detect.c: Not loaded device
/org/freedesktop/Hal/devices/pci_1102_2_alsa_midi_1
D: module-hal-detect.c: Not loaded device
/org/freedesktop/Hal/devices/pci_1102_2_alsa_midi_0
D: module-hal-detect.c: Not loaded device
/org/freedesktop/Hal/devices/pci_1102_2_alsa_hw_specific_2
D: module-hal-detect.c: Not loaded device
/org/freedesktop/Hal/devices/pci_1102_2_alsa_hw_specific_0
D: module-hal-detect.c: Not loaded device
/org/freedesktop/Hal/devices/pci_10de_59_alsa_control__1
D: module-hal-detect.c: Not loaded device
/org/freedesktop/Hal/devices/pci_1102_2_alsa_control__1
I: module-hal-detect.c: Loaded 4 modules.
I: module.c: Loaded "module-hal-detect" (index: #4; argument: "").
I: module.c: Loaded "module-esound-protocol-unix" (index: #5; argument: "").
I: protocol-native.c: loading cookie from disk.
I: module.c: Loaded "module-native-protocol-unix" (index: #6; argument: "").
I: module-volume-restore.c: starting with empty ruleset.
I: module.c: Loaded "module-volume-restore" (index: #7; argument: "").
I: module.c: Loaded "module-default-device-restore" (index: #8; argument: "").
I: module.c: Loaded "module-rescue-streams" (index: #9; argument: "").
D: module-suspend-on-idle.c: Sink alsa_output.pci_10de_59_alsa_playback_0
becomes idle.
D: module-suspend-on-idle.c: Sink alsa_output.pci_1102_2_alsa_playback_0 becomes
idle.
D: module-suspend-on-idle.c: Source
alsa_output.pci_10de_59_alsa_playback_0.monitor becomes idle.
D: module-suspend-on-idle.c: Source alsa_input.pci_10de_59_alsa_capture_0
becomes idle.
D: module-suspend-on-idle.c: Source
alsa_output.pci_1102_2_alsa_playback_0.monitor becomes idle.
D: module-suspend-on-idle.c: Source alsa_input.pci_1102_2_alsa_capture_0 becomes
idle.
I: module.c: Loaded "module-suspend-on-idle" (index: #10; argument: "").
D: cli-command.c: Checking for existance of
'/usr/lib/pulse-0.9/modules//module-x11-publish.so': success
D: module-x11-publish.c: using already loaded auth cookie.
I: module.c: Loaded "module-x11-publish" (index: #11; argument: "").
D: cli-command.c: Checking for existance of
'/usr/lib/pulse-0.9/modules//module-gconf.so': success
D: module-gconf.c: Loading module 'module-native-protocol-tcp' with args '' due
to GConf configuration.
I: protocol-native.c: using already loaded auth cookie.
I: protocol-native.c: using already loaded auth cookie.
I: module.c: Loaded "module-native-protocol-tcp" (index: #12; argument: "").
D: module-gconf.c: Loading module 'module-esound-protocol-tcp' with args '' due
to GConf configuration.
I: module.c: Loaded "module-esound-protocol-tcp" (index: #13; argument: "").
I: module.c: Loaded "module-gconf" (index: #14; argument: "").
I: main.c: Daemon startup complete.
D: module-hal-detect.c: dbus: interface=org.freedesktop.DBus,
path=/org/freedesktop/DBus, member=NameAcquired
I: module-suspend-on-idle.c: Sink alsa_output.pci_10de_59_alsa_playback_0 idle
for too long, suspending ...
I: module-alsa-sink.c: Device suspended...
I: module-suspend-on-idle.c: Source alsa_input.pci_1102_2_alsa_capture_0 idle
for too long, suspending ...
I: module-alsa-source.c: Device suspended...
I: module-suspend-on-idle.c: Source
alsa_output.pci_1102_2_alsa_playback_0.monitor idle for too long, suspending ...
I: module-suspend-on-idle.c: Source alsa_input.pci_10de_59_alsa_capture_0 idle
for too long, suspending ...
I: module-alsa-source.c: Device suspended...
Comment 4 sangu 2007-09-25 07:47:57 EDT
== Launchpavucontrol ==
I: client.c: Created 0 "Native client (UNIX socket client)"
I: protocol-native.c: Got credentials: uid=500 gid=500 success=1
I: protocol-native.c: Enabled SHM for new connection
I: client.c: Client 0 changed name from "Native client (UNIX socket client)" to
"PulseAudio Volume Control"

== Lanuch gnome-sound-properties ==
D: core-subscribe.c: dropped redundant event.
I: client.c: Created 1 "Native client (UNIX socket client)"
I: protocol-native.c: Got credentials: uid=500 gid=500 success=1
I: protocol-native.c: Enabled SHM for new connection
I: client.c: Client 0 changed name from "Native client (UNIX socket client)" to
"PulseAudio Volume Control"
D: core-subscribe.c: dropped redundant event.
I: client.c: Created 1 "Native client (UNIX socket client)"
I: protocol-native.c: Got credentials: uid=500 gid=500 success=1
I: protocol-native.c: Enabled SHM for new connection
I: client.c: Client 1 changed name from "Native client (UNIX socket client)" to
"gnome-sound-properties"
I: client.c: Freed 1 "gnome-sound-properties"
I: protocol-native.c: connection died.
I: client.c: Created 2 "Native client (UNIX socket client)"
I: protocol-native.c: Got credentials: uid=500 gid=500 success=1
I: protocol-native.c: Enabled SHM for new connection
I: client.c: Client 2 changed name from "Native client (UNIX socket client)" to
"gnome-sound-properties"
I: client.c: Freed 2 "gnome-sound-properties"
I: protocol-native.c: connection died.
[...]
Comment 5 Lennart Poettering 2007-09-25 09:21:40 EDT
You know that you can right-click on an output device in pavucontrol and make it
the default?

The pa debug output looks you posted looks fine to me. May I close this bug?
Comment 6 Lennart Poettering 2007-09-25 09:25:21 EDT
BTW. s-c-s is being phased out. 

Nowadays sound devices should be identified only by their HAL UDI, no longer by
their ALSA device index. Which is what PA does now. ALSA device indexes cannot
be kept stable in a hotplug environment. 

I think this bug report is thus a bit obsolete, and I am thus closing it now. If
you feel otherwise, feel free to reopen it.
Comment 7 sangu 2007-09-25 09:44:29 EDT
(In reply to comment #5)
> You know that you can right-click on an output device in pavucontrol and make it
> the default?
Yes, I can do it, but After rebooting, the changed default setting doesn't be
saved .

(In reply to comment #5)

> BTW. s-c-s is being phased out. 
O.K
but then PA ignores default device on gnome-sound-properties.
Comment 8 sangu 2007-09-25 10:06:01 EDT
Whenever reboot,  I make hw:0 default output device on pavucontrol, again.

Additonal Information
$ cat ~/.gconf/desktop/gnome/sound/%gconf.xml 
<?xml version="1.0"?>
<gconf>
        <entry name="event_sounds" mtime="1189782378" type="bool" value="false">
        </entry>
        <entry name="default_mixer_tracks" mtime="1189791083" type="list"
ltype="string">
                <li type="string">
                        <stringvalue>Master</stringvalue>
                </li>
        </entry>
        <entry name="default_mixer_device" mtime="1190728378" type="string">
               
<stringvalue>pulsemixer:alsa_output.pci_1102_2_alsa_playback_0</stringvalue>
        </entry>
</gconf>
Comment 9 Lennart Poettering 2007-09-25 12:09:35 EDT
The PA version I uploaded into Rawhide yesterday contains
"module-default-device-restore" which is activated by default which will save
and restore the default devices in ~/.pulse/default-sink and
~/.pulse/default-source.

Unfortunately, gnome-sound-properties only controls GStreamer, not PA. I fear
this is not so easy to fix.
Comment 10 Lennart Poettering 2007-10-15 13:04:39 EDT
Any update on this?
Comment 11 Tom London 2007-11-08 09:50:16 EST
Believe I have a similar problem.....

Running latest rawhide, laptop has 2 sound devices:   82801G (Intel ICH7,
snd-hda-intel) and a USB 'capture only device' (Texas Inst. Japan Codec,
snd-usb-audio).  [The second device is actually a turntable.]

If I run 'pulseaudio -D' without the second (USB) device connected, all works
perfectly.

If I run 'pulseaudio -D' with the second (USB) device connected, pulseaudio
appears to home to it, and I get no audio output.  'pavucontrol' shows the USB
device 'on top' with neither devices shown as 'default'. Selecting the Intel
device as 'default' in pavucontrol appears to have no effect.  When in this
state, if I unplug the USB turntable, I get music.

I do not have ~/.pulse.   Is there some way to manually run
module-default-device-restore?
Comment 12 Tom London 2007-11-09 09:20:43 EST
Creating ~/.pulse and enabling 'esd mixer' on login seems to have fixed this for me.

[tbl@localhost ~]$ ls -l .pulse
total 24
-rw-r--r-- 1 tbl tbl  42 2007-11-08 18:08 default-sink
-rw-r--r-- 1 tbl tbl   1 2007-11-08 18:08 default-source
-rw-r--r-- 1 tbl tbl 187 2007-11-08 18:08 volume-restore.table
[tbl@localhost ~]$ 

Comment 13 Christian Nolte 2007-11-11 16:08:15 EST
Similar problem here: PA does not remember the selected default audio device
between X-sessions (log-out/log-off). Another problem is that hw:0 was not the
default device on a fresh install of F8. Gave me some headaches to find the problem.

[nolte@ravine ~]$ cat /proc/asound/cards 
 0 [Audigy         ]: Audigy - Audigy 1 [SB0090]
                      Audigy 1 [SB0090] (rev.3, serial:0x511102) at 0x9c00, irq 5
 1 [NVidia         ]: HDA-Intel - HDA NVidia
                      HDA NVidia at 0xfe020000 irq 11

BTW: I have no ~/.pulse too.
Comment 14 Christian Nolte 2007-11-11 16:09:26 EST
Created attachment 254831 [details]
scsconfig.log
Comment 15 Gian Paolo Mureddu 2007-11-27 04:02:11 EST
Is seriously the only solution to run a sound server upon another sound server
(AKA ESD over PA)?
Comment 16 Jason Farrell 2007-12-04 03:14:17 EST
This bug hit me as well after a clean install of F8. All audio output was being
sent to my unused onboard audio.

I've got an audigy and an onboard soundcard, but the PA hal plugin would always
pick my unused onboard sound as the default, even though my audigy had the hw:0
zero index. Using pavucontrol (from KDE) I could manually change the sink
device, but it wouldn't persist. No ~/.pulse exists here either.

I was able to fix this in two ways:
1) editing /etc/pulse/default.pa to disable module-hal-detect and instead
SPECIFY the correct device.
2) disabling my onboard sound in BIOS such that only the audigy was detected.

I've stuck with disabling it in BIOS for now, but will toggle it back on and
test again at some point in the future.
Comment 17 Bruce Brackbill 2008-01-18 18:36:47 EST
In PA when I chose my second sound card as the default, PA would not remember it
after reboot and set the default back to my on-board sound card.

But a couple of days ago, it started to remember it.  weird.  Maybe an update
fixed it. ( Fedora 8 )
Comment 18 Bruce Brackbill 2008-03-09 05:06:45 EDT
See comment #17

The problem is back with the March 7/8 update.
Comment 19 Lennart Poettering 2008-03-28 15:44:01 EDT
These are actually a few different issues mangled into a single bug report.

First, s-c-s creates modprobe.conf fragments that break hotplug audio. Please
make sure to remove all those fragments generated by s-c-s from /etc/modprobe.d/

Then, gnome-sound-properties default device selection stuff is not PA aware. So
please, instead of selecting a device there, make sure to just select
"PulseAudio" as "device" and let PA do the rest for you. Of course, in one of
the next releases of Fedora we will teach g-s-p PA support. This is not
available yet, however.

Then, PA didn't create ~/.pulse in some of the older releases. This has been
fixed a while back in Rawhide.

Then, right click on the device in pavucontrol and make it the default. PA will
remember the device a stream was last connected to. Hence, right click on every
stream and move it to your new default device.


Note You need to log in before you can comment on or make changes to this bug.