Up to and including Raspbian Stretch, I could use a hacked SDL library called SDL12-kms-dispmanx by a developer called vanfanel to run SDL 1.2 code from the console without X. (See here: https://github.com/vanfanel/SDL12-kms-dispmanx)

Now, with Buster, this fails because the dispmanx calls seem to return an incorrect screen size. This seems to be a firmware thing, since the same problems happen when I install the newest firmware on a Stretch based system.

Is there any alternative that works on Buster and that doesn't involve either porting the code to SDL 2 (which would indeed be better, but unfortunately I don't have the time for that) or running X?

  • 1
    You did notice that the last time that repo was updated was 6 years ago? Except for this note: github.com/vanfanel/SDL12-kms-dispmanx/blob/master/README.md
    – goldilocks
    Commented Sep 11, 2019 at 17:59
  • Well, even for stretch SDL you need to hack, now for buster, what do you expect?
    – tlfong01
    Commented Sep 12, 2019 at 2:08
  • @tlfong01 what I meant by "hacked" was that vanfanel did some relatively small modifications of the released SDL 1.2.15 code. I used his code unmodified (except for some clock handling issue that stemmed from the original SDL 1.2, unrelated to vanfanel's modifications).
    – TeaRex
    Commented Sep 12, 2019 at 13:41
  • @TeaRex, Sorry, I misunderstood your meaning of "hacking". My sad experience of upgrading from jessie to stretch, and then stretch to buster was that many drivers become unusable and the developer no longer supports upgrade. I know in some cases I can build the drivers or kernels, but I am a newbie in this area, so I just give up, or hope that the develop can upgrade soon.
    – tlfong01
    Commented Sep 12, 2019 at 13:49

1 Answer 1


SDL 1.2 can be build without X dependencies if you specify --enable-video-fbcon or --enable-video-directfb when you configure it. This should work with original SDL sources, but trying out https://github.com/vanfanel/SDL-1.2.15-raspberrypi seems to be a good idea, since it promises "native 2D API driver", which may mean better performance.

Don't forget to set SDL_VIDEODRIVER variable accordingly.

  • 1
    I will try that. Years ago I couldn't get SDL-1.2.15-raspberrypi to work at all and that was the reason why I chose the older SDL12-kms-dispmanx thing at the beginning of that project - it was the only thing I found that actually worked. However I don't remember the details of the failure.. So time to look into it again. If it still doesn't work I will post a new question.
    – TeaRex
    Commented Sep 12, 2019 at 13:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.