-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
OpenGL problem on Bookworm #2264
Comments
[Sebastian Kuzminsky]
The error goes away if I switch from the default Gnome session
(wayland) to the "GNOME On X11" session type, so that `echo
$XDG_SESSION_TYPE` says `x11`.
Sound like yet another feature not implemented by Wayland. :(
Seem to be several issues with OpenGL and Bookworm, I ran into #1599.
Perhaps the OpenGL code need some refurbishing. :)
…--
Happy hacking
Petter Reinholdtsen
|
I can also work around this problem (when running on Wayland) by setting the environment variable
What does it all mean? |
This patch makes linuxcnc's OpenGL stuff work for me on Wayland on Bookworm:
|
Nice to know there is a solution to this recent development. f the environment is changed in linuxcnc, I'd like to see if my chromebook will run it again. |
Compiled v 2.9 as RIP on my chromebook and set this environment variable So a request: Can the qtvcp dependencies be added to the list linuxcnc knows about when you run Anyway, its great I can now use my chromebook to run sims to test stuff. Its been broken (by the same issue it seems for over 12 months. |
The tip of master works on Bullseye but fails as described above on Bookworm. The important difference seems to be that Bullseye has python3-opengl 3.1.5 (which works), but Bookwork has python3-opengl 3.1.6 (which fails). 3.1.6 went into debian in mid-November, so I expect it's been broken since then. If I install 3.1.5 from snapshots (http://snapshot.debian.org/binary/python3-opengl/) on Bookworm, Axis runs again. (I had to install it with The important difference between python3-opengl 3.1.5 (which works) and 3.1.6 (which doesn't work) is in the detection and selection of the "platform" it uses. 3.1.5 selects the "GLX" platform, but 3.1.6 selects the "EGL" platform: 3.1.5:
3.1.6:
Just like the error message says, the EGL platform lacks the Unlike the GLX platform, which has that function: https://github.com/mcfletch/pyopengl/blob/3e9791ffb4cd4831dae261d6bea3049ce9e78f01/OpenGL/platform/glx.py#L97 After digging around for a bit, it's not totally surprising that this bug made it into pyopengl, and hasn't been noticed or fixed yet -- the pyopengl project is even more starved for developers than LinuxCNC. This is the most recent email on the pyopengl developers' mailing list: https://sourceforge.net/p/pyopengl/mailman/message/37278387/ This all makes me more willing to go with the fix/workaround in #2267 - it just restores the selection of the working GLX platform from 3.1.5. |
[Sebastian Kuzminsky]
The tip of master works on Bullseye but fails as described above on
Bookworm. The important difference seems to be that Bullseye has
python3-opengl 3.1.5 (which works), but Bookwork has python3-opengl
3.1.6 (which fails).
Great to hear you have identified the relevant package and version. Is
the issue registered on <URL: https://bugs.debian.org/src:pyopengl >? I
could not find any obvious candidates. If not, we should report the
issue there, as well as upstream.
3.1.6 went into debian in mid-November, so I expect it's been broken
since then.
Would fit with my problem period, at least.
If I install 3.1.5 from snapshots
(http://snapshot.debian.org/binary/python3-opengl/) on Bookworm, Axis
runs again. (I had to install it with `dpkg -i --force-depends`,
because python3-opengl 3.1.5 Depends on freeglut3, which in Bookworm
has transitioned to libglut3.12).
I will test this too as soon as I can. Might take a few days.
…--
Happy hacking
Petter Reinholdtsen
|
Reported upstream here: mcfletch/pyopengl#89 Reported to Debian here: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1029011 |
With @swt2c's fix in mcfletch/pyopengl#91 I now get a little further in launching Axis:
|
A couple of thoughts here, from me who doesn't know the first thing about OpenGL:
|
Sorry to butt in here, but since I'm here... :-)
Yes, that's probably not going to work. If you want to work natively on Wayland, you're going to have to use EGL. Otherwise, you could force things back to X11 and use GLX.
Assuming that |
Hi, nice to see you here! Thanks for the pyopengl fix, and for your advise on our OpenGL mess :-)
|
I'm sorry that I looked. ;) Your togl code would probably need to grow EGL support, if you wanted to go that route. I looked quickly at Debian's togl and it doesn't look much better/newer. togl project seems to be dead as far as I can see. |
[Sebastian Kuzminsky ***@***.***> writes:
We don't have the expertise or volunteer-hours available to switch our
whole world from GLX to EGL currently, so it looks like I should
reopen #2267 and advocating that as the workaround for the near-term
future.
Reading the story about the Firefox team transition to EGL make me
suspect we might have to work on this soonish,
<URL: https://mozillagfx.wordpress.com/2021/10/30/switching-the-linux-graphics-stack-from-glx-to-egl/ >.
…--
Happy hacking
Petter Reinholdtsen
|
Here's a link-heavy overview of the OpenGL/GLX/EGL landscape on Unix, I found it useful: https://utcc.utoronto.ca/~cks/space/blog/linux/EGLAndGLXAndOpenGL?showcomments#comments It sounds like we should immediately force LinuxCNC back to running on GLX (like we have been forever), instead of inconsistently try to run partially on GLX and partially on EGL (like we accidentally started doing back in November). We should then hope that one of us has the spoons to clean up our OpenGL mess and switch us from GLX to EGL, since that seems to be the way the future is going. And maybe at the same time switch from OpenGL to OpenGL ES, to run better on tiny ARM machines which sometimes don't implement OpenGL but do implement OpenGL ES. |
On Bookworm and newer pyopengl detects if it's running on Wayland, and chooses EGL there. This is problematic because the rest of LinuxCNC is still on GLX, and (as i understand it) one should not mix GLX and EGL within a single application. See <#2264> for some details. The correct fix is probably to teach our code to either use GLX everywhere (for when running on X, and like it does after this commit) or EGL everywhere (for when running on Wayland). This commit fixes Axis on Wayland on Bookworm for me.
[Sebastian Kuzminsky]
We don't have the expertise or volunteer-hours available to switch
our whole world from GLX to EGL currently, so it looks like I should
reopen #2267 and advocate for that as our workaround for the near-term
future.
If I got it right, there are several different OpenGL related problems
with Bookworm at the moment. The Wayland GLX vs EGL issue (not reported
anywhere), the GLES on Wayland issue (reported to Debian as
<URL: https://bugs.debian.org/1029011 >), the GLUT/freeglut3 issue
(reported as <URL: https://bugs.debian.org/1029936 > and perhaps
<URL: https://bugs.debian.org/590452 >), the glBitmap issue (not reported
anywhere).
Did I get it right? Are there other problems too? Can someone who are
able to reproduce the various issues make sure they are reported to
Debian and/or Upstream?
…--
Happy hacking
Petter Reinholdtsen
|
I just installed the Jan 23 Debian 12 "testing" build (pretty sure it was dated Jan 23), and am running into these same issues. I'm willing to try to help out with this, but first, how do I properly install pyopengl mentioned here? |
Just update your Debian testing. That fix is now in testing. |
Is that this?
I have no other updates available. |
On Mon, 30 Jan 2023, Rick M wrote:
Is that this?
$ dpkg -l | grep -i opengl
…
ii python3-opengl 3.1.6+dfsg-2
all Python bindings to OpenGL (Python 3)
Yes.
|
Thank you for the confirmation. I'm experiencing a strange behavior where I get the "Platform does not define a GLUT font retrieval function" when logged into the VM console (I'm doing this in a Parallels VM on my Mac), but not when I'm logged in via |
Nothing is working here for me.. edit: Happens on both LXQt and XFCE. edit2: Note: Using Gentoo here; no Wayland, only X server. |
@NTULINUX Do you have the fix to python3-opengl? That fixed the error this issue is about. But to get it to work all the way I also had to set |
This issue is "fixed" for now, by a combination of python3-opengl 3.1.6+dfsg-2 and #2314. Many thanks to @swt2c for the pyopengl fix and for lending his expertise here, and thanks to @jepler for the #2314 workaround! Gird your loins, linuxcnc hackers: we have lots of OpenGL work to do in the near future... |
Loins girded, I am trying to clear my pressing projects to make room. |
Thank you Andy! |
On an up-to-date install of Bookworm, with linuxcnc 2.9 built into a deb and installed, linuxcnc fails to start with this error:
The issue has been discussed on the forum here, without resolution: https://forum.linuxcnc.org/9-installing-linuxcnc/47468-python-issues-on-bookworm
The issue is reproducible without involving LinuxCNC at all:
From MPI-IS/mesh#49, here's a workaround that gets past the GLUT import error, but linuxcnc still fails shortly thereafter:
The text was updated successfully, but these errors were encountered: