Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Bug]: after openal-soft bump to 1.24.2, sound stopped working in x11/luanti #23148

Open
robertkirkman opened this issue Feb 10, 2025 · 0 comments
Labels
audio Issue related to audio device support, including ALSA bug report Something is not working properly

Comments

@robertkirkman
Copy link
Contributor

robertkirkman commented Feb 10, 2025

Problem description

When I uploaded luanti, the sound was working, but after fa1118b, for me the sound stopped working, and this error appeared instead:

2025-02-10 09:49:44: ERROR[Main]: Audio: Global Initialization: Failed to open device

using export ALSOFT_LOGLEVEL=3 can show slightly more information:

[ALSOFT] (II) Initializing library v1.24.2-unknown UNKNOWN
[ALSOFT] (II) Supported backends: opensl, null, wave
[ALSOFT] (II) Loading config /data/data/com.termux/files/usr/etc/openal/alsoft.conf...
[ALSOFT] (II) Loading config /data/data/com.termux/files/usr/etc/xdg/alsoft.conf...
[ALSOFT] (II) Loading config /data/data/com.termux/files/home/.alsoftrc...
[ALSOFT] (II) Loading config /data/data/com.termux/files/home/.config/alsoft.conf...
[ALSOFT] (II) Got binary: "/data/data/com.termux/files/usr/bin", "luanti"
[ALSOFT] (II) Loading config /data/data/com.termux/files/usr/bin/alsoft.conf...
[ALSOFT] (II) Extensions: +NEON
[ALSOFT] (WW) Failed to load libOpenSLES.so
[ALSOFT] (WW) Failed to initialize backend "opensl"
[ALSOFT] (WW) No playback backend available!
[ALSOFT] (WW) No capture backend available!
[ALSOFT] (WW) Error generated on device 0x0, code 0xa004
2025-02-10 09:49:44: ERROR[Main]: Audio: Global Initialization: Failed to open device
[ALSOFT] (WW) Error generated on device 0x0, code 0xa002
[ALSOFT] (WW) Error generated on device 0x0, code 0xa001

I completely do not understand why mplayer -ao openal, mpd, and mpv --ao=openal continue to work with this version of openal-soft while luanti does not, and I have been unable to find any way to patch luanti to work with the current openal-soft package, which is very confusing since luanti calls alcOpenDevice() in an almost completely identical way to how mplayer calls it. I cannot tell what the difference is, and all changes I have attempted to luanti's alcOpenDevice() call have had no effect (for example I tried refactoring out the references to unique_ptr_alcdevice in such a way that the sound continued to work with openal-soft 1.24.1, but it still did not work with 1.24.2).

https://github.com/luanti-org/luanti/blob/dd0070a6b8a28e2fe2ac591b3ea96813ba9ffcb0/src/client/sound/sound_singleton.cpp#L15

The only One of two ways I have found to work around this is to revert the two commits in openal-soft 1.24.2 that I bisected this problem to.

kcat/openal-soft@8767fdd
kcat/openal-soft@e359dbf

the other way to work around the problem is to add export LDFLAGS+=" -Wl,--no-as-needed,-lOpenSLES,--as-needed" to the build.sh of luanti or any other packages that might be found to exhibit the same problem in the future.

What steps will reproduce the bug?

pkg install x11-repo
pkg install termux-x11-nightly xfce luanti
export DISPLAY=:0 TERMUX_X11_XSTARTUP=xfce4-session
termux-x11 &
luanti

What is the expected behavior?

Working sound in luanti

System information

Termux Variables:
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP__APK_FILE=/data/app/com.termux-afP421Bfk35XjVh1_X0Sdw==/base.apk
TERMUX_APP__APK_RELEASE=F_DROID
TERMUX_APP__APP_VERSION_CODE=1020
TERMUX_APP__APP_VERSION_NAME=0.119.0-beta.1
TERMUX_APP__DATA_DIR=/data/user/0/com.termux
TERMUX_APP__IS_DEBUGGABLE_BUILD=false
TERMUX_APP__IS_INSTALLED_ON_EXTERNAL_STORAGE=false
TERMUX_APP__PACKAGE_NAME=com.termux
TERMUX_APP__PID=3077
TERMUX_APP__TARGET_SDK=28
TERMUX_VERSION=0.119.0-beta.1
TERMUX_X11_XSTARTUP=xfce4-session
TERMUX__SE_FILE_CONTEXT=u:object_r:app_data_file:s0:c33,c257,c512,c768
TERMUX__SE_INFO=untrusted:targetSdkVersion=28:complete
TERMUX__SE_PROCESS_CONTEXT=u:r:untrusted_app_27:s0:c33,c257,c512,c768
TERMUX__UID=10289
TERMUX__USER_ID=0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://packages.termux.dev/apt/termux-main stable main
# x11-repo (sources.list.d/x11.list)
deb https://packages.termux.dev/apt/termux-x11 x11 main
# tur-repo (sources.list.d/tur.list)
deb https://tur.kcubeterm.com tur-packages tur tur-on-device tur-continuous
Updatable packages:
mesa-dev/stable 24.3.4 all [upgradable from: 24.3.1-1]
mesa-vulkan-icd-swrast/stable 24.3.4 aarch64 [upgradable from: 24.3.1-1]
mesa/stable 24.3.4 aarch64 [upgradable from: 24.3.1-1]
osmesa/stable 24.3.4 aarch64 [upgradable from: 24.3.1-1]
termux-tools version:
1.44.6
Android version:
10
Kernel build information:
Linux localhost 4.9.186-22990479 #1 SMP PREEMPT Thu Feb 24 18:21:21 KST 2022 aarch64 Android
Device manufacturer:
samsung
Device model:
SM-G960U
LD Variables:
LD_LIBRARY_PATH=
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so
Installed termux plugins:
com.termux.api versionCode:51
com.termux.x11 versionCode:15
@robertkirkman robertkirkman added bug report Something is not working properly untriaged labels Feb 10, 2025
robertkirkman added a commit to robertkirkman/termux-packages that referenced this issue Feb 10, 2025
@Biswa96 Biswa96 added audio Issue related to audio device support, including ALSA and removed untriaged labels Feb 10, 2025
robertkirkman added a commit to robertkirkman/termux-packages that referenced this issue Feb 11, 2025
robertkirkman added a commit to robertkirkman/termux-packages that referenced this issue Feb 11, 2025
robertkirkman added a commit to robertkirkman/termux-packages that referenced this issue Feb 11, 2025
robertkirkman added a commit to robertkirkman/termux-packages that referenced this issue Feb 11, 2025
robertkirkman added a commit to robertkirkman/termux-packages that referenced this issue Feb 16, 2025
This is a potential alternative solution to termux#23148
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
audio Issue related to audio device support, including ALSA bug report Something is not working properly
Projects
None yet
Development

No branches or pull requests

2 participants