Raspberry Pi 4B: vcgencmd: VCHI initialization failed

This is for ARMv8 based devices

Re: Raspberry Pi 4B: vcgencmd: VCHI initialization failed

Postby graysky » Wed Jul 20, 2022 8:24 pm

Post the output of id for the user running it. It works me:
$this->bbcode_second_pass_code('', '% vcgencmd
Usage: vcgencmd [-t] command
Send a command to the VideoCore and print the result.

-t Time how long the command takes to complete
-h, --help Show this information

Use the command 'vcgencmd commands' to get a list of available commands

Exit status:
0 command completed successfully
-1 problem with VCHI
-2 VideoCore returned an error

For further documentation please see
https://www.raspberrypi.org/documentation/computers/os.html#vcgencmd
')

$this->bbcode_second_pass_code('', '% id
uid=1000(facade) gid=100(users) groups=100(users),974(kodi),986(video),995(audio),998(wheel)')
graysky
Developer
 
Posts: 1728
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: Raspberry Pi 4B: vcgencmd: VCHI initialization failed

Postby robg » Thu Jul 21, 2022 6:42 pm

$this->bbcode_second_pass_quote('sharpenedblade', 'I') also tried compiling the raspberrypi-userspace repo manually, I still get the error. I also found $this->bbcode_second_pass_code('', '[ 4.854199] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.bin failed with error -2') this in dmesg, but I still have wifi. I am also using the latest eeprom version.

This error message is innocuous; the kernel probes for firmware files until finding the right one.

With regard to the actual problem: I remember reading that not all `vcgencmd` and `tvservice` commands work with KMS. Replace "dtoverlay=vc4-kms-v3d" in your /boot/config.txt with "dtoverlay=vc4-fkms-v3d". If it works and you are ok with (or don't care about) using FKMS, this might be the solution.
robg
 
Posts: 186
Joined: Tue Jan 05, 2021 8:22 am

Re: Raspberry Pi 4B: vcgencmd: VCHI initialization failed

Postby robg » Fri Jul 22, 2022 9:19 pm

Sorry, I missed that you are using the generic kernel (linux-aarch64). In this case, the overlays won't make a difference.

To further pin down the issue, could you try whether `vcgencmd` works with the linux-rpi kernel? (This should simply be a matter of running `pacman -Syu linux-rpi`, and then reverting back with `pacman -Syu linux-aarch64`; you may want to back up your /boot/config.txt.)

Note that the VC kernel modules are enabled in both linux-aarch64 and linux-rpi. If `vcgencmd` works with linux-rpi, then there must be some configuration issue that prevents the modules from being loaded / functioning properly.

May I also ask:

1. What modules did you try loading (using `modprobe`)? What is the ouput when appending the --verbose flag?
2. How should we interpret "A few months ago, vcgencmd was working..."? Do you mean that no updates were carried out over a couple of months? Or that this was the last time you ran `vcgencmd`?

3. @graysky: Are you running linux-aarch64 or linux-rpi?
robg
 
Posts: 186
Joined: Tue Jan 05, 2021 8:22 am

Re: Raspberry Pi 4B: vcgencmd: VCHI initialization failed

Postby lategoodbye » Sun Jul 24, 2022 4:13 pm

Just a note, this behavior "VCHI initialization failed" is expected for the combination mainline kernel and Raspberry Pi 4 (BCM2711). The necessary changes are delayed because the VCHIQ driver is still in staging. So anyone who can help on the TODO list is welcome.
lategoodbye
 
Posts: 116
Joined: Sat Dec 29, 2018 1:24 am

Re: Raspberry Pi 4B: vcgencmd: VCHI initialization failed

Postby robg » Mon Jul 25, 2022 11:51 pm

$this->bbcode_second_pass_quote('sharpenedblade', 'I') am going to use linux-rpi for a while, though I prefer the mainline kernel, do you know if linux-rpi can be booted with uboot and systemd-boot.

I expect so, because the uboot-raspberrypi package seems to provide the necessary .dtb files. To stay on the safe side, you can apply the kernel parameters from linux-rpi.

Regarding the VCHIQ driver: lategoodbye, could you kindly link to the source of your information (so that we can get a sense of where the development is currently at?)
robg
 
Posts: 186
Joined: Tue Jan 05, 2021 8:22 am

Re: Raspberry Pi 4B: vcgencmd: VCHI initialization failed

Postby lategoodbye » Tue Jul 26, 2022 4:41 am

@robg

As former Raspberry Pi kernel maintainer and VCHIQ contributor i will link to some of my statements, if it's okay for you :mrgreen:

The VCHIQ driver is in staging since 2016, because the driver was not in the best shape. So the current goal is to get out of staging, not BCM2711 support. The staging work is mostly driven by kernel community and not by Raspberry Pi trading. Please look at the current TODO list. If you are interested in the current development here are the recent contributions.

Additional i maintain a mainline status page of the Raspberry Pi 4. Since the V3D stuff has been applied for 5.20, the VCHIQ support has become the most important.
lategoodbye
 
Posts: 116
Joined: Sat Dec 29, 2018 1:24 am

Re: Raspberry Pi 4B: vcgencmd: VCHI initialization failed

Postby robg » Tue Jul 26, 2022 11:56 pm

$this->bbcode_second_pass_quote('sharpenedblade', 'I') have booted the linux-rpi kernel without the kernel parameters. In the systemd-boot config file, do I just use /kernel8.img instead of /Image.

Glad to hear that we have arrived at what seems the best currently available solution!

$this->bbcode_second_pass_quote('lategoodbye', 'A')s former Raspberry Pi kernel maintainer and VCHIQ contributor i will link to some of my statements, if it's okay for you :mrgreen:

Absolutely! Thank you for the comprehensive reply and your work on RPI support in the Linux kernel! It is as your mainline status summary says: the only (major) missing component at this point is VC support.
robg
 
Posts: 186
Joined: Tue Jan 05, 2021 8:22 am
Top

Re: Raspberry Pi 4B: vcgencmd: VCHI initialization failed

Postby robg » Thu Jul 28, 2022 7:02 pm

So when you wrote before that "I have booted the linux-rpi kernel...", you meant without uboot?
In any case, please open a new topic on this question (in the U-Boot/Kernel subforum), as the original one on VCHI initialization can be considered answered by lategoodbye.
robg
 
Posts: 186
Joined: Tue Jan 05, 2021 8:22 am


Return to ARMv8 Devices

Who is online

Users browsing this forum: No registered users and 4 guests