I have developed an application in Python which uses the Kivy framework to implement the user interface. When I tried my application on my Raspberry Pi 3 the result wasn’t what I expected. The screen just turned white. Now the thing is my Raspberry Pi is running with the screen rotated 90 degrees (i.e. display_rotate=3 in /boot/config.sys). So I turned off the screen rotation and tried again. This time it worked and my application started alright. But I needed the screen to be turned 90 degrees. Problem!
I verified the issue with the 3Drendering example that comes with Kivy. Same problem: the example worked fine with no rotation, but resulted in a white screen when the display was turned 90 degrees. Stumped I turned to Google for a solution but to no avail. I had to crack this one myself.
I thought the problem was related to the Kivy framework, since Kivy is what drives the actual UI. But everything looked alright and the logs didn’t show anything noteworthy. In the end it turned out I was right in a way, but the fix was actually on the Raspberry Pi level: I had to increase the GPU memory setting. Increasing from 64 MB to 65 MB was enough to solve the issue for me. Both Kivy’s 3Drendering example and my own application worked as expected and I celebrated my small victory with a cup of black tea.
UPDATE: I had to increase the GPU memory even more after encountering the dreaded white screen again. 80 MB is my current bet.