Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Update default DT overlay for Pi 3 64-bit #1245

Open
chrisys opened this issue Apr 1, 2020 · 9 comments
Open

Update default DT overlay for Pi 3 64-bit #1245

chrisys opened this issue Apr 1, 2020 · 9 comments
Labels

Comments

@chrisys
Copy link
Member

chrisys commented Apr 1, 2020

Currently for a Pi 3 64-bit OS device the "Define DT overlays" device configuration is set by default upon first provisioning to "vc4-kms-v3d".

This results in a non-working audio setup (no output via 3.5mm jack or via HDMI):

root@028daea:/# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: vc4hdmi [vc4-hdmi], device 0: MAI PCM vc4-hdmi-hifi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

As mentioned by Florin (and tested working by me) in the Flowdock thread below, this needs to be changed to: "vc4-kms-v3d,audio=off","" which will then allow the audio to work on first boot.

root@028daea:/# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
  Subdevices: 7/7
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 IEC958/HDMI [bcm2835 IEC958/HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: ALSA [bcm2835 ALSA], device 2: bcm2835 IEC958/HDMI1 [bcm2835 IEC958/HDMI1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Related to: balena-io-experimental/balena-sound#82

@floion
Copy link
Contributor

floion commented Apr 1, 2020

@CameronDiver same stands for pi4-64 bits

@chrisys
Copy link
Member Author

chrisys commented Apr 1, 2020

@floion the Pi 4 works fine out of the box with the default overlay ("vc4-fkms-v3d").

@CameronDiver
Copy link
Contributor

@chrisys @floion do we ever want these to be overridden by the user, or should they always be there?

@phil-d-wilson
Copy link

@CameronDiver @chrisys @floion

This same issue also stops anything being displayed on a Pi Display connected to a Pi3B+ running 64bit OS. There is no output at all using the default "vc4-fkms-v3d" overlay. Changing it to "vc4-kms-v3d,audio=off","" makes the screen work again.

@jellyfish-bot
Copy link

[tmigone] This issue has attached support thread https://jel.ly.fish/a2a5c36f-afc2-4b70-aa1b-8fbb244c6f37

@bartversluijs
Copy link

Hi,

I'm currently having this problem with a batch of our Raspberry Pi 4's. Running balenaOS 2.65.0+rev1 (supervisor v12.2.11).
I have configured an environment variable (RESIN_HOST_CONFIG_dtoverlay pi3-miniuart-bt) on application level, but it's overwritten by the environment variable set by the device itself, which is "vc4-fkms-v3d".

Weirdly enough, I don't see this problem occuring in balenaOS 2.73.1+rev1 (supervisor version 12.4.6) so far. I don't know when this happens, but it is causing problems.

I'm running an openBalena instance by the way.

@jellyfish-bot
Copy link

[mpous] This issue has attached support thread https://jel.ly.fish/d38d878c-6b6f-4f1d-9fdf-634a8f513527

@pipex
Copy link
Contributor

pipex commented May 31, 2021

Investigated a bit during support.

The default behavior of the supervisor is to set device config variables on the API for device specific configurations when they differ from the default. Since there are no supervisor level defaults for HOST_CONFIG vars, then these are always set on the cloud side.

Here is the code where that is done https://github.com/balena-os/balena-supervisor/blob/master/src/api-binder.ts#L424-L435. This was first introduced on 14d2bc3 (PR #482).

Looking at the code, it looks like the target state is supposed to take priority over local value, which makes sense, but there seems to be a timing issue where the target state is not yet available so local config becomes the target.

@pipex pipex added the type/bug label Oct 28, 2021
@jellyfish-bot
Copy link

[ramirogm] This has attached https://jel.ly.fish/bcd40790-82d3-47ba-aeb7-c4b5e880bf62

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants