Results 1 to 3 of 3

Thread: pacmd set-default-sink doesn't work from the first time

  1. #1
    Join Date
    Dec 2006
    Beans
    112
    Distro
    Ubuntu

    Question pacmd set-default-sink doesn't work from the first time

    Hello,

    I made a script which allows me to switch audio setup for two use cases: analog stereo for desktop use and 5.1 digital for home theater.

    I do two steps in this script:
    Code:
    pacmd set-card-profile <card> <profile>
    pacmd set-default-sink <sink>
    I.e. it looks like this:
    Code:
    pacmd set-card-profile alsa_card.pci-0000_00_1b.0 output:iec958-ac3-surround-51
    pacmd set-default-sink alsa_output.pci-0000_00_1b.0.iec958-ac3-surround-51
    ...
    pacmd set-card-profile alsa_card.pci-0000_00_1b.0 output:analog-stereo
    pacmd set-default-sink alsa_output.pci-0000_00_1b.0.analog-stereo
    This worked fine in Ubuntu 19.04, but in 19.10 I have to set the default sink twice, since it doesn't work from the first try.

    What would that be?

    Update:
    I noticed (looking at paman) that set-default-sink does work from the first time, but then (in a second) gets switched sometimes to a wrong sink (digital stereo).
    Last edited by 0x656b694d; 2 Weeks Ago at 11:00 PM. Reason: update

  2. #2
    Join Date
    Dec 2006
    Beans
    112
    Distro
    Ubuntu

    Re: pacmd set-default-sink doesn't work from the first time

    The issue looks to be in the Sound Input & Output Device Chooser gnome extension!
    Cannot reproduce the problem after disabling the extension.

  3. #3
    Join Date
    Nov 2013
    Beans
    32

    Re: pacmd set-default-sink doesn't work from the first time

    use pactl commands instead of pacmd
    pacmd commands do not work so good in bash script

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •