Bug 1218780 - Raspberry Pi 400 defaults to llvmpipe renderer instead of Broadcom V3D 4.2
Summary: Raspberry Pi 400 defaults to llvmpipe renderer instead of Broadcom V3D 4.2
Status: RESOLVED FIXED
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Other (show other bugs)
Version: Current
Hardware: aarch64 openSUSE Tumbleweed
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Ivan Ivanov
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-12 18:29 UTC by Robert Riemann
Modified: 2024-03-22 09:00 UTC (History)
6 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Riemann 2024-01-12 18:29:37 UTC
I installed openSUSE-Tumbleweed-ARM-KDE-raspberrypi.aarch64-2023.11.30-Snapshot20240109.raw.xz on my Raspberry Pi 400 (4GB RAM).

Unfortunately, no 3D acceleration works. The file /boot/efi/config.txt contains the following section that is also considered for PI 400 series:

    [pi4]
    dtoverlay=vc4-kms-v3d,cma-default
    dtoverlay=disable-vc4


`glxinfo -B` shows that llvmpipe is used as opengl renderer.

After a lot of trial and error, I found out that if I comment out `dtoverlay=disable-vc4` in config.txt, then 3d acceleration is working and opengl renderer is "V3D 4.2".

I suggest that opensuse tumbleweed does not add the disable-vc4 overlay for raspberry pi 400 (and possibly pi 4) users.
Comment 1 Ivan Ivanov 2024-02-07 19:24:04 UTC
Hm, raspberrypi-firmware package have these lines[1]. 

Could you check which raspberrypi-firmware version is inside this image?

---
[pi4]

armstub=armstub8-rpi4.bin
# Note that the 7" DSI panel isn't supported at the moment through VC4, users
# can still use it through efifb by adding 'dtoverlay=disable-vc4' in
# 'extraconfig.txt'.
dtoverlay=vc4-kms-v3d-pi4,cma-default
dtoverlay=disable-v3d
Comment 2 Vasilis Liaskovitis 2024-02-08 11:20:41 UTC
I see the same issue (slightly newer opensuse:tumbleweed:20240111 TW image):

localhost:~ # rpm -q kernel-default
kernel-default-6.6.10-1.1.aarch64

localhost:~ # rpm -q raspberrypi-firmware
raspberrypi-firmware-2023.11.21-1.1.noarch

/boot/efi/config.txt has same settings as mentioned in comment#1

We have software rendering indeed:

localhost:~ # glxinfo -B | grep -i renderer
OpenGL renderer string: llvmpipe (LLVM 17.0.6, 128 bits)

v3d does not load.

localhost:~ # lsmod | grep -i vc4
vc4                   319488  6
drm_display_helper    212992  1 vc4
cec                    86016  2 vc4,drm_display_helper
drm_dma_helper         24576  3 vc4
snd_soc_core          409600  2 vc4,snd_soc_hdmi_codec
localhost:~ # lsmod | grep -i v3d

I haven't spotted something with drm.debug=0x1e drm.debug=0xe yet, but I can post those. 

I thought simpledrm may interfere with v3d bringup, but adding "initcall_blacklist=simpledrm_platform_driver_init" to kernel command line did not change anything. 

Perhaps it is a dt/firmware issue then.

