You are not logged in.

#1 2023-06-21 21:48:38

Marvix
Member
Registered: 2013-10-08
Posts: 150

[SOLVED] Can't load Scratch after pipewire migration

Recently -a month ago- I made the transition to pipewire, and after that I can't load the Scratch programming language graphic interface.
For the pipewire I installed the following packages:

  1. pipewire-alsa

  2. pipewire-jack

  3. pipewire-pulse

and it is set as below:

$ pactl info
Server String: /run/user/1000/pulse/native
Library Protocol Version: 35
Server Protocol Version: 35
Is Local: yes
Client Index: 49
Tile Size: 65472
User Name: marvix
Host Name: archie
Server Name: PulseAudio (on PipeWire 0.3.71)
Server Version: 15.0.0
Default Sample Specification: float32le 2ch 48000Hz
Default Channel Map: front-left,front-right
Default Sink: alsa_output.pci-0000_00_1b.0.analog-stereo
Default Source: alsa_input.pci-0000_00_1b.0.analog-stereo
Cookie: 7ce5:3b0c

The error message I get when I start scratch.

 $ 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)

Tried to change the

$ sudo nano /etc/libao.conf
default_driver=alsa
dev=default
quiet

to

default_driver=pulse
dev=default
quiet

with no result, but to break volumeicon on system start-up.

What should be done?

Last edited by Marvix (2023-06-22 03:26:50)

Offline

#2 2023-06-21 22:51:01

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,835

Re: [SOLVED] Can't load Scratch after pipewire migration

squeak-vm doesn't have the ALSA output plugin, this might be a packaging bug, but you should also be able to adjust that parameter it's executing so it's trying -vm-sound-pulse instead.

And looking at the startup script, it checks for pulseaudio by running the pulseaudio binary which doesn't exist anymore. For a quick fix, copy /usr/bin/scratch to /usr/local/bin/scratch  adjust lines 88-92 so that they just read

VMOPTIONS="$VMOPTIONS -vm-sound-pulse"

and try again. For a more proper fix this should be reported upstream to use some more available tool like pactl or so to check for pulse presence.

Offline

#3 2023-06-22 03:26:29

Marvix
Member
Registered: 2013-10-08
Posts: 150

Re: [SOLVED] Can't load Scratch after pipewire migration

Worked just fine.

Changing the code with uncommenting the rest lines, from

if pulseaudio --check 2>/dev/null ; then
    VMOPTIONS="$VMOPTIONS -vm-sound-pulse"
else 
    VMOPTIONS="$VMOPTIONS -vm-sound-ALSA"
fi

to

# if pulseaudio --check 2>/dev/null ; then
VMOPTIONS="$VMOPTIONS -vm-sound-pulse"
#else 
    #VMOPTIONS="$VMOPTIONS -vm-sound-ALSA"
#fi

and calling Scratch from terminal, gives the output

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-pulse /usr/lib/scratch/Scratch.image 

Thank you very much again, V1del!

Offline

Board footer

Powered by FluxBB