0

I just upgraded from 19.04 to 20.04. Now all of a sudden I find my audio gone haywire

Issue: I have a USB audio adapter (Unitek Y-247A) which connects to a set of speakers. But when my cron opens any music player (audacious, clementine, etc), it by default plays in "Built-in Audio" and not USB Unitek adapter. But when I open any of these music players manually, it plays using the USB Unitek adapter.

So why when these music player is opened manually it recognized the audio adapter, but when it's opened via cron it doesn't. The music plays using built-in audio adpater but doesn't show in the audio settings.

I even installed pavucontrol (pulse audio volume control) and tried to watch all streams and these are my findings:

  1. When I play anything manually (from clementine, firefox etc), I see it listed under the Applications tab as shown in the figure below. When I say manually, I meant invoking manually by double clicking on the icon.

Figure 1: When clementine was invoked manually

  1. But when I play using the cron, it doesn't show up in the Audio Settings, as shown in the figure below. But it is playing in the built-in laptop audio but not in my usb adapter (Unitek adapter)

Figure 2: When clementine was invoked via cron

My cron /var/log/syslog output below

...
...
Apr 27 20:08:59 user-Lenovo crontab[7033]: (soul) REPLACE (soul)
Apr 27 20:08:59 user-Lenovo crontab[7033]: (soul) END EDIT (soul)
Apr 27 20:09:01 user-Lenovo cron[916]: (soul) RELOAD (crontabs/soul)
Apr 27 20:09:01 user-Lenovo CRON[7064]: (soul) CMD (export DISPLAY=:0 && read a</home/user/Scripts/PlaylistEnabler/.MornWeekDayPlaylist && [ $a -eq 1 ] && /usr/bin/clementine /home/user/Desktop/Playlist/soothingmusicplaylist.m3u >/dev/null 2>&1)
Apr 27 20:09:03 user-Lenovo dbus-daemon[2319]: [session uid=1000 pid=2317] Activating service name='org.freedesktop.Notifications' requested by ':1.13' (uid=1000 pid=7065 comm="/usr/bin/clementine /home/user/Desktop/Playlist/mo" label="unconfined")
...
...

My lsusb output below

    Me@Lenovo~$ lsusb
...
...
    Bus 001 Device 006: ID 05e3:0608 Genesys Logic, Inc. Hub
    Bus 001 Device 005: ID 0d8c:0014 C-Media Electronics, Inc. Audio Adapter (Unitek Y-247A)
    Bus 001 Device 002: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
...
...

Please let me know if you need any specific log files. Any help to point to the right direction will be really a help for me.

I tried to do the same with VLC player and captured the output device setting when it was played manually and when it was played via cron, please see below:

Figure 3: VLC audio setting captured while playing an audio file manually

Figure 4: VLC audio setting captured while playing an audio file via cron

I am totally confused on why when playing from cron it just doesnt recognize the USB Unitek adapter.

Again let me tell you, this used to work like a charm in 19.04, but with 20.04 something changed.

0 Answers0