-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem after power cut #66
Comments
Hi, it does sound odd. Powering off without a proper system shutdown is supposed to potentially cause some kind of damage in the file system (or something OS related) but I've not experienced it. Occasional blank pictures was one symptom of pictures being too large so maybe there's been a corruption of something keeping track of memory capacity???I will have a Google later but the only thing I would suggest trying is to make a new SD card with a fresh OS and copy the app and images onto that and see if the problem persists.PaddyOn 26 Nov 2022 00:52, Duzeper ***@***.***> wrote:
I have had PictureFrame2020 running successfully and, pretty much non-stop, for nearly 2 years now (my word, doesn't time fly), but a problem has developed after a power cut.
I have rebooted the Pi and restarted PictureFrame 2020 and its start/stop timers and everything is working fine except that, at seemingly random times (I have not discerned any pattern to the occurrences) the next slide will not display - the display goes to a blank screen. Then, once again apparently randomly, slides will display normally.
This is clearly a display issue as if, using MQTT, I select 'Next Slide' or 'Previous Slide', then it will display normally. Also 'Text Refresh' will display the slide properly. In addition, text (Filename, Date etc) displays normally, and correctly, even when the slide does not. Clearly, therefore, PictureFrame2020 thinks it is displaying the slide correctly.
As I said, up until the power cut which, by the way, occurred during the night when PictureFrame2020 was not running, it was working perfectly.
Any ideas?
Martin Dashper
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Thanks Paddy. I was not sure if this thread was still being monitored. sudo apt update Is that correct and would that throw up any other issues? PS |
A quick update. This morning the text display is not working properly. The grey text bar appears but the date or filename shows a black bar with no text. |
On the RPi there has been a bit of a divergence with the move to bullseye and the use of the old (bcm) graphics drivers. i.e. the newer OS doesn't support them. The replacements are better in some respects but sometimes slower. If you look at the discussions here and here you will see various ideas about how to make bullseye work better. It depends very much on the power of the RPi you are using. I would be interested to hear how you get on with pi3d in a virtual machine on windows. That's on my list of things to check now that, as I understand it, WSL has graphics capabilities. |
I cannot find the original detailed instructions for installing Pi3D and PictureFrame2020. Can you remind me where to find them Martin |
A quick update. I have replaced the image files on the Pi with the originals and that, so far, seems to have fixed the issue. I would still like to download the PictureFrame2020 instructions again but the link I have now points to PicFrame instructions. Martin |
Martin, Yes Wolfgang migrated to picframe as we had tweaked the code so much with various enhancements! I will set up a new SD for one of my RPis here and check what needs to be done. But essentially I think:
As I say, I haven't done this for a while so there might be errors and omissions - I will check back later! Paddy |
Wow! Did you keep the original files? It would be fascinating to take a
look at them, perhaps.
…On Sat, Nov 26, 2022 at 5:07 PM Duzeper ***@***.***> wrote:
A quick update. I have replaced the image files on the Pi with the
originals and that, so far, seems to have fixed the issue.
Clearly, a long term test is required, but so far, so good.
I would still like to download the PictureFrame2020 instructions again but
the link I have now points to PicFrame instructions.
Martin
—
Reply to this email directly, view it on GitHub
<#66 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAB53MTAO5ZOP3ZGM5NHXPLWKIYVTANCNFSM6AAAAAASLWZFFE>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
--
/t
PGP Key: ***@***.***
*https://tom.ritchford.com <https://tom.ritchford.com>*
*https://tom.swirly.com <https://tom.swirly.com>*
|
I'm afraid not. I just overwrote the files on the Pi. I am using a frameOn.service, frameOn.timer and a frameOff.service, frameOff.timer, all of which ahd been working continuously for the last 2 years. It would seem that the powercut has caused an issue with one or more of these or, I suspect more likely, the system behind these processes (forgive my clunky terminology which will confirm that I am not a Linux person, so pretty much everything I learned 2 years ago I am having to relearn) I believe it is possible to do an OS update in situ, but, assuming there is a 'system' problem, is there also a 'repair' option? Martin PS. I have successfully installed 32bit & 64bit Buster in VirtualBox on my PC, but I would like to try and get PictureFrame2020 working again before I have a go at a virtual picFrame. |
Martin, I have just now followed @tomasedoff instructions https://gist.github.com/thomasedoff/3973846101da1e7496524be075f1c02f pretty much exactly but instead of pip installing picframe, just installed pi3d and git cloned pi3d_demos. Transitions ran very slowly but after going into raspi-config and switching on advanced options -> glamor it seemed fine. Ctrl-C didn't stop it (I was running it with keyboard and mouse) so you need to be able to SSH in and kill the process while you test it. I will try putting the SD card into an old RPi and see what it looks like. I'm not sure what caused your bug but it might be something corrupted on the SD card so it would make sense to try another. |
Paddy Martin |
Paddy 'sudo pip3 install pi3d --upgrade' Is this what I am looking for to update TextBlock.py? Since I do not know what that file does, I am not sure if is causing an issue that I haven't yet spotted. Otherwise it all now seems to be working OK Martin |
Martin, sorry to not reply before, I'm away from home and can't check stuff so easily. The TextBlock.py file is part of the 'standard' pi3d so that would normally live in wherever pi3d is installed, inside the pi3d/util directory. So updating pi3d to the latest using pip upgrade should fix that in theory. There were some fixes 18 months ago so maybe you had a version in your PictureFrame2020.py folder to 'trick' the module loading!! For picframe we moved from the TextBlock system using OpenGL point rendering because a) the fast text changing ability wasn't needed b) it was useful to be able to draw any character in the available font (i.e. thousands of unicode characters used in place names of the geopy system). Keep an eye on your system and shout out if you have any other problems. Paddy |
Thanks Paddy. I just wanted to check before I update and create a new updated clone. Fortunately the previous clone was not way out of date and everything seems to be back to normal. Thanks for your help. |
Sorry, one more, general, question. sudo apt update & sudo apt upgrade In other words, does upgrade just upgrade my current OS (buster) or will it upgrade to the next version (bullseye), which I do not want to do? Martin |
I'm pretty sure it will stay with buster. I think there is a way to move on to the next version but the standard |
Many thanks. |
Just a quick note about running a virtual RPi.
However as virtual machine - Not Needed
No errors
Again, not needed for virtual machine
OK except
No errors
Clearly, at this point I cannot go any further. Is it possible to rectify these issues, given that the virtual machine is actually a Debian installation, or am I fighting a losing battle? All that aside, I can confirm that I now have PictureFrame2020 back working properly (and an up to date OS clone!) Martin |
Man, sorry this has been so painful for you.
That last error is wack. How can you have a python3 and no pip module?
It sounds like something is badly wrong: I dunno if this will help but try
these to at least get a hint of the issue.
python3 --version
which python3
which pip3
…On Wed, Dec 7, 2022 at 1:23 AM Duzeper ***@***.***> wrote:
Just a quick note about running a virtual RPi.
I'm not sure it will work. Since the x86 architecture cannot run Raspbian,
the only Raspberry Pi OS Desktop ISO files are actually Debian,
incorporating the RPi desktop.
I have a working virtual machine, however, when I try to install picframe,
following @tomasedoff instructions, there are various problems:
1. Connect to Wi-Fi network
sudo raspi-config nonint do_wifi_country SE # Set the country code
sudo raspi-config nonint do_wifi_ssid_passphrase SSID PSK # Set ssid and passphrase
sudo: raspi-config: command not found
However as virtual machine - Not Needed
1. Update Raspberry Pi OS
sudo apt-get update
sudo apt-get upgrade
No errors
1. Enable remote administration
sudo systemctl start ssh
sudo systemctl enable ssh
Failed to start ssh.service: Unit ssh.service not found
Again, not needed for virtual machine
1. Configure Raspberry Pi OS
sudo raspi-config nonint do_boot_behaviour B2 # Enable automatic login
sudo raspi-config nonint do_blanking 1 # Disable Xorg screen blanking
sudo raspi-config nonint do_change_timezone "Europe/Stockholm" # Set time zone
sudo raspi-config nonint do_hostname picframe # Set hostname
sudo: raspi-config: command not found
1. Install necessary software and dependencies
sudo apt-get install --no-install-recommends \
xserver-xorg \
xserver-xorg-legacy \
xinit \
python3-pip \
libopenjp2-7 \
libgles-dev \
libatlas3-base \
libxrender-dev
OK except
E: Unable to locate package libgles-dev
1. Configure Xorg
sudo sed -i 's/\(^allowed_users=\).*/\1anybody/' /etc/X11/Xwrapper.config
sudo bash -c 'echo "needs_root_rights=yes" >> /etc/X11/Xwrapper.config'
No errors
1. Install and initialize PictureFrame
python3 -m pip install picframe
/usr/bin/python3: No module named pip
Clearly, at this point I cannot go any further.
Is it possible to rectify these issues, given that the virtual machine is
actually a Debian installation, or am I fighting a losing battle?
Given that there seems to be no likelihood of being able to buy another
RPi any time soon, is it possible to install both picframe and
pictureframe2020 on the same machine (obviously not running them both) or
will (as I suspect) the one interfere with the other?
All that aside, I can confirm that I now have PictureFrame2020 back
working properly (and an up to date OS clone!)
Martin
—
Reply to this email directly, view it on GitHub
<#66 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAB53MUWA5CCUOXMEJXEPLLWL7KG5ANCNFSM6AAAAAASLWZFFE>
.
You are receiving this because you commented.Message ID:
***@***.***>
--
/t
PGP Key: ***@***.***
*https://tom.ritchford.com <https://tom.ritchford.com>*
*https://tom.swirly.com <https://tom.swirly.com>*
|
Hi @Duzeper I would say it depends, on what you are targeting. As far as I know there is is only one hardware emulation of the raspberry pi available. It's QEMU. But it doesn't support graphic rendering well. But good news is, that picframe runs on linux if OpenGL and an X server is available. So I tested it on ubuntu, debian and actual developing picframe on MacOs. But you can't use raspi config tools, and sometimes some pathes to files are little different. A good starting point is to install an actual debian linux with an X environment. Ensure that python and pip is installed. Install picframe |
Hi Tom
Martin |
Hi @helgeerbe Martin |
Martin, sorry not to get back earlier. I'm out and about at the moment but will reply more comprehensively later this afternoon.I haven't run PictureFrame in windows Linux but I have set it up recently in normal Ubuntu so I will let you know what I did for that. Much simpler than setup on RPi but with some deficiencies.PaddyOn 7 Dec 2022 14:49, Duzeper ***@***.***> wrote:
|
Martin, I'm back now. For running pi3d on a laptop you need to have something to emulate the OpenGLES GPU, and on linux that can be done with the mesa utilities $ sudo apt install mesa-utils-extra If you are going to use python at all it's pretty essential to have pip (I agree, I can't see why it's not just a default, but anyway). $ sudo apt install python3-pip If you're going to run PictureFrame2020 you don't need to pip install picframe, but you will need pi3d and pi3d_demos. I installed everything into a directory of my home directory called python i.e. $ cd ~
$ mkdir python
$ cd python
$ git clone https://github.com/pi3d/pi3d_demos.git
$ cd pi3d_demos
$ python3 -m pip install pi3d Now just try one of the demos $ python3 Minimal.py etc and make sure everything works ok. As I say, I've not tried windows subsystem for linux (is that what you're using?) but I think there may be a couple of tweaks you need to do, such as enabling hardware graphics acceleration, and maybe others. You will need to edit the PictureFrame2020config.py file and change all the file paths from $ python3 -m pip install geopy Let me know how you get on |
OK, I have installed 'mesa-utils-extra' and 'python3-pip' with no errors.
Then:
Martin |
I'm thinking now that I might give up on the Debian/RPi virtual machine and try @helgeerbe's suggestion of installing a straight Debian linux. Martin Martin |
OK, just installed Debian10 and gone through the picframe instructions again and got all the same errors as before. Clearly there is an issue with Debian. Martin |
Martin, better hold on a while. There looks to be a problem with the heif dependency helgeerbe/picframe#297 I did try pi3d in various flavours of Linux in a VM several years ago, Ubuntu and lubuntu we're fine but I did have problems with vanilla Debian. Of course I can't remember the details! I will also try installing picframe on my laptop. I had it there previously but I've wiped and reinstalled the OS since. Paddy |
Martin, not tried picframe on this laptop yet but there does seem to be an odd issue installing the heif module caused by an older version of pip (maybe this kind of thing is why it's not part of python?). People seem to have fixed it by upgrading pip $ python3 -m pip install --upgrade pip You could try that and see if it fixes the errors... Paddy PS you can check the version of pip with $ pip -V |
Thanks, That all appeared to work:
Then I tried to install picframe
Then after successfully completing Section 8, I move on to Section9. Test PictureFrame
So, progress at least, but not quite there. Martin |
It seems that you start picframe in a graphical environment? Then you have to skip the xinit part (which is the launcher for the graphical environment). Simply try |
OK, not sure whether to execute those in a single command or seperately, so tried both:
Then:
|
This looks good. I ment to run it as separate commands. Have a look https://github.com/helgeerbe/picframe/wiki/Command%20Line and https://github.com/helgeerbe/picframe/wiki/Configuration |
OK, I have, for the time being, put the virtual installation on hold since I have actually managed to obtain another RPi3B+, so I have started to install picframe onto this following Wolfgang's: I have got as far as testing the installation:
Which results in:
which needs a “CTRL+C” to exit |
Martin, that looks like an error related to the OpenGL driver (libEGL). Have a look at the settings in |
All done as per RPi3. No errors but did get a warning:
Same warning after:
Still get: |
I think that warning isn't what's causing your error (pip does say that it's already installed, and if it wasn't the rest wouldn't work). Are you logged in via ssh with no desktop running? What happens if you open a python3 terminal then >>> import pi3d
>>> pi3d.PLATFORM
>>> d = pi3d.Display.create(w=100, h=100) The old broadcom driver is >>> while d.loop_running():
... pass
... and see if it's arising later. If you do You could also try running the |
PS you could also check the driver being used with >>> import pi3d
>>> pi3d.openegl which should give a DLL object from |
OK, logged in via ssh but desktop running:
I now have a recollection that Wolfgang (I think) had suggested that there may be graphics issues with 'Bullseye'. Is that the problem? |
I run it on bulleseye myself. But perfomace on buster is actually better. On bulleseye the maintainer try to get rid of special rasbian code. But bulleseye is fine for me on a 3B+ with a resolution of 1920x1200. Bulleseye need other settings: helgeerbe/picframe#257 (comment) |
Thanks. I may go with buster, if only because all of my limited experience is with that version. It may have to wait til after Christmas now. |
I have had PictureFrame2020 running successfully and, pretty much non-stop, for nearly 2 years now (my word, doesn't time fly), but a problem has developed after a power cut.
I have rebooted the Pi and restarted PictureFrame 2020 and its start/stop timers and everything is working fine except that, at seemingly random times (I have not discerned any pattern to the occurrences) the next slide will not display - the display goes to a blank screen. Then, once again apparently randomly, slides will display normally.
This is clearly a display issue as if, using MQTT, I select 'Next Slide' or 'Previous Slide', then it will display normally. Also 'Text Refresh' will display the slide properly. In addition, text (Filename, Date etc) displays normally, and correctly, even when the slide does not. Clearly, therefore, PictureFrame2020 thinks it is displaying the slide correctly.
As I said, up until the power cut which, by the way, occurred during the night when PictureFrame2020 was not running, it was working perfectly.
Any ideas?
Martin Dashper
The text was updated successfully, but these errors were encountered: