Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 493238 - media-sound/pulseaudio-5.0 module-switch-on-port-available causes failing of profile restore
Summary: media-sound/pulseaudio-5.0 module-switch-on-port-available causes failing of ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL: https://bugs.freedesktop.org/show_bug...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-03 17:24 UTC by Till Schäfer
Modified: 2014-06-12 17:48 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Till Schäfer 2013-12-03 17:24:41 UTC
Since the upgrade to pulseaudio 4.0 my computer recognizes two output sinks (analog output and digital output over hdmi). 

When selecting the tab "audio hardware setup" in KDEs phonon settings, you can configure different profiles for your sound card. I need to select the profile "analog stereo duplex" or "analog stereo output" to get analog output channel activated and displayed in kmix.

The problem is, that this settings are reseted after reboot. It always defaults to  "Digital Stereo (HDMI) Output" profile. 

What makes the profiles a bit more curious: The HDMI output sink is always there, even if i select the analog only profile. This is not the case the other way round. I don't know if this has something to to with the problem, but mentioning it will not hurt ;) 

Should i report this upstream to KDE or are the profiles saved in pulseaudio by channel reseting?

Reproducible: Always

Steps to Reproduce:
1. select analog profile
2. reboot



emerge --info
Portage 2.2.7 (default/linux/amd64/13.0/desktop/kde, gcc-4.7.3, glibc-2.16.0, 3.10.17-gentoo x86_64)
=================================================================
System uname: Linux-3.10.17-gentoo-x86_64-Intel-R-_Core-TM-_i7-3770_CPU_@_3.40GHz-with-gentoo-2.2
KiB Mem:    15989736 total,   7593640 free
KiB Swap:   16801788 total,  16801788 free
Timestamp of tree: Tue, 03 Dec 2013 11:00:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
app-shells/bash:          4.2_p45
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.7.5-r3, 3.3.2-r2
dev-util/cmake:           2.8.11.2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.12.6, 1.13.4
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.7.3-r1
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)
sys-libs/glibc:           2.16.0
Repositories: gentoo local_overlay
Installed sets: @kdeartwork-4.11, @kdebase-4.11, @system
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -ggdb"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-3.0 /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe -ggdb"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y --autounmask-write --jobs=5 --load-average=10.0"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch parallel-install preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j9"
PKGDIR="/usr/portage/packages"
PORTAGE_BZIP2_COMMAND="/usr/bin/pbzip2"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
USE="64bit X a52 aac acl acpi alsa amd64 bash-completion berkdb bluetooth branding bzip2 cairo cdaudio cdda cddb cdio cdr cli consolekit cracklib crypt css cups cxx dbus declarative dell dri dts dvd dvdr emboss encode exif fam ffmpeg firefox flac fortran gdbm gif glib glibc gpm gtk haskell iconv icu id3tag ieee1394 imagemagick inotify ipv4 ipv6 irc java jpeg jpeg2k kde kipi lame latex lcms ldap libnotify libsamplerate lzma mad mmx mmxext mng modules mp3 mp4 mpeg mplayer mudflap multilib musicbrainz ncurses nls nptl ntp ogg okteta opengl openmp otr pam pango pcre pdf phonon plasma pm-utils png policykit ppds pulseaudio qemu qt3support qt4 quicktime rar readline real rss sdl semantic-desktop session spell spice sse sse2 sse3 sse4 sse4_1 ssl ssse3 startup-notification svg syslog taglib tcpd threads tiff truetype udev udisks unicode upower usb v41 v412 v4l vaapi vcd vim-syntax visualization vorbis wavpack wifi wma wmf wxwidgets x264 xcb xcomposite xine xinerama xml xscreensaver xv xvid xvmc zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="de" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby19 ruby18" USERLAND="GNU" VIDEO_CARDS="intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC, USE_PYTHON
Comment 1 Till Schäfer 2013-12-03 17:27:26 UTC
I mean channel restoring (by module-default-device-restore ?)  in the last sentence.
Comment 2 Till Schäfer 2013-12-03 20:01:33 UTC
i looked a bit deeper into pulseaudios configuration and i can now say, that this is definitely a pulseaudio problem. 

if i disable the pulseaudio module module-switch-on-port-available everything works as expected. It seems that this module switches to hdmi after restoring everything correctly.
Comment 3 Till Schäfer 2013-12-03 20:13:37 UTC
seems that the following patch is not working anymore or maybe the state of the current port is unavailable at that time?

http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/src/modules/module-switch-on-port-available.c?id=1f97db720bd533a7b367a7d3123a493196125828


somehow the DELL monitor is also an available sink, which does not make sense since it has no sound output: 


$ pacmd
Welcome to PulseAudio! Use "help" for usage information.
>>> describe-module module-switch-on-port-available:
Failed to open module.
>>> list-cards
1 card(s) available.
    index: 0
        name: <alsa_card.pci-0000_00_1b.0>
        driver: <module-alsa-card.c>
        owner module: 4
        properties:
                alsa.card = "0"
                alsa.card_name = "HDA Intel PCH"
                alsa.long_card_name = "HDA Intel PCH at 0xf7c30000 irq 22"
                alsa.driver_name = "snd_hda_intel"
                device.bus_path = "pci-0000:00:1b.0"
                sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card0"
                device.bus = "pci"
                device.vendor.id = "8086"
                device.vendor.name = "Intel Corporation"
                device.product.id = "1e20"
                device.product.name = "7 Series/C210 Series Chipset Family High Definition Audio Controller"
                device.form_factor = "internal"
                device.string = "0"
                device.description = "Built-in Audio"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-pci"
        profiles:
                input:analog-stereo: Analog Stereo Input (priority 60, available: unknown)
                output:analog-stereo: Analog Stereo Output (priority 6000, available: unknown)
                output:analog-stereo+input:analog-stereo: Analog Stereo Duplex (priority 6060, available: unknown)
                output:hdmi-stereo: Digital Stereo (HDMI) Output (priority 5400, available: unknown)
                output:hdmi-stereo+input:analog-stereo: Digital Stereo (HDMI) Output + Analog Stereo Input (priority 5460, available: unknown)
                output:hdmi-surround: Digital Surround 5.1 (HDMI) Output (priority 300, available: unknown)
                output:hdmi-surround+input:analog-stereo: Digital Surround 5.1 (HDMI) Output + Analog Stereo Input (priority 360, available: unknown)
                output:hdmi-stereo-extra1: Digital Stereo (HDMI) Output (priority 5200, available: unknown)
                output:hdmi-stereo-extra1+input:analog-stereo: Digital Stereo (HDMI) Output + Analog Stereo Input (priority 5260, available: unknown)
                off: Off (priority 0, available: unknown)
        active profile: <output:analog-stereo+input:analog-stereo>
        sinks:
                alsa_output.pci-0000_00_1b.0.analog-stereo/#0: Built-in Audio Analog Stereo
        sources:
                alsa_output.pci-0000_00_1b.0.analog-stereo.monitor/#0: Monitor of Built-in Audio Analog Stereo
                alsa_input.pci-0000_00_1b.0.analog-stereo/#1: Built-in Audio Analog Stereo
        ports:
                analog-input-microphone-front: Front Microphone (priority 8500, latency offset 0 usec, available: no)
                        properties:
                                device.icon_name = "audio-input-microphone"
                analog-input-microphone-rear: Rear Microphone (priority 8200, latency offset 0 usec, available: no)
                        properties:
                                device.icon_name = "audio-input-microphone"
                analog-input-linein: Line In (priority 8100, latency offset 0 usec, available: no)
                        properties:

                analog-output: Analog Output (priority 9900, latency offset 0 usec, available: unknown)
                        properties:

                analog-output-speaker: Speakers (priority 10000, latency offset 0 usec, available: no)
                        properties:
                                device.icon_name = "audio-speakers"
                analog-output-headphones: Headphones (priority 9000, latency offset 0 usec, available: yes)
                        properties:
                                device.icon_name = "audio-headphones"
                hdmi-output-0: HDMI / DisplayPort (priority 5900, latency offset 0 usec, available: no)
                        properties:
                                device.icon_name = "video-display"
                hdmi-output-1: HDMI / DisplayPort 2 (priority 5800, latency offset 0 usec, available: yes)
                        properties:
                                device.icon_name = "video-display"
                                device.product.name = "DELL U2713HM"
Comment 4 Johannes Huber gentoo-dev 2013-12-03 21:04:29 UTC
Moving to pulseaudio maintainer then.
Comment 5 Till Schäfer 2013-12-06 10:20:36 UTC
is there anyway to blacklist a device in pulseaudio? 

                hdmi-output-1: HDMI / DisplayPort 2 (priority 5800, latency offset 0 usec, available: yes)
                        properties:
                                device.icon_name = "video-display"
                                device.product.name = "DELL U2713HM"


The DELL U2713HM has no audio or hdmi outputs. therefore this port should never be available.
Comment 6 Pacho Ramos gentoo-dev 2014-02-16 21:25:48 UTC
Please retry with 4.99.4 that includes some changes on this
Comment 7 Till Schäfer 2014-03-10 13:24:12 UTC
sry for the late reply: the bug is still present in pulseaudio-5.0
Comment 8 Pacho Ramos gentoo-dev 2014-03-10 21:07:32 UTC
Please report to upstream and post the link here to allow us to track the issue:
https://bugs.freedesktop.org
Comment 9 Till Schäfer 2014-03-12 13:03:25 UTC
i will do so as soon the pulseaudio.org website is up again :-/
Comment 10 Pacho Ramos gentoo-dev 2014-03-12 20:39:40 UTC
They use bugzilla.freedesktop.org that, as far as I know, is independent of pulseaudio.org page ;)
Comment 11 Till Schäfer 2014-03-13 11:15:28 UTC
upstream bug from 2014 found: https://bugs.freedesktop.org/show_bug.cgi?id=73375
Comment 12 Pacho Ramos gentoo-dev 2014-06-12 17:48:34 UTC
+*pulseaudio-5.0-r2 (12 Jun 2014)
+
+  12 Jun 2014; Pacho Ramos <pacho@gentoo.org>
+  +files/pulseaudio-5.0-crash-udp.patch,
+  +files/pulseaudio-5.0-module-switch.patch, +pulseaudio-5.0-r2.ebuild:
+  Fix CVE-2014-3970 (#512516), bash-completion dir (#509486 by poncho) and apply
+  a patch from upstream used in Fedora to fix the profiles switching.
+