Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 3552

Beginners • Help getting started pygame and video drivers on Bookworm Lite

$
0
0
I'm trying to get started with pygame on a Raspberry Pi Zero 2 W running Bookworm Lite and a Waveshare LCD. I am encountering a really crazy amount of difficulty.

First - I'm using Raspberry Pi Lite specifically because I want to avoid all the complexity of X11. My projects are all kiosk-style devices that just run one pygame app and that's all. I have absolutely no need for a GUI and all the complexity that comes with it.

I can boot the device with the LCD working, and I can install and run pygame. But it cannot find any video drivers: fbcon, directfb, svgalib, etc.

The problem appears to be the version of SDL2 that's packaged with pygame 2.x. Apparently, SDL2 removed support for fbcon and didn't replace it with anything. There are messages and complaints about this going all the way back to 2012, so this is not exactly a new problem.

All of the suggestions appear to involve building and installing your own SDL2 and/or driver package with the right parameters. But, of course, building any large package on a Raspberry Pi Zero 2 W is a tricky prospect given its meager resources - it takes a long time and is prone to fail due to memory limits. And even once it's built, configuring pygame to use libraries other than those it was compiled with is also a tricky prospect. I just don't want to go down this path unless it's absolutely necessary.

Another option is to downgrade to a version of pygame 1.x that uses SDL 1.x, which includes fbcon. But it's also my understanding that pygame 1.x / SDL 1.x lose a lot of basic functionality, such as decent support for touch input.

My question is simple: What is the easiest way to enable **any** video support for pygame 2.x / SDL2 on a Raspberry Pi Zero 2 W running Raspberry Pi Lite? I don't care whether it's fbcon or directfb or svgalib, etc. - I just want *something* to work without having to build a ton of libraries from scratch without knowing what I'm doing. Thanks in advance.

Statistics: Posted by sfsdfd — Sat Mar 16, 2024 7:32 pm



Viewing all articles
Browse latest Browse all 3552

Trending Articles