Hello everyone!
I’ve finally received my Librem 5 and I’ve installed postmarketOS on it.
I’m using Sxmo (Xorg/dwm) and I can’t hear anything when people call me,
nor people can hear me.
Audio works fine when playing music or recording audio, but it does not
work during phone calls.
I’ve tried postmarketOS with Phosh and, in that case, phone calls work.
It must be an issue of postmarketOS with Sxmo. Is there someone who uses
Sxmo on their Librem 5?
I’ve opened an issue [1] on postmarketOS repository on GitLab.
I don’t know a thing about Sxmo, do you have some sound parameters where you can check the audio inputs and outputs ?
Maybe there is something wrong happening on those parameters when the call takes over, can you check it during a test call ?
I was not thinking about any particular test to try, more about something like making sure the right input/output device is used, in Phosh it’s showing like this :
I was able to make phone calls work.
An user on IRC put me on the right path, telling me that wys is
mandatory to make phone calls on the Librem 5.
Reading more carefully this issue also helped me https://source.puri.sm/Librem5/wys/-/issues/13.
I removed the file 85-librem5-modem.udev.rules in the directory /usr/lib/udev/rules.d. If you don’t want to delete it, you can rename
it with a suffix (85-librem5-modem.udev.rules.old), so udev ignores
it.
Then I installed wys and I overrode the start hook, copying the file sxmo_hook_start.sh from the directory /usr/share/sxmo/default_hooks
to the directory $HOME/.config/sxmo/hooks.
In the start hook I start wys and I apply the modem config to PipeWire.
That config comes from the file /etc/pulse/librem5.pa. Since Sxmo does
not use PulseAudio, my understanding is that that config file is ignored
by PipeWire, so I apply those PulseAudio settings for the Librem 5 to
PipeWire, translating them for PipeWire.
Here’s a diff between the default start hook and mine.
--- a/sxmo_hook_start.sh
+++ b/sxmo_hook_start.sh
@@ -26,6 +26,11 @@
superctl start pipewire-pulse
superctl start wireplumber
fi
+superctl start wys
+if [ "$(command -v pipewire)" ]; then
+ pactl set-sink-volume alsa_output._sys_devices_platform_sound-wwan_sound_card2.stereo-fallback 32768
+ pactl set-source-volume alsa_output._sys_devices_platform_sound-wwan_sound_card2.stereo-fallback.monitor 98304
+fi
# Periodically update some status bar components
sxmo_hook_statusbar.sh all
Audio quality when calling is not great. However my biggest issue is
that when I call, people hear themselves. They hear their voice back.
Maybe I have to apply other PulseAudio settings from that file.
Thanks for the info. I am also trying to make calls work on postmarketOS Sxmo (on sway).
I removed the file 85-librem5-modem.udev.rules and installed wys. If I open a terminal and run WYS_MODEM="Modem" wys as explained here then I have audio on calls. However I cannot figure out how to make it work automatically at boot: I tried editing the sxmo_hook_start.sh file as you mentioned, but that doesn’t work for me, the reason being that there is not a wys service:
% superctl start wys
error received from superd:
manager.StartService: service not found: wys
In the previous message I did not mention that I have wrote a wys superd
service file as well.
The file /usr/share/superd/services/wys.service contains the following
text:
[Unit]
Description=A daemon to bring up and take down PulseAudio loopbacks for phone call audio
After=pipewire-pulse
[Service]
Type=simple
Restart=always
ExecStart=/usr/bin/wys -m Modem
ExecOnFailure=/usr/bin/sxmo_notify_user.sh "superd failed to start wys"
RestartSec=1s