Open mattblovell opened 3 years ago
I've had some luck following the advice from the 2018 answer provided in this stackoverflow thread (started in 2015).
In particular, I was getting a "No video mode large enough" error from pygame. The advice to take the initial output from
fbset -i -fb /dev/fb1
and add it to the contents in /etc/fb.modes
appears to have worked. I now have WeatherPiTFT displaying there with the "standard" values for the two `SDL*` environment variables. (Although starting WeatherPi_TFT also seems to cause X, on the HDMI display, to go completely blank.)
Prior to the above, I also tried recompiling libSDL to enable kmsdrm
per the directions for Kivy:
but I don't think that change was significant (given that I'm still setting SDL_VIDEODRIVER
to fbcon
).
RaspianOS is currently not supported for WasperPi_TFT. I will update the readme concerning that issue.
I have a Raspberry Pi 3 Model B v1.2 running the latest (32-bit) version of Raspberry Pi OS:
Linux raspberrypi 5.4.51-v7+ #1333 SMP Mon Aug 10 16:45:19 BST 2020 armv7l GNU/Linux
and Python 3.7.3. For a display, I have a SPI-attached ILI9341-based TFT LCD panel, specifically this one:
http://www.lcdwiki.com/3.2inch_SPI_Module_ILI9341_SKU:MSP3218
that I do have working with a dtoverlay, creating
/dev/fb1
upon which I can render images (viafbi
) or play movies (viamplayer
).Pulling the latest WeatherPi_TFT, however, I cannot get it to display on
/dev/fb1
. Instead, it always ends up rendering on the HDMI display (/dev/fb0
). The same is true for other Python programs that make use of pygame and rely, as WeatherPi_TFT appears to, upon the environment variables $SDL_FBDEV and $SDL_VIDEODRIVER to "direct" libSDL to make use of a framebuffer directly.Googling around about the issue, I came across this posting from early 2019 on the Raspberry Pi forums:
Issue using Python3/pygame to output to /dev/fb1 targeting a 2.8" TFT screen https://www.raspberrypi.org/forums/viewtopic.php?t=234087
In a follow-up post, that author states the following:
I was wondering if you had any insights into this matter? Have you tried WeatherPi_TFT under the latest Raspberry Pi OS? Do you know if libSDL is indeed deprecating / dropping support for framebuffers?
I ask since I would like to get WeatherPi_TFT working on my RPi3, as well as figure out what changes are necessary for my small project (kodi_panel) to make use of /dev/fb1.
Thanks!