# Dietpi 9.1.1 no sound with dtoverlay=vc4-kms-v3d on Amiberry

**URL:** <https://dietpi.com/forum/t/dietpi-9-1-1-no-sound-with-dtoverlay-vc4-kms-v3d-on-amiberry/19568>\
**Category:** General Discussion\
**Created:** [9 March 2024 11:00 UTC](https://dietpi.com/forum/t/dietpi-9-1-1-no-sound-with-dtoverlay-vc4-kms-v3d-on-amiberry/19568 "2024-03-09T11:00:03Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lollly2997](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/l/b487fb/32.png) [@Lollly2997](https://dietpi.com/forum/u/Lollly2997)\
**Post date:** [9 March 2024 11:00 UTC](https://dietpi.com/forum/t/dietpi-9-1-1-no-sound-with-dtoverlay-vc4-kms-v3d-on-amiberry/19568/1 "2024-03-09T11:00:03Z")

</div>

If I use Dietpi 9.1.1 Arm8 Bookworm and only install Amiberry, I don’t get any sound with the setting in comfig.txt dtoverlay=vc4-kms-v3d. I set it to dtoverlay=vc4-fkms-v3d and I have sound but it starts stuttering after a restart. After exiting Amiberry I always get this message vc4 error async flips arent allowed. Using Raspberry 3A+ installed sdl2. Previously I used Dietpi 8.25.1 and no sdl2 with the setting dtoverlay=vc4-fkms-v3d and never had any problems with the sound. I can use an old image but would like to stay current. What can I do to make it work properly?

---

<div class="post-metadata">

**Author:** ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)\
**Post date:** [9 March 2024 11:16 UTC](https://dietpi.com/forum/t/dietpi-9-1-1-no-sound-with-dtoverlay-vc4-kms-v3d-on-amiberry/19568/2 "2024-03-09T11:16:12Z")

</div>

@MichaIng can you have a look.

---

<div class="post-metadata">

**Author:** ![Lollly2997](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/l/b487fb/32.png) [@Lollly2997](https://dietpi.com/forum/u/Lollly2997)\
**Post date:** [9 March 2024 11:18 UTC](https://dietpi.com/forum/t/dietpi-9-1-1-no-sound-with-dtoverlay-vc4-kms-v3d-on-amiberry/19568/3 "2024-03-09T11:18:18Z")

</div>

Where should I take a look?

---

<div class="post-metadata">

**Author:** ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)\
**Post date:** [9 March 2024 11:29 UTC](https://dietpi.com/forum/t/dietpi-9-1-1-no-sound-with-dtoverlay-vc4-kms-v3d-on-amiberry/19568/4 "2024-03-09T11:29:06Z")

</div>

I did a ping to our development

---

<div class="post-metadata">

**Author:** ![Lollly2997](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/l/b487fb/32.png) [@Lollly2997](https://dietpi.com/forum/u/Lollly2997)\
**Post date:** [9 March 2024 11:31 UTC](https://dietpi.com/forum/t/dietpi-9-1-1-no-sound-with-dtoverlay-vc4-kms-v3d-on-amiberry/19568/5 "2024-03-09T11:31:52Z")

</div>

thanks, maybe someone can help me

---

<div class="post-metadata">

**Author:** ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)\
**Post date:** [9 March 2024 11:38 UTC](https://dietpi.com/forum/t/dietpi-9-1-1-no-sound-with-dtoverlay-vc4-kms-v3d-on-amiberry/19568/6 "2024-03-09T11:38:11Z")

</div>

Pls try to stick to English. You are free to use translation tools like DeepL. Some people might understood German but definitely not all forum user 😉

---

<div class="post-metadata">

**Author:** ![Lollly2997](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/l/b487fb/32.png) [@Lollly2997](https://dietpi.com/forum/u/Lollly2997)\
**Post date:** [9 March 2024 11:40 UTC](https://dietpi.com/forum/t/dietpi-9-1-1-no-sound-with-dtoverlay-vc4-kms-v3d-on-amiberry/19568/7 "2024-03-09T11:40:47Z")

</div>

OK, I’ll get it done

---

<div class="post-metadata">

**Author:** ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)\
**Post date:** [9 March 2024 18:21 UTC](https://dietpi.com/forum/t/dietpi-9-1-1-no-sound-with-dtoverlay-vc4-kms-v3d-on-amiberry/19568/8 "2024-03-09T18:21:51Z")

</div>

Do you use HDMI audio or another audio device, and can you show the output of:

```sh
aplay -l

```

---

<div class="post-metadata">

**Author:** ![Lollly2997](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/l/b487fb/32.png) [@Lollly2997](https://dietpi.com/forum/u/Lollly2997)\
**Post date:** [10 March 2024 14:30 UTC](https://dietpi.com/forum/t/dietpi-9-1-1-no-sound-with-dtoverlay-vc4-kms-v3d-on-amiberry/19568/9 "2024-03-10T14:30:44Z")

</div>

What other audio device should I use and how is everything set up automatically and then I no longer have sound under Amiberry dtoverlay=vc4-kms-v3d

---

<div class="post-metadata">

**Author:** ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)\
**Post date:** [11 March 2024 17:37 UTC](https://dietpi.com/forum/t/dietpi-9-1-1-no-sound-with-dtoverlay-vc4-kms-v3d-on-amiberry/19568/10 "2024-03-11T17:37:55Z")

</div>

> [@Lollly2997](#):
>
> What other audio device should I use

This was a question, quite possible that you use the 3.5mm audio jack or a USB DAC. However, if I understand you correctly, you do use HDMI audio. The difference between `fkms` (fake KMS) and `kms` (full KMS) is, that the latter provides and internal audio driver, replacing the Broadcom onboard audio driver. Both however have different properties.

Can you please show the output of the command above, so we first see whether really the intended HDMI audio device is listed and used:

```sh
aplay -l

```

EDIT: Okay, ran some tests. This `vc4hdmi` audio driver supports only a certain IEC958 audio format, hence playback requires a conversion. The native ALSA auto-conversion plugin does not support this, instead a special ALSA PCM type is required. The `libasound2-data` package from the RPi repository ships a configuration for this, which sets the required config as default for this card. But applying any `pcm.!default` via `/etc/asound.conf` or `~/.asoundrc` overwrites the default, hence breaks it. Strange is that even `raspi-config` does not handle this correctly: As fast as you select the `vc4hdmi` audio device there, it creates a `~/.asoundrc` which breaks HDMI audio output.

@Lollly2997  
Can you verify this? Run `raspi-config` on your RPi OS image, system settings, audio and select the `vc4hdmi` device there. Then `speaker-test` should fail. To fix it:

```sh
rm ~/.asoundrc

```

Services are not affected, since `raspi-config` places this file into the login user’s home, not into `root` home and of course not into any service user’s home. So it does not break sound for Amiberry.

However, if you hence still have the DietPi image for testing, please try to switch to `vc4-kms-v3d`, and then just

```sh
rm /etc/asound.conf

```

This should fix `speaker-test` as well as audio output for Amiberry and other services/players.

I need to add this to `dietpi-config`. Hence when onboard audio is selected, and KMS is enabled, to not create any ALSA config and to hide the auto-conversion and equalizer options.

Another thing I was not aware of: When KMS is enabled, the `vc4hdmi` device always shows up, regardless whether a HDMI device is actually attached or not. Hence the “auto” option does not work in this case. I mean currently, if someone enables KMS, obviously a HDMI device is attached (unless rare cases of other LCD types or SDTV). But we will probably switch to KMS OOTB with RPi builds, when switching to the new kernel/firmware stack.

Another option is to use `dtoverlay=vc4-kms-v3d,noudio` by default, which disables the KMS HDMI audio driver and replaces it with the bcm2835 one, which is used for 3.5mm output as well, and when KMS is disabled. It however has some downsides as well, e.g. it deos not support 24bit audio, IIRC. But we could instead add a dedicated option for the KMS audio driver.

---

<div class="post-metadata">

**Author:** ![Lollly2997](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/l/b487fb/32.png) [@Lollly2997](https://dietpi.com/forum/u/Lollly2997)\
**Post date:** [12 March 2024 15:58 UTC](https://dietpi.com/forum/t/dietpi-9-1-1-no-sound-with-dtoverlay-vc4-kms-v3d-on-amiberry/19568/11 "2024-03-12T15:58:56Z")

</div>

The is with kms

 ![IMG_8617](https://dietpi.com/forum/uploads/default/original/2X/7/79c32fba4d375da07ee2383d06130ea6e8bd4bc5.jpeg)

---

<div class="post-metadata">

**Author:** ![Lollly2997](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/l/b487fb/32.png) [@Lollly2997](https://dietpi.com/forum/u/Lollly2997)\
**Post date:** [12 March 2024 16:12 UTC](https://dietpi.com/forum/t/dietpi-9-1-1-no-sound-with-dtoverlay-vc4-kms-v3d-on-amiberry/19568/12 "2024-03-12T16:12:51Z")

</div>

After rm /etc/asound.conf and vc4hdmi still no sound

 ![IMG_8621](https://dietpi.com/forum/uploads/default/original/2X/a/a659dbbe2a3008bdf3ed03ef08840f8fef089540.jpeg)

---

<div class="post-metadata">

**Author:** ![Lollly2997](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/l/b487fb/32.png) [@Lollly2997](https://dietpi.com/forum/u/Lollly2997)\
**Post date:** [12 March 2024 16:14 UTC](https://dietpi.com/forum/t/dietpi-9-1-1-no-sound-with-dtoverlay-vc4-kms-v3d-on-amiberry/19568/13 "2024-03-12T16:14:50Z")

</div>

I’m desperate and borrow something like that

---

<div class="post-metadata">

**Author:** ![Lollly2997](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/l/b487fb/32.png) [@Lollly2997](https://dietpi.com/forum/u/Lollly2997)\
**Post date:** [12 March 2024 16:20 UTC](https://dietpi.com/forum/t/dietpi-9-1-1-no-sound-with-dtoverlay-vc4-kms-v3d-on-amiberry/19568/14 "2024-03-12T16:20:44Z")

</div>

I usually install dietpi image set language, keyboard and wifi. Amiberry is installed ready more I don’t do because otherwise everything is set automatically and since kms sdl2 that doesn’t work at all anymore

---

<div class="post-metadata">

**Author:** ![Lollly2997](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/l/b487fb/32.png) [@Lollly2997](https://dietpi.com/forum/u/Lollly2997)\
**Post date:** [12 March 2024 18:49 UTC](https://dietpi.com/forum/t/dietpi-9-1-1-no-sound-with-dtoverlay-vc4-kms-v3d-on-amiberry/19568/15 "2024-03-12T18:49:20Z")

</div>

Again, I’m always getting the same result! no sound

 ![IMG_8622](https://dietpi.com/forum/uploads/default/original/2X/a/a53e8aa300794371e5bd100ac12c8c909b47d2bc.jpeg)  
 ![IMG_8623](https://dietpi.com/forum/uploads/default/original/2X/0/0340c9c2712f1ff28df474e5721e306c811f7ff0.jpeg)

---

<div class="post-metadata">

**Author:** ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)\
**Post date:** [12 March 2024 20:00 UTC](https://dietpi.com/forum/t/dietpi-9-1-1-no-sound-with-dtoverlay-vc4-kms-v3d-on-amiberry/19568/16 "2024-03-12T20:00:26Z")

</div>

Okay, now I see two issues:

- First of all, you selected `rpi-bcm2835-auto` in `dietpi-config` audio options, right? This works with HDMI when KMS is disabled, since the `bcm2835` HDMI audio device appears 1st in list, and the headphones/analogue 2nd, and the HDMI audio device disappears from the list if no HDMI screen is actually attached, so that headphones becomes 1st. So when we set `0` (the 1st) as default audio card, it works like an auto-mode. With KMS however, as you can see, the `vc4hdmi` audio device is not only permanently there, but also 2nd. So `rpi-bcm2835-auto` equals `rpi-bcm2835-3.5mm` and never uses the HDMI device. You would need to switch to `rpi-bcm2835-hdmi`, so that the headphones/analogue device is disabled any only the HDMI audio device is in the list as `card 0`. Then `rm /etc/asound.conf` and test with `speaker-test`, whether you get output.
- In Amiberry you cannot select the prepared “default” or “sysdefault” PCM, which contains the IEC958 converter plugin, but only the naked hardware PCMs. This means the audio source must be in the right format already, which is obviously not true here. So as long there is no way to use any ALSA meta device, this cannot work with Amiberry at all. I’ll check back with midwan (Amiberry developer) whether there is a way.

It would all work with the bcm2835 HDMI driver, so one could disable this complicated `vc4hdmi` driver (do not do that):

```sh
G_CONFIG_INJECT 'dtoverlay=vc4-' 'dtoverlay=vc4-kms-v3d,noaudio' /boot/config.txt
reboot
aplay -l

```

This actually used to work in the past, but when I just tested it, it did not enable the bcm2835 HDMI driver anymore in the same turn. I checked and saw that the wanted driver is still disabled by the KMS overlay, by adding `snd_bcm2835.enable_hdmi=0` to the kernel command-line. Searching for the reason: [bcm2835-audio HDMI device is not present on Pi 4 running with KMS and VC4 HDMI devices disabled · Issue #4651 · raspberrypi/linux · GitHub](https://github.com/raspberrypi/linux/issues/4651)  
So indeed this changed in the end of 2021. I tried to override this by adding `snd_bcm2835.enable_hdmi=1` to `/boot/cmdline.txt`: The `bcm2835 HDMI 1` device appeared, but it did not play any sound, and furthermore the HDMI screen indeed turned off immediately, when I tried to play sound. So as stated in the linked GitHub issue, it is true, that at least with recent kernel and firmware, it is technically not possible to use KMS for HDMI display, but the firmware/bcm2835 driver for HDMI audio.

This indeed breaks the usage of HDMI audio in Amiberry on RPi, currently, after we switched from the (deprecated) fake KMS driver to the full KMS driver stack. A regression I was not aware of, but sadly one that we must currently accept, since this fake KMS driver really is deprecated, also not recommended by Amiberry anymore, and the related libaries to make this work via DispmanX not shipped with the new kernel/firmware packages from RPi Ltd. anymore, since Bookworm.

I’ll check back with midwan, as said. Since this affects all RPi users, not only ours, there needs to be a solution to use the `default` or `sysdefault` ALSA device, instead of raw hardware PCMs only: [HDMI audio on Raspberry Pi with SDL2/KMS backend · Issue #1241 · BlitterStudio/amiberry · GitHub](https://github.com/BlitterStudio/amiberry/issues/1241)

---

<div class="post-metadata">

**Author:** ![Lollly2997](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/l/b487fb/32.png) [@Lollly2997](https://dietpi.com/forum/u/Lollly2997)\
**Post date:** [13 March 2024 09:19 UTC](https://dietpi.com/forum/t/dietpi-9-1-1-no-sound-with-dtoverlay-vc4-kms-v3d-on-amiberry/19568/17 "2024-03-13T09:19:57Z")

</div>

> [@MichaIng](#):
>
> This actually used to work in the past, but when I just tested it, it did not enable the bcm2835 HDMI driver anymore in the same turn. I checked and saw that the wanted driver is still disabled by the KMS overlay, by adding `snd_bcm2835.enable_hdmi=0` to the kernel command-line. Searching for the reason: [bcm2835-audio HDMI device is not present on Pi 4 running with KMS and VC4 HDMI devices disabled · Issue #4651 · raspberrypi/linux · GitHub](https://github.com/raspberrypi/linux/issues/4651)  
> So indeed this changed in the end of 2021. I tried to override this by adding `snd_bcm2835.enable_hdmi=1` to `/boot/cmdline.txt`: The `bcm2835 HDMI 1` device appeared, but it did not play any sound, and furthermore the HDMI screen indeed turned off immediately, when I tried to play sound. So as stated in the linked GitHub issue, it is true, that at least with recent kernel and firmware, it is technically not possible to use KMS for HDMI display, but the firmware/bcm2835 driver for HDMI audio.
> 
> This indeed breaks the usage of HDMI audio in Amiberry on RPi, currently, after we switched from the (deprecated) fake KMS driver to the full KMS driver stack. A regression I was not aware of, but sadly one that we must currently accept, since this fake KMS driver really is deprecated, also not recommended by Amiberry anymore, and the related libaries to make this work via DispmanX not shipped with the new kernel/firmware packages from RPi Ltd. anymore, since Bookworm.
> 
> I’ll check back with midwan, as said. Since this affects all RPi users, not only ours, there needs to be a solution to use the `default` or `sysdefault` ALSA device, instead of raw hardware PCMs only: [HDMI audio on Raspberry Pi with SDL2/KMS backend · Issue #1241 · BlitterStudio/amiberry · GitHub](https://github.com/BlitterStudio/amiberry/issues/1241)

wow very detailed the whole thing until the problem is solved I will first use the fkms to have sound via Amiberry or take an old image I still have a normal 64bit PC with the Dietpi everything works great but I just use a Raspberry Pi for my custom Amiga

As I said, I take fkms, I only have sound with slight stuttering. When I finish Amiberry, the message vc4 error async flips arent allowedend appears several times among each other

Thanks again for the friendly help. I’ll just have to wait and see whether it works again in the near future

---

<div class="post-metadata">

**Author:** ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)\
**Post date:** [14 March 2024 20:01 UTC](https://dietpi.com/forum/t/dietpi-9-1-1-no-sound-with-dtoverlay-vc4-kms-v3d-on-amiberry/19568/18 "2024-03-14T20:01:23Z")

</div>

Can you try this one:

```sh
cd /tmp
wget https://dietpi.com/downloads/binaries/bookworm/testing/amiberry_rpi3-64-sdl2.deb
dpkg -i amiberry_rpi3-64-sdl2.deb
rm amiberry_rpi3-64-sdl2.deb

```

RPi 3A+ on an ARMv8/64-bit image, right? Else I can compile the one you need.

That one has a checkbox in Amiberry sound settings, to use the system’s “default” audio device. I was not able to test it quickly, since I have no Amiga application to start through Amiberry, and there is no sound test or similar in the GUI (is it?). But if we understood the SDL2 documentation correctly, then this has a high chance to do what we need.

EDIT: I tested it with some random ROM and Prince of Persia game. I really need a simple free demo 😄. While it started and ran horribly slow on my RPi Zero W, it did produce some sound with this HDMI setup. So it seems to work. But better you test this as well with an actual production game where you know how it should sound.

---

<div class="post-metadata">

**Author:** ![Lollly2997](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/l/b487fb/32.png) [@Lollly2997](https://dietpi.com/forum/u/Lollly2997)\
**Post date:** [14 March 2024 21:39 UTC](https://dietpi.com/forum/t/dietpi-9-1-1-no-sound-with-dtoverlay-vc4-kms-v3d-on-amiberry/19568/19 "2024-03-14T21:39:52Z")

</div>

I tried your solution unfortunately without success as you can see tested with dietpi 9.1.1 sdl2 kms set amiberry 5.6.9 from testing still no sound sorry

 ![IMG_8635](https://dietpi.com/forum/uploads/default/original/2X/a/a65b47838dc5ba3442e3800f3ee37a5ccfbdcd4c.jpeg)  
 ![IMG_8634](https://dietpi.com/forum/uploads/default/original/2X/a/a550bbc96981bc20b2fd6f771f9c3729a319ab89.jpeg)

---

<div class="post-metadata">

**Author:** ![Lollly2997](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/l/b487fb/32.png) [@Lollly2997](https://dietpi.com/forum/u/Lollly2997)\
**Post date:** [14 March 2024 22:02 UTC](https://dietpi.com/forum/t/dietpi-9-1-1-no-sound-with-dtoverlay-vc4-kms-v3d-on-amiberry/19568/20 "2024-03-14T22:02:25Z")

</div>

So my problem is now solved, thank you, you are an angel  
With the testing Amiberry version 5.6.9 and with the fkms setting I have great sound without any jerking and no error message after quitting Amiberry

[Next page](https://dietpi.com/forum/t/dietpi-9-1-1-no-sound-with-dtoverlay-vc4-kms-v3d-on-amiberry/19568.md?page=2)
