darickc / MMM-BackgroundSlideshow

MIT License
135 stars 78 forks source link

Looking for help / direction - Freezing Right Away #145

Open jgarcia750 opened 6 months ago

jgarcia750 commented 6 months ago

New installation on a pi 3a+ Running by itself, no other modules running I'm using exampleImages I'm using simplest config

It's locking up my pi basically right away. I can run all the default modules just fine, but whenever I activate this module it locks the pi almost immediately. Sometimes it'll load the first image, maybe jump to the second, but then it'll just freeze. I can't even open the console to see whats happening.

KristjanESPERANTO commented 6 months ago

Please show your config. Is there any error message in the terminal or in the console when you run npm run start:dev?

jgarcia750 commented 6 months ago

IMG_9163

So I ran it with npm start dev and it seems to cycle through images, the first 30 - 40 seconds it flipped through 3 - 4 images, with display of the images getting progressively slower until it stopped switching images on screen, but I could still see BACKGROUNDSLIDESHOW_NEXT_IMAGE being triggered in terminal, then the MM screen went white and terminal stopped doing anything.

KristjanESPERANTO commented 6 months ago

Which node version are you using? Run node -v. Minimum version is 18.

KristjanESPERANTO commented 6 months ago

Today there was an update of MagicMirror and this module. I recommend to update both :slightly_smiling_face:

jgarcia750 commented 6 months ago

Which node version are you using? Run node -v. Minimum version is 18.

node v 20.5.1

Just did a git pull && npm install-mm on Magic Mirror and git pull on this module

Now it seems to start without errors, but is still lagging like CRAZY. It displayed the first example image and has been stuck on it ever since. It said NEXT IMAGE 2 more times and terminal finally just sits without doing anything / mouse frozen.

IMG_9170

KristjanESPERANTO commented 6 months ago

That is strange. On a pi 3a+ it should work fine. Unfortunately, I don't have one to test at the moment.

Let me check your config.js. And can you take a picture of the browser console after you have executed npm run start:dev?

KristjanESPERANTO commented 6 months ago

New installation on a pi 3a+

Do you also mean that you have a current Raspian OS version? Please run cat /etc/os-release in the terminal to check this.

jgarcia750 commented 6 months ago

Was running latest update bullseye. I am imaging a new SD card with bookworm right now and will do a clean install of MM with this module, re-test and report back.

KristjanESPERANTO commented 6 months ago

Very good. I'm looking forward to the result. I'll keep my fingers crossed for you! :smiley:

jgarcia750 commented 6 months ago

Okay, so here's where I'm at. I used the official Raspberry Imager to install an image of 32 bit Bookworm onto an SD card. Booted Pi Opened Terminal git n-install for nodejs & npm git MagicMirror then npm install cp config.js.sample config.js git BackgroundSlideshow then npm install added Background Slideshow module to config.js run config:check npm run start dev

There's an error in terminal, it pulled up the first example image and hung there, terminal said it was running the next couple images but the actual picture never changed. I could not get the dev window open to see the console. System was barely functioning at turtle pace, I was able to ctrl C out of it this time thought without having to hard reset.

IMG_9178

Thoughts?

KristjanESPERANTO commented 6 months ago

Okay, I see two options:

  1. I'm not sure if that will work, but it's worth a try. Instead of npm run start execute the following command: ELECTRON_ENABLE_GPU=1 && npm run start.
  2. If the first option doesn't work, install the vulkan drivers. This seems to be a good manual for this: https://qengineering.eu/install-vulkan-on-raspberry-pi.html
jgarcia750 commented 6 months ago

Unfortunately it looks like disable GPU doesn't help and vulkan drivers only work on Pi4 and above.

I found a possible workaround with rpi-vk-driver, however, bookworm doesn't run Python 2, so I can't install it properly. I think I may just give up on Pi3 at this point and try out Pi4 some time in the future.

KristjanESPERANTO commented 6 months ago

That is a pity. I ran a Pi 3 for a long time without such problems. Strange that there are now problems with the Vulkan drivers...

@sdetweil Do you have an idea?

KristjanESPERANTO commented 5 months ago

I just saw that I missed export. Please try export ELECTRON_ENABLE_GPU=1 && npm run start.

Edit: Fixed variable.

jgarcia750 commented 5 months ago

I have some other projects going on right this moment. I will be able to try this likely Monday or Tuesday next week. I will give it a shot and report back.

sdetweil commented 5 months ago

in 2.26 we changed to state to disabled by default

export ELECTRON_ENABLE_GPU=1 to turn you use back on