Closed ronaldmendoza closed 2 years ago
Did you test the asound.state file?
I did a find across the fs for asound.state and am unable to find it.
I executed alsactl store
and received error: Cannot open /var/lib/alsa/asound.state for writing: No such file or directory.
/var/lib/alsa
does not exist
tips? Or faq I can follow?
mkdir -p /var/lib/alsa
Thanks. Silly of me not to keep following the error-rabbit hole.
I attached asound.state as txt asound.txt
Did it work? To make it permanent you have to use batocera-save-overlay
/var/lib/alsa was not persisting after running batocera-save-overlay and a reboot. Running v35-dev, going to reinstall on v34 and start from step 0.
up(down)graded to stable v34
same results as on v35-dev (no audio through speaker or headphone jack through chtrt5650)
[root@BATOCERA /userdata/system]# alsactl init
alsa-lib parser.c:2373:(load_toplevel_config) Unable to find the top-level configuration file '/usr/share/alsa/ucm2/ucm.conf'.
alsa-lib main.c:1412:(snd_use_case_mgr_open) error: failed to import hw:0 use case configuration -2
Found hardware: "HDA-Intel" "Intel Braswell HDMI" "HDA:80862883,80860101,00100000" "0x8086" "0x7270"
Hardware is initialized using a generic method
alsa-lib parser.c:2373:(load_toplevel_config) Unable to find the top-level configuration file '/usr/share/alsa/ucm2/ucm.conf'.
alsa-lib main.c:1412:(snd_use_case_mgr_open) error: failed to import hw:1 use case configuration -2
Found hardware: "USB-Audio" "USB Mixer" "USB054c:09cc" "" ""
Hardware is initialized using a generic method
alsa-lib parser.c:2373:(load_toplevel_config) Unable to find the top-level configuration file '/usr/share/alsa/ucm2/ucm.conf'.
alsa-lib main.c:1412:(snd_use_case_mgr_open) error: failed to import hw:2 use case configuration -2
Found hardware: "chtrt5650" "" "" "" ""
Hardware is initialized using a generic method
same result as on v35-dev post batocera-save-overlay (no audio through speaker or headphone jack through chtrt5650)
[root@BATOCERA /userdata/system]# uptime ; ls -l /var/lib/alsa
20:10:44 up 3 min, load average: 1.31, 0.76, 0.32
ls: /var/lib/alsa: No such file or directory
will look if I can modify batocera-save-overlay script to include /var
@ronaldmendoza - nooooo. sorry i was half asleep /var is a temp directory in linux.
edit /etc/init.d/S04populate
& add the directory there.
also create a symbolic link i.e.
ln -sf "/userdata/system/asound.state" "/var/lib/alsa/asound.state"
where asound.state is in your /userdata/system folder
then batocera-save-overlay
Thanks for the update! I see asound.state file now persists across reboots now. Unfortunately, still no change in behavior with audio playback through speakers or headphones.
When plugging in headphones and swapping between AUDIO OUTPUT system settings, I see error message:
[root@BATOCERA /userdata/system]# dmesg |grep -i audio [ 0.140530] ACPI: Added _OSI(Linux-Lenovo-NV-HDMI-Audio) [ 2.137065] snd_hda_intel 0000:00:1b.0: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915]) . . . [ 8.073322] Audio Port: ASoC: no backend DAIs enabled for Audio Port [ 8.073333] Audio Port: ASoC: dpcm_fe_dai_prepare() failed (-22) [ 8.074093] Deep-Buffer Audio Port: ASoC: no backend DAIs enabled for Deep-Buffer Audio Port [ 8.074103] Deep-Buffer Audio Port: ASoC: dpcm_fe_dai_prepare() failed (-22)
did you alsa force-reload
?
[root@BATOCERA /]# alsa force-reload
-bash: alsa: command not found
Unable to locate alsa
in path or on the fs using find
Running alsamixer
I see card/chip as PipeWire initially
@ronaldmendoza please try this 'unofficial' beta image...
https://drive.google.com/drive/folders/1_bqmR7CoZ78i7DolYt5b-RRqB5c-LPyN?usp=sharing
ignore the previous discussion about changing files & saving overlay etc. manual upgrade details are in the readme file.
@ronaldmendoza - any luck?
Sorry, was out for long weekend here in US, will try later today. Thank you!
On Sep 6, 2022, at 02:33, Daniel Martin @.***> wrote:
@ronaldmendozahttps://github.com/ronaldmendoza - any luck?
— Reply to this email directly, view it on GitHubhttps://github.com/batocera-linux/batocera.linux/issues/6924#issuecomment-1237904534, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AARM4SAPGOXWCL3LSJ65LPDV44FVNANCNFSM57NSJNPA. You are receiving this because you were mentioned.Message ID: @.***>
Thanks! I reverted settings in /etc/init.d/S04populate, then did "upgrade" Architecture: x86_64 System: Linux 5.18.19 Available memory: 3142/3873 MB Cpu model: Intel(R) Celeron(R) CPU N3060 @ 1.60GHz Cpu number: 2 Cpu max frequency: 2480 MHz OS version: 35-dev-6f4e2f8d0e 2022/09/04 09:23
GOOD: In main menu/emulationstation we've got audio playing now through laptop speakers and auto-detect and switches to headphones too. Volume control works via menu "sound/music" +/-. Even heard audio through speakers during initial boot splash!
NOT-SO-GOOD: 1. No audio in retroarch. 2. Serious performance hit with retroarch, after game loads, getting less than 1fps on NES/SNES/MAME/etc and no longer playable. Exiting retroarch returns me to emulation station and audio plays as expected. navigating emulation station is smooth.
INFO: Using Dualshock4 as audiooutput (headphone jack on controller) works and can do/play everything in emulationstation and retroarch.
[root@BATOCERA /userdata/system]# batocera-audio list
auto auto
alsa_output.usb-Sony_Interactive_Entertainment_Wireless_Controller-00.analog-stereo DualShock 4 [CUH-ZCT2x] Analog Stereo
alsa_output.platform-cht-bsw-rt5645.HiFi__hw_chtrt5650__sink chtrt5650 Headphones + Speaker
[root@BATOCERA /userdata/system]# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Controller [Wireless Controller], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: chtrt5650 [chtrt5650], device 0: 1 []
Subdevices: 0/1
Subdevice #0: subdevice #0
card 2: chtrt5650 [chtrt5650], device 1: Deep-Buffer Audio (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
Getting closer!
Unsuccessfully tried to resolve by renaming both
/userdata/system/configs/retroarch/cores/retroarch-core-options.cfg
and
/userdata/system/configs/retroarch/retroarchcustom.cfg
to see if new auto-generated configs would work.
Still same no audio/1fps performance
Something is seriously wrong, the changes shouldn't affect RA - try the latest upgrade here... https://drive.google.com/drive/folders/1_bqmR7CoZ78i7DolYt5b-RRqB5c-LPyN?usp=sharing
If that doesn't work, please try a new install using the image in the 'full image' folder.
Tried latest build: via 'upgrade' -> copied to local eMMC -> run script -> resulted in same behavior post upgrade via image to usb -> boot from usb -> resulted in same behavior
From es_launch_stdout.log:
2022-09-07 08:11:35,332 DEBUG (emulatorlauncher:507):runCommand command: XDG_CONFIG_HOME=/userdata/system/configs LANGUAGE= CONSOLE=/dev/console SHLVL=1 HOME=/userdata/system OLDPWD=/ DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-vloNCJTgjo,guid=f89765b894f99d6d39fef4576318b470 INIT_VERSION=sysvinit- _=/usr/bin/emulationstation label=BATOCERA TERM=linux WINDOWPATH=2 BOOT_IMAGE=/boot/linux PATH=/sbin:/usr/sbin:/bin:/usr/bin RUNLEVEL=S XDG_RUNTIME_DIR=/var/run DISPLAY=:0 PREVLEVEL=N LANG=en_US.UTF-8 SHELL=/bin/sh PWD=/userdata LC_ALL=en_US.UTF-8 SDL_RENDER_VSYNC=1 /usr/bin/retroarch -L /usr/lib/libretro/fceumm_libretro.so --config /userdata/system/configs/retroarch/retroarchcustom.cfg --set-shader /usr/share/batocera/shaders/interpolation/sharp-bilinear-simple.glslp --verbose /userdata/roms/nes/Contra (USA).zip
2022-09-07 08:11:35,333 DEBUG (emulatorlauncher:508):runCommand command: ['/usr/bin/retroarch', '-L', '/usr/lib/libretro/fceumm_libretro.so', '--config', '/userdata/system/configs/retroarch/retroarchcustom.cfg', '--set-shader', '/usr/share/batocera/shaders/interpolation/sharp-bilinear-simple.glslp', '--verbose', '/userdata/roms/nes/Contra (USA).zip']
2022-09-07 08:11:35,333 DEBUG (emulatorlauncher:509):runCommand env: {'XDG_CONFIG_HOME': '/userdata/system/configs', 'LANGUAGE': '', 'CONSOLE': '/dev/console', 'SHLVL': '1', 'HOME': '/userdata/system', 'OLDPWD': '/', 'DBUS_SESSION_BUS_ADDRESS': 'unix:abstract=/tmp/dbus-vloNCJTgjo,guid=f89765b894f99d6d39fef4576318b470', 'INIT_VERSION': 'sysvinit-', '_': '/usr/bin/emulationstation', 'label': 'BATOCERA', 'TERM': 'linux', 'WINDOWPATH': '2', 'BOOT_IMAGE': '/boot/linux', 'PATH': '/sbin:/usr/sbin:/bin:/usr/bin', 'RUNLEVEL': 'S', 'XDG_RUNTIME_DIR': '/var/run', 'DISPLAY': ':0', 'PREVLEVEL': 'N', 'LANG': 'en_US.UTF-8', 'SHELL': '/bin/sh', 'PWD': '/userdata', 'LC_ALL': 'en_US.UTF-8', 'SDL_RENDER_VSYNC': '1'}
2022-09-07 08:12:20,883 DEBUG (emulatorlauncher:518):runCommand
incl stderr es_launch_stderr.log
Standalone emulators run aok? Without my changes, although you don't have audio, do you have full speed in RA?
to clarify, latest build same behavior as previous v35-dev build. chtrt5650: audio in ES speaker + headphone, in RA very slow in all emus and NO audio dualshock4 via headphone: audio in ES, no perf issue in RA, audio ok hdmi (intel) monitor line-out: audio in ES, no perf issue in RA, audio ok
Can you test without DS4 connected at all?
I unplugged DS4 and plugged in USB kb while in ES. Navigated NES and Contra. Same result: no audio, really slow perf while in RA.
Only 2 USB ports on n42 chromebook, powered off, swapped ports between USB KB and USB drive. Same negative result. Tried with DS4 in other USB slot, same negative result
Try changing the graphics Api, I don't know why you have slow RA performance it doesn't make sense. You haven't answered my question about standalone emulators
I'm not sure what you mean by standalone emu, within ES I tried running other emus : /usr/lib/libretro/mrboom_libretro.so /usr/lib/libretro/mame078plus_libretro.so /usr/lib/libretro/vice_x64_libretro.so /usr/lib/libretro/mgba_libretro.so
all run slow, no audio.
will try diff graphics API
Not RA / Libretro emulators. Try another system which doesn't use RA.
latest v35-dev - switching between diff graphics API had no effect. also tried disable vsync and other configs
And yes, using v34: chtrt5650: ES - NO audio speaker + headphone; RA - Full Speed Games, NO audio speaker + headphone dualshock4 via headphone: ES - Audio ok, RA - Full Speed Games, Audio ok hdmi (intel) monitor line-out: ES - Audio ok, RA - Full Speed Games, Audio ok
Ok now update 😉
installed xubuntu desktop 22.04 -> 5.15.0-47 and retroarch 1.7.3 b2ceb50 (Nov 19 2020) from apt
haven't manually loaded everything yet, but fceumm works with contra playing sound and full-speed perfectly in both windowed and full-screen
plugged in ds4 and no issues (had to manually switch audio from ds4 back to default speaker + headphones). sound and full-speed.
create a separate issue for your RA problem. with more details of your ES settings. also what emulators & roms.
FYI. I resolved slow retroarch performance by switching audio driver from "alsa" to "sdl2". Performance and sound now working as expected!
No sound from speaker or headphones through chtrt5650 device. This is a post that is very similar to other user report of No Audio https://github.com/batocera-linux/batocera.linux/issues/6883. No audio in Kodi, ES, tried mute/unmute in alsamixer. Lenovo Chromebook n42 (braswell chipset)
In Batocera v34/v35 dev sound does work if I am using HDMI and HDMI audio. Sound also works if I plug headphones/speakers to headphone jack in Playstation Dual Shock 4 controller
Ubuntu 22.04, xubuntu (based on 22.04), sound 'just works' through speakers and headphones with chtrt5650. Seems to be using alsa and ucm.
Various posts claiming fixes in Debian (not pipewire)
pactl command output, too large to paste pactl_list_sinks.txt pactl_list_cards.txt pactl_list.txt