WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Can't get 3D acceleration working on CM5  (Read 178 times)

Offline xsquared

  • Newbie
  • *
  • Posts: 12
Can't get 3D acceleration working on CM5
« on: March 10, 2025, 07:39:11 PM »
I have piCore v15 aarch64 running on a CM5. I have a basic MIPI DSI display connected and it works with dtoverlay=vc4-kms-dsi-generic in my config.txt

However, no 3D acceleration:

Code: [Select]
tc@box:~$ glxinfo -display :0 |grep Accelerated
MESA-LOADER: glx: failed to open zink: driver not built!
MESA-LOADER: glx: failed to open drm-rp1-dsi: driver not built!
failed to load driver: drm-rp1-dsi
    Accelerated: no

NB: drm_rp1_dsi is loaded and the errors go away if I set the environment variable MESA_LOADER_DRIVER_OVERRIDE=zink, however glxinfo tells me the OpenGL renderer is not zink but llvmpipe.

I was able to get acceleration working on a CM4 with piCore v13, a few years back, with dtoverlay=vc4-fkms-v3d, by adding some config files into /usr/local/share/X11/xorg.conf.d/ This fix loaded the glamoregl module, which provided the acceleration. Looking at the structure for v15, I see a 20-noglamor.conf in /usr/local/share/Xorg-3d/files so maybe that is no longer the way to go now we have a RP1 chip handling the GPU. I was probably cribbing from RaspberryPi OS, but there's not much for configuration in X server there on my CM5.

Any ideas on things I can try or should investigate would be much appreciated.


Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 15023
Re: Can't get 3D acceleration working on CM5
« Reply #1 on: Today at 05:12:07 AM »
I only have RPi0w, RPi3 and RPi4 to test with and the zink driver was not required with those to get hardware acceleration.

mesa says this:
Quote
The Zink driver is a Gallium driver that emits Vulkan API calls instead of targeting a specific GPU architecture. This can be used to get full desktop OpenGL support on devices that only support Vulkan
Were you trying to use vulkan - I can get vulkan without the zink driver.

20-noglamor.conf was required to get hardware acceleration with RPi3.

I'll take a look.
« Last Edit: Today at 05:48:44 AM by Juanito »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 15023
Re: Can't get 3D acceleration working on CM5
« Reply #2 on: Today at 06:47:41 AM »
zink driver added - let us know if things work

Offline xsquared

  • Newbie
  • *
  • Posts: 12
Re: Can't get 3D acceleration working on CM5
« Reply #3 on: Today at 07:24:49 AM »
Thanks, Juanito. I wasn't trying to use vulkan or zink. My app uses OpenGL for graphics calls, so I don't think I need zink, but I will try the driver you posted.

Offline xsquared

  • Newbie
  • *
  • Posts: 12
Re: Can't get 3D acceleration working on CM5
« Reply #4 on: Today at 07:33:15 AM »
That didn't work for me. I think, since my app runs on X, the missing piece is to get Glamor working and talking to MESA. If I can do that I should get hardware acceleration on CM5. It's not my area of expertise, so I'm chipping away at it.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 15023
Re: Can't get 3D acceleration working on CM5
« Reply #5 on: Today at 07:47:39 AM »
Can you attach Xorg.0.log?

I assume you’re using dtoverlay=vc4-kms-v3d?

Offline xsquared

  • Newbie
  • *
  • Posts: 12
Re: Can't get 3D acceleration working on CM5
« Reply #6 on: Today at 08:29:30 AM »
I couldn't get my DSI display working with dtoverlay=vc4-kms-v3d, but got something working with dtoverlay=vc4-kms-dsi-generic

So maybe that's the problem, there's no 3d in the name! I'll have a look at the overlay dts files and see if I can make a Frankenstein version.

Xorg.0.log attached.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 15023
Re: Can't get 3D acceleration working on CM5
« Reply #7 on: Today at 09:39:50 AM »
Whereas I have this in the xorg log:
Code: [Select]
(**) |   |-->Device "broadcom"
...
(II) Loading sub module "glamoregl"
(II) LoadModule: "glamoregl"
(II) Loading /usr/local/lib/xorg/modules/libglamoregl.so
...
(II) modeset(0): glamor X acceleration enabled on V3D 4.2.14.0
(II) modeset(0): glamor initialized

you have:
Code: [Select]
(**) |   |-->Device "Intel Graphics"
...
(II) Loading sub module "glamoregl"
(II) LoadModule: "glamoregl"
(II) Loading /usr/local/lib/xorg/modules/libglamoregl.so
...
(II) modeset(0): Refusing to try glamor on llvmpipe
(II) modeset(0): glamor initialization failed
(**) modeset(0): DRI3 disabled

I'm not sure why it shows an intel graphics device?

Did you load the Xorg-3d meta extension? Do you have the graphics-KERNEL extension loaded?

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 15023
Re: Can't get 3D acceleration working on CM5
« Reply #8 on: Today at 10:03:59 AM »
Do you need vc4-kms-v3d-pi5 maybe?
« Last Edit: Today at 10:31:09 AM by Juanito »

Offline xsquared

  • Newbie
  • *
  • Posts: 12
Re: Can't get 3D acceleration working on CM5
« Reply #9 on: Today at 10:33:00 AM »
Good find, Juanito. The Intel was being pulled in from a config file I had in xorg.conf.d which appeared to work on the CM4 – attached – that I should probably remove.

Yes to both of your questions, I'm using Xorg-3d and graphics-KERNEL. And I did try vc4-kms-v3d-pi5 but couldn't get X to run at all.

So I need to figure out why
modeset(0): Refusing to try glamor on llvmpipe
is occurring.

Thanks so much for your help. I have to switch to another task now, but if I can get things working later this week, I'll post my solution here.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 15023
Re: Can't get 3D acceleration working on CM5
« Reply #10 on: Today at 10:43:23 AM »
I think it would be better to remove your 30-modeset.conf before you try again.