gluonhq / gluon-samples

Gluon sample projects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to run samples on raspbian bullseye when kms is enabled.

geoaxis opened this issue · comments

There is no fkms option amendment: available by default in new raspbian.

When i run code similar to HelloPi but with 3d i get the following error

[GluonErr] err wile adding FB: Invalid argument
[GluonErr] crtc0, err: No such file or directory
[GluonErr] crtc1, err: No such file or directory
[GluonErr] err wile adding FB: Invalid argument
[GluonErr] crtc0, err: No such file or directory
[GluonErr] crtc1, err: No such file or directory

I have confirmed that same code , on same hardware , with same jdk and openjfx sdk , but previous raspbian and fakekms works fine.

I would like to add that similar issue is present in older raspbian with kms. But the error messages is

[GluonErr] crtc1, err: Device or resource busy

And it seems that the screen starts with 3d image but then blanks out. Both these reports are for raspberry pi 3a. I don't have the setup to produce it on Pi4 at the moment.

Upon further inspection, I see that a non 3d application boots up on rpi3 with full kms on bullseye, but it immediately blanks out. This behavior also exists on buster with full kms (I tried both HelloPi and https://github.com/geoaxis/blessed-javafx-rpi3)

Edit: in both cases (buster kms and bullseye kms) I am using Java and not native when I see black screen.

@geoaxis actually you can still switch to fkms driver in latest raspbian...

You have to change dtoverlay=vc4-kms-v3d line to dtoverlay=vc4-fkms-v3d to use fkms driver in /boot/config.txt

Looks like raspberry KMS driver is still quite broken. Only solution is to fallback to FKMS for the time being

Looks like they removed the option itself from raspi-config menu, so only way to use it is via the config.txt

Ah, thanks for the hint @rnayabed . I was suspecting it was possible but i never had the chance to try. Kms fix should be a matter of time. Qt5.15 works with 3d (gles) over latest kms just fine . https://photos.app.goo.gl/XdueUHdgde5iv3T97

@geoaxis Regarding why KMS mode does not work with many HDMI screens on the Pi, check this out. A Raspberry Pi engineer explains why that is happening.

raspberrypi/linux#4719

Thank you. I tried fkms and that works for me on bullseye. My particular setup has non standard joyit touch screen (800x480) and I tried passing it video params but it did not help . The symptoms are same. The screen shows up and I see the 3d image for a split second before it blanks out and says

[GluonErr] crtc1, err: Device or resource busy

I will rename the bug to sample not woring on kms (since it is shown now that it does work with the fkms work around on bullseye now).

Thank you. I tried fkms and that works for me on bullseye. My particular setup has non standard joyit touch screen (800x480) and I tried passing it video params but it did not help . The symptoms are same. The screen shows up and I see the 3d image for a split second before it blanks out and says

[GluonErr] crtc1, err: Device or resource busy

I will rename the bug to sample not woring on kms (since it is shown now that it does work with the fkms work around on bullseye now).

Dumb question but, Did you try running the java jar as root?