localhost:~ # cat /etc/os-release
NAME="openSUSE Tumbleweed"
# VERSION="20240111"
ID="opensuse-tumbleweed"
ID_LIKE="opensuse suse"
VERSION_ID="20240111"
PRETTY_NAME="openSUSE Tumbleweed"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:tumbleweed:20240111"
BUG_REPORT_URL="https://bugzilla.opensuse.org"
SUPPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://www.opensuse.org"
DOCUMENTATION_URL="https://en.opensuse.org/Portal:Tumbleweed"
LOGO="distributor-logo-Tumbleweed"
Comment 3 Ivan Ivanov 2024-02-09 16:20:45 UTC
Guillaume, do you know dtoverlay=disable-vc4 instead dtoverlay=disable-v3d?
Comment 4 Ivan Ivanov 2024-02-09 16:21:23 UTC
s/do you know dtoverlay/do you know why we have dtoverlay/
Comment 5 Ivan Ivanov 2024-02-12 09:49:20 UTC
(In reply to Robert Riemann from comment #0)
> I installed
> openSUSE-Tumbleweed-ARM-KDE-raspberrypi.aarch64-2023.11.30-Snapshot20240109.
> raw.xz on my Raspberry Pi 400 (4GB RAM).
> 
> Unfortunately, no 3D acceleration works. The file /boot/efi/config.txt
> contains the following section that is also considered for PI 400 series:
> 
>     [pi4]
>     dtoverlay=vc4-kms-v3d,cma-default
>     dtoverlay=disable-vc4
> 

Please reinstall raspberrypi-firmware-config package. 

Original RPi4 sections in the package is: 

---
[pi4]

armstub=armstub8-rpi4.bin
# Note that the 7" DSI panel isn't supported at the moment through VC4, users
# can still use it through efifb by adding 'dtoverlay=disable-vc4' in
# 'extraconfig.txt'.
dtoverlay=vc4-kms-v3d-pi4,cma-default
dtoverlay=disable-v3d
Comment 6 Ivan Ivanov 2024-02-16 15:11:12 UTC
@Robert any feedback?
Comment 7 Robert Riemann 2024-02-17 19:36:10 UTC
I started with this:

i+ | raspberrypi-firmware        | Binary bootloader and firmware files for Raspberry Pi             | package
i+ | raspberrypi-firmware-config | Configuration for the Raspberry Pi firmware loader                | package
i+ | raspberrypi-firmware-dt     | Device trees for the Raspberry Pi firmware loader                 | package


Information for package raspberrypi-firmware:
---------------------------------------------
Repository     : openSUSE-Tumbleweed-Oss
Name           : raspberrypi-firmware
Version        : 2023.11.21-1.3
Arch           : noarch
Vendor         : openSUSE
Installed Size : 5.1 MiB
Installed      : Yes
Status         : out-of-date (version 2023.11.21-1.1 installed)
Source package : raspberrypi-firmware-2023.11.21-1.3.src
Upstream URL   : https://github.com/raspberrypi/firmware/
Summary        : Binary bootloader and firmware files for Raspberry Pi
Description    :
    Binary bootloader and firmware files for Raspberry Pi


Information for package raspberrypi-firmware-config:
----------------------------------------------------
Repository     : openSUSE-Tumbleweed-Oss
Name           : raspberrypi-firmware-config
Version        : 2023.11.21-1.3
Arch           : noarch
Vendor         : openSUSE
Installed Size : 3.0 KiB
Installed      : Yes
Status         : out-of-date (version 2023.11.21-1.1 installed)
Source package : raspberrypi-firmware-config-2023.11.21-1.3.src
Upstream URL   : https://github.com/raspberrypi/firmware/
Summary        : Configuration for the Raspberry Pi firmware loader
Description    :
    This package configures the Raspberry Pi boot process.
    2 flavors are available:
      * raspberrypi-firmware-config - the default config
      * raspberrypi-firmware-config-camera - the config which enables
      start_x=1 and increase gpu_mem to be able to use a camera module

    Note: config.txt should not be used to set manually params (gpu_mem, etc.)
    please create extraconfig.txt instead.


in /boot/efi/config.txt:

[pi4]

armstub=armstub8-rpi4.bin
# Note that the 7" DSI panel isn't supported at the moment through VC4, users
# can still use it through efifb by adding 'dtoverlay=disable-vc4' in
# 'extraconfig.txt'.
dtoverlay=vc4-kms-v3d-pi4,cma-default
# dtoverlay=disable-v3d


Then today on 7 Feb 2024, I run zypper dup. Then I got this:

Information for package raspberrypi-firmware-config:
----------------------------------------------------
Repository     : openSUSE-Tumbleweed-Oss
Name           : raspberrypi-firmware-config
Version        : 2023.11.21-1.3
Arch           : noarch
Vendor         : openSUSE
Installed Size : 3.0 KiB
Installed      : Yes
Status         : up-to-date
Source package : raspberrypi-firmware-config-2023.11.21-1.3.src
Upstream URL   : https://github.com/raspberrypi/firmware/
Summary        : Configuration for the Raspberry Pi firmware loader
Description    :
    This package configures the Raspberry Pi boot process.
    2 flavors are available:
      * raspberrypi-firmware-config - the default config
      * raspberrypi-firmware-config-camera - the config which enables
      start_x=1 and increase gpu_mem to be able to use a camera module

    Note: config.txt should not be used to set manually params (gpu_mem, etc.)
    please create extraconfig.txt instead.



[pi4]

armstub=armstub8-rpi4.bin
# Note that the 7" DSI panel isn't supported at the moment through VC4, users
# can still use it through efifb by adding 'dtoverlay=disable-vc4' in
# 'extraconfig.txt'.
dtoverlay=vc4-kms-v3d-pi4,cma-default
dtoverlay=disable-v3d



rpm -ql raspberrypi-firmware-config
/boot/vc/config.txt


After reboot, v3d was not in use and the computer felt very slow. I then commented out again dtoverlay=disable-v3d and got a snappy computer after reboot.

I hope this answers your question. If not, please be specific, so I can check again.
Comment 8 Ivan Ivanov 2024-02-19 08:05:08 UTC
(In reply to Robert Riemann from comment #7)

> dtoverlay=disable-v3d

Ok, this confirm that default setting is not dtoverlay=disable-vc4
as you put it in the bug description.

> After reboot, v3d was not in use and the computer felt very slow. I then
> commented out again dtoverlay=disable-v3d and got a snappy computer after
> reboot.

Thanks. 

Guillaume, do you happen to know what was the
reasoning for disabling v3d?
Comment 9 Michael Chang 2024-02-19 08:24:16 UTC
Reassign to raspberrypi-firmware maintainer. Thanks.
Comment 10 Ivan Ivanov 2024-03-07 08:52:37 UTC
Guillaume, could you take a look at comment#8, please?
Comment 11 Guillaume GARDET 2024-03-07 09:24:12 UTC
(In reply to Ivan Ivanov from comment #8)
> Guillaume, do you happen to know what was the
> reasoning for disabling v3d?

I think it was broken or unsupported at some point.
Maybe it is just fine to enable it now?
Comment 12 Ivan Ivanov 2024-03-21 11:01:29 UTC
Guillaume, 

Removing dtoverlay=disable-v3d from pi4 config.txt section
seems to be working fine.

I will send you change request against raspberrypi-firmware package, ok?

Ivan

---
# glxinfo -B
name of display: :0.0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Broadcom (0x14e4)
    Device: V3D 4.2 (0xffffffff)
    Version: 23.3.6
    Accelerated: yes
    Video memory: 3821MB
    Unified memory: yes
    Preferred profile: core (0x1)
    Max core profile version: 3.1
    Max compat profile version: 3.1
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.1
OpenGL vendor string: Broadcom
OpenGL renderer string: V3D 4.2
OpenGL core profile version string: 3.1 Mesa 23.3.6
OpenGL core profile shading language version string: 1.40
OpenGL core profile context flags: (none)

OpenGL version string: 3.1 Mesa 23.3.6
OpenGL shading language version string: 1.40
OpenGL context flags: (none)

OpenGL ES profile version string: OpenGL ES 3.1 Mesa 23.3.6
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
Comment 13 Guillaume GARDET 2024-03-21 11:11:47 UTC
(In reply to Ivan Ivanov from comment #12)
> Guillaume, 
> 
> Removing dtoverlay=disable-v3d from pi4 config.txt section
> seems to be working fine.
> 
> I will send you change request against raspberrypi-firmware package, ok?
> 
> Ivan
> 
> ---
> # glxinfo -B
> name of display: :0.0
> display: :0  screen: 0
> direct rendering: Yes
> Extended renderer info (GLX_MESA_query_renderer):
>     Vendor: Broadcom (0x14e4)
>     Device: V3D 4.2 (0xffffffff)
>     Version: 23.3.6
>     Accelerated: yes
>     Video memory: 3821MB
>     Unified memory: yes
>     Preferred profile: core (0x1)
>     Max core profile version: 3.1
>     Max compat profile version: 3.1
>     Max GLES1 profile version: 1.1
>     Max GLES[23] profile version: 3.1
> OpenGL vendor string: Broadcom
> OpenGL renderer string: V3D 4.2
> OpenGL core profile version string: 3.1 Mesa 23.3.6
> OpenGL core profile shading language version string: 1.40
> OpenGL core profile context flags: (none)
> 
> OpenGL version string: 3.1 Mesa 23.3.6
> OpenGL shading language version string: 1.40
> OpenGL context flags: (none)
> 
> OpenGL ES profile version string: OpenGL ES 3.1 Mesa 23.3.6
> OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10

Great! :)
Comment 14 Ivan Ivanov 2024-03-21 14:31:23 UTC
Request sent: https://build.opensuse.org/request/show/1160122
Comment 15 Ivan Ivanov 2024-03-22 09:00:11 UTC
Request 1160122 accepted. Hopefully it will soon land in Tumbleweed.