Does anyone know why this graphics option in config.txt works for some distros but results in a black screen or messed up display in others?
Is there an alternative to specifying the following in config.txt:
dtoverlay=vc4-fkms-v3d
?
-
- Posts: 67
- Joined: Thu Jul 18, 2019 8:42 am
-
- Raspberry Pi Engineer & Forum Moderator
- Posts: 14861
- Joined: Wed Dec 04, 2013 11:27 am
- Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.
Re: vc4-fkms-v3d (Pi4 Graphics)
There is the option of omitting it and running with the older framebuffer API, but you then have no 3D acceleration available at all as that is part of what that overlay enables.gilius2k15 wrote: ↑Mon Aug 05, 2019 1:36 pmDoes anyone know why this graphics option in config.txt works for some distros but results in a black screen or messed up display in others?
Is there an alternative to specifying the following in config.txt:
dtoverlay=vc4-fkms-v3d
What issues specifically are you seeing?
KMS and DRM rely almost exclusively on the EDID of the display, so if that is wrong then you will have issues.
If there are issues seen within Raspbian then we are actively investigating them when sufficient information is provided to do so (mainly a dump of the EDID on the assumption that it correctly describes a mode that the display will accept). Most of this code is either in the Linux kernel, or mesa (for which Debian and Raspbian are typically behind most other distros).
Software Engineer at Raspberry Pi Ltd. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.
I'm not interested in doing contracts for bespoke functionality - please don't ask.
-
- Posts: 67
- Joined: Thu Jul 18, 2019 8:42 am
Re: vc4-fkms-v3d (Pi4 Graphics)
We've been trying to interchange 64-bit kernels based on the Pi4 that work fine in Raspbian (32-bit userland) and Gentoo (64-bit userland) - but when replacing the Ubuntu kernel for Ubuntu 64-bit the display becomes like a black screen with a white mouse cursor - or can look very messed up instead. Only upon disabling VC4 does the Ubuntu desktop GUIs work.
-
- Raspberry Pi Engineer & Forum Moderator
- Posts: 14861
- Joined: Wed Dec 04, 2013 11:27 am
- Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.
Re: vc4-fkms-v3d (Pi4 Graphics)
If it works on Raspbian and Gentoo, then it sounds like it's only an Ubuntu issue. What version of Ubuntu are you trying to run?gilius2k15 wrote: ↑Mon Aug 05, 2019 4:18 pmWe've been trying to interchange 64-bit kernels based on the Pi4 that work fine in Raspbian (32-bit userland) and Gentoo (64-bit userland) - but when replacing the Ubuntu kernel for Ubuntu 64-bit the display becomes like a black screen with a white mouse cursor - or can look very messed up instead. Only upon disabling VC4 does the Ubuntu desktop GUIs work.
Mesa must be 19.1.0 or later to have the relevant code to drive the v3d hardware. That's the most likely failure as that was only released in June but made it into Debian/Raspbian Buster.
Software Engineer at Raspberry Pi Ltd. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.
I'm not interested in doing contracts for bespoke functionality - please don't ask.
-
- Posts: 67
- Joined: Thu Jul 18, 2019 8:42 am
Re: vc4-fkms-v3d (Pi4 Graphics)
Thanks for your reply. Have tried Ubuntu 18.04 and 19.04 - both cannot work with VC4 based on the current state of the kernel that a few different people have built up.
Is Mesa a software package - or a kernel module? Presumably it's something that needs updating in Ubuntu or an incompatibility of sorts?
Somebody recently did Debian for Pi4, but couldn't get VC to work with that either. Besides that somebody claimed to have Ubuntu 19.10 running via a docker system for producing Pi4 SD card images - but he hasn't confirmed whether graphics acceleration is on or off.
Is Mesa a software package - or a kernel module? Presumably it's something that needs updating in Ubuntu or an incompatibility of sorts?
Somebody recently did Debian for Pi4, but couldn't get VC to work with that either. Besides that somebody claimed to have Ubuntu 19.10 running via a docker system for producing Pi4 SD card images - but he hasn't confirmed whether graphics acceleration is on or off.
-
- Raspberry Pi Engineer & Forum Moderator
- Posts: 14861
- Joined: Wed Dec 04, 2013 11:27 am
- Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.
Re: vc4-fkms-v3d (Pi4 Graphics)
https://packages.debian.org/buster/libglx-mesa0
https://mesa3d.org/
Userspace gl implementation that contains some of the platform specific control code. That then dispatches jobs to the hardware.
I'm a little puzzled as that debian link for mesa says 18.3.6. I didn't think I'd updated it on my system, but it definitely returned 19.1.0 for me. It may be that we've bumped the version due to the requirement for V3D support.
https://mesa3d.org/
Userspace gl implementation that contains some of the platform specific control code. That then dispatches jobs to the hardware.
I'm a little puzzled as that debian link for mesa says 18.3.6. I didn't think I'd updated it on my system, but it definitely returned 19.1.0 for me. It may be that we've bumped the version due to the requirement for V3D support.
Software Engineer at Raspberry Pi Ltd. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.
I'm not interested in doing contracts for bespoke functionality - please don't ask.
-
- Posts: 67
- Joined: Thu Jul 18, 2019 8:42 am
Re: vc4-fkms-v3d (Pi4 Graphics)
I found out that the Mesa version on Ubuntu is 19.0.8 - so I'm guessing it falls short of 19.1?
That's after updating it via this guide:
http://ubuntuhandbook.org/index.php/201 ... 18-04-ppa/
However, I'm not convinced that it's the mesa version that's causing the GUI to not work at all with VC4?
That's after updating it via this guide:
http://ubuntuhandbook.org/index.php/201 ... 18-04-ppa/
However, I'm not convinced that it's the mesa version that's causing the GUI to not work at all with VC4?
-
- Raspberry Pi Engineer & Forum Moderator
- Posts: 14861
- Joined: Wed Dec 04, 2013 11:27 am
- Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.
Re: vc4-fkms-v3d (Pi4 Graphics)
On what basis?gilius2k15 wrote: ↑Tue Aug 06, 2019 8:23 amHowever, I'm not convinced that it's the mesa version that's causing the GUI to not work at all with VC4?
With KMS ALL X composition is done in OpenGL using Mesa. If that path is lacking some critical patch then you'll get nothing.
The boot console mode would be expected to work as that is just rendering an RGBA plane, but the GUI can fail in a multitude of ways.
Software Engineer at Raspberry Pi Ltd. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.
I'm not interested in doing contracts for bespoke functionality - please don't ask.
-
- Posts: 67
- Joined: Thu Jul 18, 2019 8:42 am
Re: vc4-fkms-v3d (Pi4 Graphics)
Upon further investigation I think you might be right.
I checked Gentoo (badass distro!) and sure enough Mesa is already at 19.1!

I checked Gentoo (badass distro!) and sure enough Mesa is already at 19.1!

Re: vc4-fkms-v3d (Pi4 Graphics)
Does that mean anyone who wants to make a Pi4 OS should use at least Mesa 19.1?
I have yet to fire up the latest Gentoo64 but I did compile the mesa demos on Raspbian Buster.
Lots of examples just works now. GLSL, OpenCL.....
And yes Gentoo64 is a "badass" OS
Took me some effort to get the mesa demos to compile on Raspbian Buster.
On the old Gentoo64 and 3B+ it just worked with no effort.
But I don't remember if it was fkms or real kms.
I have yet to fire up the latest Gentoo64 but I did compile the mesa demos on Raspbian Buster.
Lots of examples just works now. GLSL, OpenCL.....
And yes Gentoo64 is a "badass" OS

Took me some effort to get the mesa demos to compile on Raspbian Buster.
On the old Gentoo64 and 3B+ it just worked with no effort.
But I don't remember if it was fkms or real kms.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges
Raspberries are not Apples or Oranges
Re: vc4-fkms-v3d (Pi4 Graphics)
Yes.
Principal Software Engineer at Raspberry Pi Ltd.
Working in the Applications Team.
Working in the Applications Team.
Re: vc4-fkms-v3d (Pi4 Graphics)
Must mesa be >=19.1.0 only for RPi 4 or for all RPi versions?
(FTR: Debian Buster has mesa 18.3.6-2)
-
- Raspberry Pi Engineer & Forum Moderator
- Posts: 14861
- Joined: Wed Dec 04, 2013 11:27 am
- Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.
Re: vc4-fkms-v3d (Pi4 Graphics)
Earlier Pis on which you run vc4-fkms-v3d or vc4-kms-v3d may work on earlier versions of mesa as they are using the vc4 driver for the 3D drawing side. Pi4 is using the v3d driver, and the last few fixes for making it usable were fairly late in the process.
Some of those patches may have been backported to 18.3, but I haven't been following it. I thought mesa 19 had made it into Buster - I'm obviously mistaken.
Software Engineer at Raspberry Pi Ltd. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.
I'm not interested in doing contracts for bespoke functionality - please don't ask.