-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
SDL2 2.24.1: SDL_Init() fails on Raspberry Pi 3 with Kernel 5.15 #6421
Comments
Saw the same on Intel machine running Fedora 36, attempting to use kmsdrm for https://github.com/ericcurtin/twincam/ In my case I don't even want to use a touch device, I just want to use SDL to display video. |
So my assumption is it's trying to add any touch devices it sees at startup; on my laptop with a trackpad, this doesn't seem to find one for whatever reason. If someone could try this: run the app under a debugger, and set a breakpoint at SDL_touch.c:100, which is this line: SDL_SetError("Unknown touch device id %d, cannot reset", (int) id); And then run the program. When that breakpoint triggers, post the backtrace ("bt" command in gdb) here. |
(Also possible that kernel 5.15 is reporting a bogus device, and I am not on that version, which is why I don't see a device, let alone a failure, here.) |
After running "kmscube -c 0" my touch display works. The touch device is connected via I2C. |
I think the touch error message is a red herring. The only touch code that runs in this case is in response to udev enumeration, but failure in any of those paths doesn't translate into an initialization failure. I think the real problem is that SDL is assuming that the CRTC is configured rather than trying to configure it itself. That is for better interoperability with existing display management systems, but is an issue when you are running it for the first time on an unconfigured display. |
Do we want to do something about this for 2.26.0, or is this going to be a significant effort? |
I'll take a look today and see. |
@michael1413, can you provide more information on your setup? I have a Raspberry Pi 4 running Bullseye with kernel 5.15.76, and I've set it to boot directly to the console. I installed the latest SDL code and am running the testsprite2 program from the SDL test directory. It tells me that it's using kmsdrm and the OpenGL renderer, and runs fine here. |
I have a Raspberry CM3+ and CM4 running an embedded Linux created with Buildroot. Renderer: opengles2 Software=0 Accelerated=1, Presentvsync=1 Targettexture=1 |
Any chance I can ssh into an account with sudo permissions to debug? You can send me e-mail at slouken@libsdl.org to coordinate. |
So the real error is: Failed to find index of mode attached to the CRTC. |
Fixed, thanks! |
The SDL_Init(SDL_INIT_VIDEO) fails on Raspberry Pi 3 with Kernel 5.15.
I get the error message "Unknown touch device id 5, cannot reset"
After running the program "kmscube -c 0", the SDL_Init() works.
In the line from which it works is written drmModeSetCrtc()
With Kernel 5.10 there are no problems.
SDL2 Version 2.24.1
MESA 3d Version 22.2.1
regards,
Michael
The text was updated successfully, but these errors were encountered: