gilius2k15
Posts: 54
Joined: Thu Jul 18, 2019 8:42 am

vc4-fkms-v3d (Pi4 Graphics)

Mon Aug 05, 2019 1:36 pm

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

?

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7267
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: vc4-fkms-v3d (Pi4 Graphics)

Mon Aug 05, 2019 2:31 pm

gilius2k15 wrote:
Mon Aug 05, 2019 1:36 pm
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
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.

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 Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

gilius2k15
Posts: 54
Joined: Thu Jul 18, 2019 8:42 am

Re: vc4-fkms-v3d (Pi4 Graphics)

Mon Aug 05, 2019 4:18 pm

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.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7267
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: vc4-fkms-v3d (Pi4 Graphics)

Mon Aug 05, 2019 4:44 pm

gilius2k15 wrote:
Mon Aug 05, 2019 4:18 pm
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.
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?

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 Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

gilius2k15
Posts: 54
Joined: Thu Jul 18, 2019 8:42 am

Re: vc4-fkms-v3d (Pi4 Graphics)

Mon Aug 05, 2019 10:17 pm

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.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7267
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: vc4-fkms-v3d (Pi4 Graphics)

Tue Aug 06, 2019 6:14 am

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.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

gilius2k15
Posts: 54
Joined: Thu Jul 18, 2019 8:42 am

Re: vc4-fkms-v3d (Pi4 Graphics)

Tue Aug 06, 2019 8:23 am

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?

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7267
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: vc4-fkms-v3d (Pi4 Graphics)

Tue Aug 06, 2019 10:17 am

gilius2k15 wrote:
Tue Aug 06, 2019 8:23 am
However, I'm not convinced that it's the mesa version that's causing the GUI to not work at all with VC4?
On what basis?
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 Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

gilius2k15
Posts: 54
Joined: Thu Jul 18, 2019 8:42 am

Re: vc4-fkms-v3d (Pi4 Graphics)

Tue Aug 06, 2019 10:30 pm

Upon further investigation I think you might be right.

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

Image

User avatar
Gavinmc42
Posts: 3715
Joined: Wed Aug 28, 2013 3:31 am

Re: vc4-fkms-v3d (Pi4 Graphics)

Wed Aug 07, 2019 12:01 am

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 :D
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

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23631
Joined: Sat Jul 30, 2011 7:41 pm

Re: vc4-fkms-v3d (Pi4 Graphics)

Wed Aug 07, 2019 8:39 am

Gavinmc42 wrote:
Wed Aug 07, 2019 12:01 am
Does that mean anyone who wants to make a Pi4 OS should use at least Mesa 19.1?
Yes.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

diederik
Posts: 391
Joined: Wed Mar 26, 2014 11:17 pm

Re: vc4-fkms-v3d (Pi4 Graphics)

Mon Sep 16, 2019 1:37 pm

6by9 wrote:
Mon Aug 05, 2019 4:44 pm
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.
Must mesa be >=19.1.0 only for RPi 4 or for all RPi versions?

(FTR: Debian Buster has mesa 18.3.6-2)

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7267
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: vc4-fkms-v3d (Pi4 Graphics)

Mon Sep 16, 2019 2:04 pm

diederik wrote:
Mon Sep 16, 2019 1:37 pm
Must mesa be >=19.1.0 only for RPi 4 or for all RPi versions?

(FTR: Debian Buster has mesa 18.3.6-2)
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 Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

diederik
Posts: 391
Joined: Wed Mar 26, 2014 11:17 pm

Re: vc4-fkms-v3d (Pi4 Graphics)

Mon Sep 16, 2019 2:20 pm

Thanks :)

Return to “General discussion”