Open LuxStatera opened 3 years ago
I'm exactly the same, I can't find a solution. Any ideas? File "WeatherPiTFT.py", line 118, in pygame.display.init() pygame.error: fbcon not available
Could you both be a little specific on your issues? From my perspective I could only guess.
So please provide:
With the given information I would assume you are using a HDMI connection?
Or you are using pygame <= 2.0.0 which is not supported I guess since I didn't updated the dashboard for 2.0.0 and above due to issues if found.
I'm running my dashboard since my last commit on this project with a Hyperpixel Display and the very last Raspbian Version before the official Raspbian OS was announced (think it was last year). Raspbian OS comes default with pygame 2.0.8 if I rember correct (don't quote me on that)... which again... Is not supported.
Long story short, please give more details so I can make a fix or help you to find the right config.
Cheers and kind regards from Berlin Stephan
Raspberry Pi 4 latest Raspberry OS TFT 3.5 in screen pygame version 2.0.1
when i run the command "sudo service WeatherPiTFT start" and "sudo service WeatherPiTFT status" it shows that it is working. nothing happens so i assume i then need to run the command "python3 WeatherPiTFT.py" to get it started. thats when i get the error i described above
hi guys… this is simple…
as mentioned in https://github.com/LoveBootCaptain/WeatherPi_TFT/issues/41 RaspbianOS has issues and is currently not supported. the reason is not the OS itself, it is the newest version of pygame >= 2.0.0 which uses SDL2 under the hood… and it turns out, that SDL2 changed or broke framebuffer support.
there are two options here…
and some thoughts and thinkings of the last days:
If you are able to downgrade RaspbianOS to SDL1 and pygame <=1.9.x this would work as well, i assume. But i dont know if it is possible to remove the new dependencies and only use the old ones… a lot of work for people who are not very familiar with linux bare metal stuff. I will figure something out. there are so many other linux distributions which will work as well as long as you are an older version of pygame and SDL.
@LuxStatera you ran into a second issue. when you start the service and status
reports its running. than it is running. when you than start the app again by hand
it can‘t open it, cause the output is already been used by the other running app started by the service. if you want to try that out, please disable the service so that it not starts at boot. reboot the pi and than try to start it via cmd-line… but it will run into other errors, if you use a framebuffer-powered display. but it would be a good start to test if it would work with HDMI out. change your config for that output.
since the problem still exists and SDL2 is the problem, i dont know if it makes sense to update this program. i missed a propper information in the Wiki, but i will add one. please have a look in the other issues. you are not the only one right now.
I‘m currently thinking about changing something. maybe pygame is not the right tool, maybe the times of framebuffers are over… last option is to remove all custom build parts and only support HDMI out in the future. the easiest way is that i will use another linux image where you where able to install the needed versions for pygame and SDL. Have to test this a little and I will update all guides accordingly.
until than stay safe and thanks again for contributing feedback :)
Hi, I'm having the same issue, but I'm using Kali Linux -- I wanted to test this out on my kali virtual machine before I put it on my Raspberry Pi -- My raspberry pi also has Kali installed currently, with a TFT screen, as I made a portable Kali with a 3.2" TFT. I am hoping to replace the portable Kali raspberry pi with a weather station instead. I basically wanted to see if the tutorial described on github would work on Kali first by testing it out on a VM. (Am I going about this the wrong way completely? ) Well, the setup went well fairly smoothly, however when I test the services (service WeatherPiTFT status) I get "Active: active (exited)".
I also get fbcon not available when attempting to run "Python3 WeatherPiTFT.py". This i'm guessing is because i'm not using a TFT screen on the VM?
I'm running PyGame 2.1.2 and Python 3.9.9. I was really hoping to cut out he distro installation part out as I already have the TFT running with Kali just fine. Any recommendations? -- at this point i'm ready to start from scratch and install the recommended OS...
Thanks
you can still use this weather display with current Raspberry Pi OS. Just use it over X11.
(works for me with fresh rasperry Pi OS lite + xorg with xserver-xorg-video-fbturbo + xserver-xorg-input-evdev on pi zero + az-touch)
hi guys… this is simple…
as mentioned in #41 RaspbianOS has issues and is currently not supported. the reason is not the OS itself, it is the newest version of pygame >= 2.0.0 which uses SDL2 under the hood… and it turns out, that SDL2 changed or broke framebuffer support.
there are two options here…
- Use a non-buster debian build (or a version of raspbian before it moved to RaspbianOS) with pygame <= 1.9.x
- Try to run it with an HDMI Display and try if this works for you, if you need to use RespbianOS
and some thoughts and thinkings of the last days:
If you are able to downgrade RaspbianOS to SDL1 and pygame <=1.9.x this would work as well, i assume. But i dont know if it is possible to remove the new dependencies and only use the old ones… a lot of work for people who are not very familiar with linux bare metal stuff. I will figure something out. there are so many other linux distributions which will work as well as long as you are an older version of pygame and SDL.
@LuxStatera you ran into a second issue. when you start the service and
status
reports its running. than it is running. when you than start the app againby hand
it can‘t open it, cause the output is already been used by the other running app started by the service. if you want to try that out, please disable the service so that it not starts at boot. reboot the pi and than try to start it via cmd-line… but it will run into other errors, if you use a framebuffer-powered display. but it would be a good start to test if it would work with HDMI out. change your config for that output.since the problem still exists and SDL2 is the problem, i dont know if it makes sense to update this program. i missed a propper information in the Wiki, but i will add one. please have a look in the other issues. you are not the only one right now.
I‘m currently thinking about changing something. maybe pygame is not the right tool, maybe the times of framebuffers are over… last option is to remove all custom build parts and only support HDMI out in the future. the easiest way is that i will use another linux image where you where able to install the needed versions for pygame and SDL. Have to test this a little and I will update all guides accordingly.
until than stay safe and thanks again for contributing feedback :)
Here is what has worked for me based on the advice given above
And some more background information. The above given Raspbian will install pygame 2.x.x per default but one can replace this version 1.9.6 which works. Things to note: that pygame version does work only with python 3.4, 3.5 and 3.7 (See the cpXX in the filename for pygame). Hence, avoid any upgrade to Python 3.8 and newer.
I have tried a few older versions of Raspbian but got problems with the installation of the PiTFT 2.8r (using these instructions ). The versions listed above worked as expected.
tried to run WeatherPiTFT but i get the output:
File "WeatherPiTFT.py", line 118, in
pygame.display.init()
pygame.error: fbcon not available