Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
geoaxis opened this issue Nov 11, 2021 · 9 comments
Open

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

geoaxis opened this issue Nov 11, 2021 · 9 comments

Comments

@geoaxis
Copy link

geoaxis commented Nov 11, 2021

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.

@geoaxis
Copy link
Author

geoaxis commented Nov 16, 2021

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.

@geoaxis
Copy link
Author

geoaxis commented Nov 18, 2021

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.

@rnayabed
Copy link

rnayabed commented Nov 18, 2021

@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

@rnayabed
Copy link

rnayabed commented Nov 18, 2021

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

@geoaxis
Copy link
Author

geoaxis commented Nov 18, 2021

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

@rnayabed
Copy link

@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

@geoaxis
Copy link
Author

geoaxis commented Nov 20, 2021

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).

@geoaxis geoaxis changed the title Unable to run samples on raspbian bullseye due to no fkms Unable to run samples on raspbian bullseye when kms is enabled. Nov 20, 2021
@rnayabed
Copy link

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?

@rnayabed
Copy link

Related : #132

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants