Enable 3d acceleration

From www.ReeltoReel.nl Wiki
Revision as of 20:59, 4 June 2019 by Pvdm (talk | contribs) (Created page with "Re: How to turn on OpenGL on RPi 3B (Solved) Quote Sun Oct 14, 2018 11:04 pm https://www.reddit.com/r/openSUSE/comme ... _question/ OP sdoconnell "3 months ago", 2018-07-xx....")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Re: How to turn on OpenGL on RPi 3B (Solved) Quote Sun Oct 14, 2018 11:04 pm

https://www.reddit.com/r/openSUSE/comme ... _question/ OP sdoconnell "3 months ago", 2018-07-xx. He found the solution in https://www.suse.com/documentation/suse ... rry-pi.pdf the SuSE documention for SLES-12 SP3 on Raspberry Pi (PDF).

I did the following procedure with no problems on two different Raspberry Pi 3B's:

1. Since Eric Anholt's accelerated vc4 driver is "experimental", SuSE ships it with 3D acceleration suppressed. Edit /etc/X11/xorg.conf.d/20-kms.conf and comment out Option "AccelMethod" "none".

2. Install package Mesa-dri-vc4 which provides the direct rendering module for the X-Server.

3. In /boot/efi/extraconfig.txt you need dtoverlay=vc4-kms-v3d or dtoverlay=vc4-fkms-v3d ("fake" KMS). Other forum posts suggest that the latter one works better for streaming video, so I'm using that one.

4. The kernel command line needs a nonzero cma allocation. Based on another forum post I'm using cma=300M (unit of megabytes is required). Different people recommend different values. I suspect without proof that this is an upper bound; the driver is known to expand and contract video RAM dynamically. While other distros use /boot/cmdline, SuSE uses Grub (yay) which obeys /boot/grub2/grub.cfg which is overwritten on each update with material from /etc/default/grub. For this driver gpu_mem is irrelevant and can be left at the default (32 on SuSE, 16 on Gentoo, in megabytes).

5. Reboot, to get the changed dtoverlay=vc4-fkms-v3d and/or cma=300M.

I installed glmark2 from the SuSE repo and it got an overall score of 74, which looks like the average frames per sec of the 33 sub-tests. Comparing the overall score on different graphics platforms:

  • 17 fps for a RPi 3B with software rendering.
  • 74 fps for a RPi 3B with the GPU enabled, 4.4x faster.
  • 1831 fps for an Intel Core i5-5200U @2.2GHz with Intel HD Graphics 5500.
  • And a real gaming GPU would be faster than that.

So you won't be playing modern video games, but this is very promising for my goal of video playback. The next step is to purchase the codec licenses and install Kodi. Thank you to all who helped out on this issue and special credit to sdoconnell.