Was the software title installed freshly or updated/migrated?
Can this issue be replicated on a fresh installation of DietPi?
â If you sent a âdietpi-bugreportâ, please paste the ID here â
Bug report ID | echo $G_HW_UUID
Steps to reproduce
Initial first run setup procedures
Dietpi-Config - Audio Options
enabled audio (loaded alsa)
selected rpi-bcm2835-3.5mm as sound card
after setup completed, ran the following command:
speaker-test -c2 -twav -l4
Expected behaviour
should hear âfront left front rightâ repeated 4 times.
Actual behaviour
no sound at all
Extra details
Plugged in a usb speaker and selected it sound card and speaker test, it worked normally.
On another ssd did a fresh install of raspian nbulleyes lite and after the first run script completed, went into raspi-config and selected the headphome jack for audio out. Speaker-Test worked normally.
Yes I did as the end of the first run scripts will normally require a reboot to take care of the change in the ssh server (I always change that when I do an install). But just to double check I will bring the dietpi system back up in a few to verify. And no I am not using ssh at this time, just a normal setup with monitor, keyboard and all.
I had this trouble a few times. My guess is your audio is using the HDMI. Try changing the soundcard to the option near the very end of the list. Also run cava or the mixer to make sure your not on mute or have the level on 0. It will default to the first thing unless you specify something else.
That may not work as audio needs to be explicitly enabled in /boot/dietpi.txt, which is done only when explicitly selecting the onboard audio options at the top of the list.
aplay -l however is a good command to check whether the analogue audio device âbcm2835 Headphonesâ really is enabled.
dtparam=audio=on is needed in /boot/config.txt and dtoverlay=dietpi-disable_headphones must not be present.
Verified that selecting hw 1,0 does give a dtparm=audio=off and that aplay will show no soundcards available.
Selecting the rpi-bcm2835-3.5mm option does give âdtparm=audio=onâ and âdtoverlay=dietpi-disable_hdmi_audioâ entries in config.txt.
aplay -l shows card 1 as âcard 1: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]â.
But still no audio.
Yes, didn a reboot after each change in dietpi-config.
Alsamixer just shows a âPCMâ entry which is not muted for both âdefaultâ and âcard 1â displays . Not sure what the âdefaultâ audo device is.
Not sure what is going on in the background as I would think that specificaly picking the headphone in dietpi-config would set the default device to that rather than to hdmi audio. Where is the default audio device set? Maybe it could be edited to shown the headphone jack as default?
Just did a run through /etc and found asound.conf. Saw that it had the defaults as card 0. Edited the file to show card 1 as the defaults. I now have good audio. So it looks like it is a dietpi-config problem.
If I get a chance I will try the hw 0,1 option id dietpi config and see what it does to asound.conf and if it sets the default card to 0 again (seems like it should set it to card 1 as that is what you are selecting).
Ok, did play witn dietpi-config and the hw 1.0 choice does set the default card to 1 as expected. If it did not turn the onboard audio off everything would be fine. Reset the audio to the rpi headphone jack and it reset the default card in asound.conf to 0. It would appear that dietpi-config is not verifying which audio cards are actually available before setting the default card vaule in asound.conf.
Actually selecting analoge audio should disable the HDMI audio device(s). We create a dtoverlay for this. But probably the device tree has changed with Linux 6.1. Iâll have a look.
Just to make things more interesting I now have a problem of when using the cinnamon desktop sounds app, when you try to run a speaker test there is no sound. Checked both the builtin audio (headphone jack) and a usb speaker and no sound from either. Both work just fine from the command line using speaker-test.
Just as a double check that it was not a cinnamon desktop problem, I did a fresh install (on a different ssd) of dietpi and after
the initial setup steps used dietpi software to install a mate desktop. (after verifying that .asoundrc was correct ) saw the exact same thing, onboard audio selected but no output in the spaker test using the mate audio app. Command line worked fine.
Okay, the audio device tree node has gone indeed. Strangely there is a new sound node which is always disabled. However, the audio node option triggered (as well) a cmdline entry to toggle analogue and HDMI via kernel module option. It should work to use this directly:
If you mean errors when doing rmmod and modprobe, just reboot (which is what the modprobe.d config is for). This was an attempt to apply the option directly but this does not work in all cases.
Ended up not needing to do this. As I had been making lots of suggested tweaks while working on this problem I decided to do a from scratch reinstall (this a testing setup only). After finishing the first run setup script, installed cinnamon Desktop and pulseaudio. The one problem I found using dietpi-config audio soundcard selection process is that if you scroll down to hw 1,0 (rpi headphone) option is that when you finish up and reboot you find that dietpi-confign has turned the built in audio to off in config.txt. Thus there is no way to actually use this soundcard option. Not a major problem as the 2nd choice in then selection menu seems to work ok.
So at this point the only problem left is that the Cinnamon sound app does not put out any audio for a valid ausio option, But that is in another post as it does not strictly apply to this listed problem.