I'm writing a poc NEWT driver that uses KMS.
I managed to setup a display but somehow newt does not find a valid gl profile (it finds nothing). I have no idea why this is. This is the output that I get: http://hastebin.com/raw/tinojegadi
I base myself on this C project: https://github.com/robclark/kmscube/blob/master/kmscube.c
My code can be found here:
and can be run with this oneliner (outside of X as it uses KMS!):
mvn clean package assembly:assembly && java -Dnativewindow.ws.name=com.github.zubnix.kmscube.kmsdriver -Dnewt.debug=all -jar target/kmscube-jogl-1.0-SNAPSHOT-static.jar
Does anyone have an idea what's going on? To me it looks like it tries to contact X for some bizarre reason...
21:11 < zubzub> sgothel: I think the root cause of the bug is GLProfile's implementation when using EGL
21:12 < zubzub> it seems to revert to the default display or something
21:12 < zubzub> which causes an default egl abstract graphics device to be created
21:12 < zubzub> which causes eglGetDisplay(0) to be called
21:12 < zubzub> which is not supported under gbm/kms
21:13 < zubzub> which results in libEGL trying to connect to X
21:13 < zubzub> which obviously fails
21:13 < zubzub> it's hard to debug because I have to switch between vt's when doing a testrun :)
21:13 < zubzub> ie X can not display stuff once the kms/egl/jogl program is running]
22:21 <+sgothel> @Zuzub: right - EGLDrawableFactory's initialization might be the issue
22:21 <+sgothel> so we have to use that EGL/platform extension if available .. w/ the 'to be probed platform values'
I decided to write a gbm NEWT driver directly in the jogl project.
(In reply to Erik De Rijcke from comment #3)
> I decided to write a gbm NEWT driver directly in the jogl project.
> Progress here:
I missed your egl patches, thank you for working on it.
It is in your own master branch right?
AFAIK I picked some of your work earlier hmm.
Would you be willing to re-produce clean patches?
- No unrelated cleanup changes like imports swizzles etc
- To the point changes only
I can do that as well after merging though.
Foremost: Is it working and how can I test this?
Xerxes's email woke me up about your work:
> * KMS Cube is Mesa 3D example application that initialized EGL using GBM and
> KMS https://gitlab.freedesktop.org/mesa/kmscube/ This application work
> directly from console if you compile it and run it on a Raspberry Pi 4.
> * JOGL do NOT contain support to initialize EGL using GBM/KMS, however some
> attempts have already been made to implement support for GBM/KMS for other
> linux systems:
> https://jogamp.org/bugzilla/show_bug.cgi?id=1156 - Newt EGL/GBM (KMS) driver
> * https://github.com/Zubnix/jogl/commits/master <- proof of concept
> implementation of NEWT GBM/KMS driver, try this
> Back in 2018, i tried to make a GBM/KMS implementation:
> my failed attempt is now archived here:
I set this to 'in progress' for now as this use case is interesting very much.
Also: this is a new feature.
re 'guessGBM()' I assume you just copied that code from 'guessBroadcomVCIV()'?
Order for GNU/Linux (and other unices) IMHO is
1) Display Server (Vendor neutral)
1.1) running X11 display server (DISPLAY check enough?)
1.2) running WAYLAND display server (WAYLAND_DISPLAY check enough?)
2) Console Mode Vendor Neutral
2.1) GBM (how to check?)
3) Console Mode Vendor Specific
3.1) VCIV (how to check)
If we could at least determine (instead of guessing) (1) properly,
the default fallback would be (2).
Otherwise we have to use (1.1) as the default fallback
and simply rely on the user given determination via the property.