FS#80082 - [scratch] could not find module vm-sound-ALSA

Attached to Project: Arch Linux
Opened by bill-auger (bill-auger) - Wednesday, 25 October 2023, 20:29 GMT
Last edited by Toolybird (Toolybird) - Thursday, 26 October 2023, 18:52 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jonathan Steel (jsteel)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

squeak fails to start if pulseaudio is not installed, either by running `scratch` per the wrapper script, or squeak itself explicitly with the '-vm-sound-ALSA' option

$ scratch
Executing: /usr/lib/squeak/4.10.2-2614/squeakvm -encoding UTF-8 -vm-display-x11 -plugins /usr/lib/scratch/Plugins/:/usr/lib/squeak/4.10.2-2614/ -vm-sound-ALSA /usr/lib/scratch/Scratch.image
could not find module vm-sound-ALSA
Aborted (core dumped)

in /usr/bin/scratch:
# if pulseaudio is running, use it. Otherwise fall back to ALSA
if pulseaudio --check 2>/dev/null ; then
VMOPTIONS="$VMOPTIONS -vm-sound-pulse"
else
VMOPTIONS="$VMOPTIONS -vm-sound-ALSA"
fi

squeak will start without that option; but it will produce no sound

$ /usr/lib/squeak/4.10.2-2614/squeakvm -encoding UTF-8 -vm-display-x11 -plugins /usr/lib/scratch/Plugins/:/usr/lib/squeak/4.10.2-2614/ /usr/lib/scratch/Scratch.image
/build/squeak-vm/src/Squeak-4.10.2.2614-src/unix/vm-sound-pulse/sqUnixSoundPulseAudio.c: pa_simple_new() failed: Connection refused
This task depends upon

Closed by  Toolybird (Toolybird)
Thursday, 26 October 2023, 18:52 GMT
Reason for closing:  Fixed
Additional comments about closing:  squeak-vm 4.10.2.2614-7
Comment by Toolybird (Toolybird) - Wednesday, 25 October 2023, 20:40 GMT
Have you looked at  FS#75397 ?
Comment by bill-auger (bill-auger) - Thursday, 26 October 2023, 05:58 GMT
sry, i did not see  FS#75397  because it is closed - i was not looking for closed bug reports; because the bug still exists - the reason for closing  FS#75397  is not applicable to this ticket - it is essentially 'wont-fix', with the rationale that squeak does not support pipewire - so closing  FS#75397  seems reasonable on that basis

however, that ticket was only addressing scratch and pipewire; but neither are the cause of this bug - the actual bug is in squeak-vm - it is apparently missing it's ALSA support module

pipewire is optional, and understandable that it is not a priority to support it - this is about ALSA though, the fundamental/intrinsic audio system of the core system, which squeak has supported for many years - both ALSA and pulseaudio are supported by squeak, scratch, and by arch - so presumably, this can and should be fixed; and there is no apparent reason to eject scratch from arch, nor an urgent need to replace it with a fork, as  FS#75397  suggested

also, even if the bug were only about pipeewire, AFAIK, the entire motivation for pipewire is to emulate or somehow be a drop-in replacement for both pulseaudio and JACK, in the same way that pulseaudio supports ALSA-only clients transparently - so probably, pipewire should work too, even if upstreams do not support it explicitly - the bug reported in  FS#75397  may simply be a legitimate short-coming of the immature pipewire, unrelated to scratch, squeak, ALSA, or pulseaudio

perhaps pipewire may replace pulseaudio someday in the distant future; but ALSA will always be the default option for audio with linux - so just because pipewire is not working, does not mean that ALSA support should remain broken - it is probably not a case of an abandoned or slow moving upstream, as  FS#75397  suggested - perhaps there is a fundamental reason why the ALSA module is broken or missing; but the person who closed  FS#75397  did not give any indication that ALSA support was broken upstream or that it could not be fixed in arch, only that it does not work with the non-essential pipewire - ALSA support (the actual bug) was not even mentioned

Comment by Jonathan Steel (jsteel) - Thursday, 26 October 2023, 09:33 GMT
Upon review, I dismissed the other bug report without much consideration, we just need an if statement to check if pipewire is installed and if so, use the pulse plugin. I have checked this works.

With ALSA, the plugin is not there. I have added this to squeak-vm-4.10.2.2614-7 if you can test that and confirm your ALSA setup works. If so, I will go back to the other bug report and put in a fix for pipewire too.
Comment by bill-auger (bill-auger) - Thursday, 26 October 2023, 17:36 GMT
4.10.2.2614-7 works as expected with ALSA - thanks

Loading...