audacity icon indicating copy to clipboard operation
audacity copied to clipboard

snap 910 can't see most/any devices reliably.

Open lakester opened this issue 4 years ago • 24 comments

Running in Ubuntu 20.04. Snap 857 works fine. Sees Alsa's "pulse" device and various others. Reliably. Snap 910 never sees the pulse device and only intermittently sees other devices. I'm sorry that I don't know much about the snap env, but I can't help but notice the increase in size of 910 from 857, I wonder if there were problems w/ integration of new/various dependencies. Problem has been reported by others on the Audacity Forum in the Linux area.

lakester avatar Jul 21 '21 18:07 lakester

I've got the same problem. As I've also stumbled into the audacity forums here's the link @lakester mentioned: https://forum.audacityteam.org/viewtopic.php?f=48&t=119186

~By the way, I've also tried the flatpak version and the behaviour was similar but worse.~ The flatpak version as well as the apt version (2.4.2) work when selecting pulse (though there are UI errors preventing it from properly showing), opening pavucontrol and selecting the correct source.

3ter avatar Jul 26 '21 13:07 3ter

Hi,

Can you try connecting the audio-record interface? In the terminal execute:

sudo snap connect audacity:audio-record

lucyllewy avatar Jul 26 '21 14:07 lucyllewy

Thanks for the hint @diddledan . Unfortunately I've tried that before but to no avail. It doesn't need a reboot after connecting the plug, does it?

As I've uninstalled the snap I also can't go back to 857 as all channels feature 910:

channels:
  latest/stable:    3.0.2 2021-07-12 (910) 246MB -
  latest/candidate: 3.0.2 2021-07-12 (910) 246MB -
  latest/beta:      ↑                            
  latest/edge:      3.0.2 2021-07-12 (910) 246MB -

3ter avatar Jul 26 '21 14:07 3ter

I can't reproduce this on Ubuntu 21.04 - I don't have 20.04 to test with, unfortunately. I've reverted the stable channel to 857 for now. Could you refresh to edge (sudo snap refresh --edge audacity)so that you've still got revision 910 and run the following commands and paste the output here please?

snap version
snap connections audacity

lucyllewy avatar Jul 26 '21 15:07 lucyllewy

Thanks for the quick action (with 857 everything is peachy :peach: again ). I'm on 21.04 as well.

$ snap version 
snap    2.51.1
snapd   2.51.1
series  16
ubuntu  21.04
kernel  5.11.0-25-generic
$ snap connections audacity 
Interface               Plug                      Slot                              Notes
alsa                    audacity:alsa             :alsa                             manual
audio-playback          audacity:audio-playback   :audio-playback                   -
audio-record            audacity:audio-record     -                                 -
content[gtk-2-engines]  audacity:gtk-2-engines    gtk2-common-themes:gtk-2-engines  -
content[gtk-2-themes]   audacity:gtk-2-themes     gtk-common-themes:gtk-2-themes    -
content[icon-themes]    audacity:icon-themes      gtk-common-themes:icon-themes     -
content[sound-themes]   audacity:sound-themes     gtk-common-themes:sound-themes    -
desktop                 audacity:desktop          :desktop                          -
desktop-legacy          audacity:desktop-legacy   :desktop-legacy                   -
gsettings               audacity:gsettings        :gsettings                        -
home                    audacity:home             :home                             -
jack1                   audacity:jack1            -                                 -
network                 audacity:network          :network                          -
network-bind            audacity:network-bind     :network-bind                     -
pulseaudio              audacity:pulseaudio       :pulseaudio                       -
removable-media         audacity:removable-media  -                                 -
unity7                  audacity:unity7           :unity7                           -
wayland                 audacity:wayland          :wayland                          -
x11                     audacity:x11              :x11                              -

3ter avatar Jul 26 '21 15:07 3ter

I see you've got the alsa interface connected. Can you try the revision 910 from edge again with alsa disconnected? Run the following command to disconnect it:

sudo snap disconnect audacity:alsa

If that improves things (it'll remove any extra entries in audacity for your actual hardware and leave you with just "default") by allowing you to record at all then it might be that there's a bug in my snapcraft-alsa setup.

lucyllewy avatar Jul 26 '21 16:07 lucyllewy

Thx for the follow-up y'all! I'm a snap noob..., but I'm willing to assist so long as anything I do is revertable to my current working state. Specific command sequences for the "do" and "undo" are great. Again, thx.

lakester avatar Jul 26 '21 16:07 lakester

you can run the following to undo testing the edge version:

sudo snap refresh --stable audacity

And to undo a disconnect repeat the command with connect instead, e.g. for alsa:

sudo snap connect audacity:alsa

lucyllewy avatar Jul 26 '21 16:07 lucyllewy

Running on 20.04. (ThinkPad P15Gen1)

#snap refresh --edge audacity ALSA devices are shown for both input and output. It's a new laptop for me, so I don't know what each of the devices maps to..., but FWIW..., I can only record from "default". Pulse is not available. Interestingly, the same set of devices are showing up reliably, which wasn't the case earlier.

#snap disconnect audacity:alsa Only "default" is shown for both input and output. Can record/playback, but of course..., since I use this for production of a radio program..., I need access to an external USB codec.

#snap connect audacity:alsa #snap refresh --stable audacity Full device access, including pulse, is restored.

lakester avatar Jul 26 '21 17:07 lakester

Is there a file called $HOME/snap/audacity/common/Always use PulseAudio? You can check with:

ls -l "$HOME/snap/audacity/common/Always use PulseAudio"

If you have this file, can I ask that you try renaming it or moving it out of the common/ folder and test one more time? Preferably with alsa connected so that you see all your devices.

lucyllewy avatar Jul 26 '21 19:07 lucyllewy

I for my part on 21.04 don't have that file

$ ls ~/snap/audacity/common -la
total 12
drwxr-xr-x 3 dennis dennis 4096 Jul 26 17:32 .
drwxr-xr-x 5 dennis dennis 4096 Jul 26 17:35 ..
drwx------ 5 dennis dennis 4096 Jul 26 17:35 .cache

3ter avatar Jul 26 '21 19:07 3ter

On 20.04..., do not have the file.

lakester avatar Jul 26 '21 19:07 lakester

ok, that is good - means you're definitely using alsa when the interface is connected. can I ask for the output of snappy-debug while starting audacity? This requires another snap to be installed and running in a terminal while you launch audacity:

sudo snap install snappy-debug
sudo snappy-debug

There might also be some helpful output if you run audacity in a terminal as well, rather than via the icon while you reproduce the issue. The terminal command is simply:

audacity

or

snap run audacity

lucyllewy avatar Jul 26 '21 20:07 lucyllewy

will leave the alsa plug connected but will fresh to --edge... results..., in a bit...

lakester avatar Jul 26 '21 20:07 lakester

Also, could you check that there is some output from running:

cat /sys/fs/cgroup/devices/snap.audacity.audacity/devices.list | grep 116

This will tell us whether the alsa devices have been correctly added into the audacity snap's "cgroup" permitting the access. Each line should be similar to c 116:[number] rwm where [number] is a number rather than the literal text.

I might be silly to ask this, but can you also check that the files in /dev/snd are granted read and write permission to the audio group and that you are a member of that group (run id to see your groups), or if the files in /dev/snd are assigned a different group with read and write permission that you are a member of that group too.

lucyllewy avatar Jul 26 '21 20:07 lucyllewy

I'll also post this on forum.snapcraft.io because this is confusing me and I need more help in diagnosing, which the snapd/snapcraft developers can help with :-)

lucyllewy avatar Jul 26 '21 20:07 lucyllewy

Heh..., slim pickings... snappy-debug:

INFO: Following '/var/log/syslog'. If have dropped messages, use:
INFO: $ sudo journalctl --output=short --follow --all | sudo snappy-debug
kernel.printk_ratelimit = 0
WARN: could not find log mark, is syslog enabled?

kernel.printk_ratelimit = 5

and audacity:

ln: failed to create symbolic link '/home/saare/snap/audacity/910/.config/gtk-2.0/gtkfilechooser.ini': File exists
Testing for explicit PulseAudio choice...
Testing for ALSA permissions...
...and using ALSA.

lakester avatar Jul 26 '21 20:07 lakester

The forum thread is at https://forum.snapcraft.io/t/audacity-troubles-when-using-alsa/25698 if you want to follow along... :-)

lucyllewy avatar Jul 26 '21 20:07 lucyllewy

root@thinkpad:~# cat /sys/fs/cgroup/devices/snap.audacity.audacity/devices.list | grep 116
c 116:9 rwm
c 116:6 rwm
c 116:7 rwm
c 116:8 rwm
c 116:2 rwm
c 116:3 rwm
c 116:4 rwm
c 116:5 rwm
c 116:10 rwm
c 116:18 rwm
c 116:19 rwm
c 116:12 rwm
c 116:11 rwm
c 116:17 rwm
c 116:13 rwm
c 116:14 rwm
c 116:15 rwm
c 116:16 rwm
c 116:20 rwm
c 116:1 rwm
c 116:33 rwm

will follow-up shortly w/ remaining info...

lakester avatar Jul 26 '21 20:07 lakester

/dev/snd nodes are ug+rw..., where group is audio. My login id is not an "audio" group member.

lakester avatar Jul 26 '21 20:07 lakester

My login id is not an "audio" group member.

That might be the issue (though why that isn't an issue for revision 857 is odd). Can you run the following, then log-out and login again to get the new group assignment:

sudo adduser $USER audio

lucyllewy avatar Jul 26 '21 20:07 lucyllewy

behavior unchanged.

lakester avatar Jul 26 '21 20:07 lakester

Snap 914 has no pulse access. Unfortunately, can no longer revert..., so am dead in water.

lakester avatar Sep 25 '21 22:09 lakester

I see you've got the alsa interface connected. Can you try the revision 910 from edge again with alsa disconnected? Run the following command to disconnect it:

sudo snap disconnect audacity:alsa

If that improves things (it'll remove any extra entries in audacity for your actual hardware and leave you with just "default") by allowing you to record at all then it might be that there's a bug in my snapcraft-alsa setup.

Hello,

New install POP_OS brought me to this thread. When I connect ALSA I am able to record USB inputs but unable to record system sounds. When I disconnect I am able to record system sounds. Of course as mentioned I can only see default. It's a work around but... Please let me know if there are any logs you need for further review. Thanks in advance for your help! BTW thgis all works regardless if I connect audio-record at this point I have it connected as a point of reference.

mpgnetz avatar Jun 12 '22 14:06 mpgnetz