Skip to content
This repository has been archived by the owner. It is now read-only.

SDL2 regression broke DirectFB renderer #80

Closed
ollieparanoid opened this Issue Apr 3, 2018 · 5 comments

Comments

Projects
None yet
2 participants
@ollieparanoid
Copy link
Member

commented Apr 3, 2018

On March 11th, the sdl2 package was updated in Alpine to 2.0.8.
In this version, the DirectFB renderer backend is broken. As this is the only possibility to use framebuffer with SDL2, we use it on basically all devices with a downstream (based on vendor's) kernel.

@michitux found the exact issue and reported a bug report upstream:
https://bugzilla.libsdl.org/show_bug.cgi?id=4123

The problem is, that this breaks both osk-sdl and charging-sdl in postmarketOS for almost all devices. So I recommend we fix this ASAP with a patch and don't wait for SDL2 upstream to patch it, then release it, and then Alpine picking the release up.

I think this is the fast way:

  • copy the sdl2 aport from Alpine
  • create a patch that adds the AC_DEFINE(SDL_VIDEO_RENDER_DIRECTFB, 1, [ ]) line again, which has been removed (see upstream bugreport)
  • increase pkgrel
  • build it
  • test it on the device (by running pmbootstrap install as usually, it should use the new package then)
  • when the patch has been tested, create a pull request to Alpine's aports.
    • mention in the issue that this is important to fix booting with full disk encryption in postmarketOS
    • link to this issue
    • kindly ask in #alpine-devel if they could take a look at it
    • (It's not tolerated if we would say "this is for postmarketOS, so it's important!", but in this case it fixes an important bug so hopefully we could take the fast lane as an exception.)
    • if that fails, we could carry the patched version in the postmarketOS aports (but that increases technical debt and we need to pay attention to future updates, which would directly cause breakage again)

@michitux: do you happen to have time for this? Otherwise I can do it tomorrow.

@michitux

This comment has been minimized.

Copy link
Contributor

commented Apr 3, 2018

I have tested an sdl2 package in postmarketOS locally that uses the simpler patch that just removes the #ifdef statement which is simpler as it does not require running autogen.sh. I can try the "proper" fix tonight CET (i.e., in about 12 hours). What I did for testing is just building and installing sdl2 on the device, regenerating the initfs and flashing the boot image on the device (which is probably not even required). Then, charging-sdl started to work which did not display anything before.

@michitux

This comment has been minimized.

Copy link
Contributor

commented Apr 3, 2018

@ollieparanoid see https://github.com/michitux/pmbootstrap/tree/fix/sdl2 for my "quick & dirty" patch (most recent commit on that branch).

michitux added a commit to michitux/aports that referenced this issue Apr 3, 2018

main/sdl2: fix DirectFB renderer regression
The update to 2.0.8 broke the build of the DirectFB renderer such that
it cannot be used anymore, see
https://bugzilla.libsdl.org/show_bug.cgi?id=4123. This fixes the
regression by re-inserting the affected line in the configure script.

Having a working DirectFB renderer in SDL2 is crucial for postmarketOS
as it is used for unlocking full disk encryption and displaying the
charging animation on almost all devices, see also postmarketOS/osk-sdl#80.
@michitux

This comment has been minimized.

Copy link
Contributor

commented Apr 3, 2018

@ollieparanoid I have submitted the PR for Alpine Linux, see alpinelinux/aports#3889. I have also updated my fix/sdl2 branch with the changes.

@ollieparanoid

This comment has been minimized.

Copy link
Member Author

commented Apr 3, 2018

Thank you very much, highly appreciated! I think we should be able to solve this one way or another within a day.

algitbot pushed a commit to alpinelinux/aports that referenced this issue Apr 4, 2018

main/sdl2: fix DirectFB renderer regression
The update to 2.0.8 broke the build of the DirectFB renderer such that
it cannot be used anymore, see
https://bugzilla.libsdl.org/show_bug.cgi?id=4123. This fixes the
regression by re-inserting the affected line in the configure script.

Having a working DirectFB renderer in SDL2 is crucial for postmarketOS
as it is used for unlocking full disk encryption and displaying the
charging animation on almost all devices, see also postmarketOS/osk-sdl#80.
@ollieparanoid

This comment has been minimized.

Copy link
Member Author

commented Apr 4, 2018

Alright, your patch has been merged in Alpine, which means they should carry the patch until it is fixed upstream in SDL2. I have just tested osk-sdl again on the samsung-i9100, and I can confirm that it is fixed now. Thanks again for the excellent work @michitux!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.