lovelace-mushroom icon indicating copy to clipboard operation
lovelace-mushroom copied to clipboard

[Bug]: Wallpanel

Open w1tw0lf opened this issue 1 year ago • 15 comments

Requirements

  • [X] I checked the troubleshooting section in the README to verify that I have the latest Mushroom version.
  • [X] I did a search to see if there is a similar issue or if a pull request is open.
  • [X] I have read the state of card mod support (in pin issues) and understand card mod support is not provided in this repository.

Current Behavior

Using wallpanel(https://github.com/j-a-n/lovelace-wallpanel) to display info on a static sceen. When adding any type of mushroom card, the memory usage slowly increases and browser eventialy crashes, with a "aww snap" error.

Expected Behavior

Used to work perfectly for the past year.

Steps To Reproduce

RPi 4 loads chrome and displays a dashboard dedicated to wallpanel setup.

Context

YAML state


Environment

- Browser: chrome
- HA Version: 2024.2.1
- Mushroom: 3.4.2

Anything else?

more info here as well: https://github.com/j-a-n/lovelace-wallpanel/issues/205 Setting up the same layout as on the wallpanel on normal dashboard, works perfectly.

w1tw0lf avatar Feb 14 '24 07:02 w1tw0lf

Similar with me. I use Wallpanel with Mushroom Cards on an LG TV. After about 90 minutes, the browser crashes with the message 'Out of memory.' This wasn't a problem with the old version.

Pscharumbel avatar Feb 14 '24 08:02 Pscharumbel

Just to add, if I configure it without any mushroom cards, it works perfectly.

w1tw0lf avatar Feb 14 '24 09:02 w1tw0lf

I have this too - latest Mushroom with latest HA and latest Wallpanel - refreshes are really slow, card updates significantly delayed and it seems directly related to Mushroom cards use.

swampylee avatar Feb 14 '24 10:02 swampylee

Can you share your dashboard configuration with Mushroom cards?

piitaya avatar Feb 14 '24 16:02 piitaya

I did this as a test, to see

wallpanel:
  enabled: true
  hide_toolbar: true
  hide_sidebar: true
  fullscreen: true
  keep_screen_on_time: 0
  black_screen_after_time: 0
  image_url: media-entity://camera.google_photos_photo_frame_media
  show_image_info: false
  style:
    wallpanel-screensaver-info-box:
      '--wp-card-width': 457px
    wallpanel-screensaver-info-box-content:
      '--ha-card-background': none
      '--ha-card-box-shadow': none
      '--ha-card-border-width': 0px
      '--primary-text-color': '#e1e1e1'
      '--secondary-text-color': '#9b9b9b'
  cards:
    - entity: light.main_bedroom_lamp_left
      type: custom:mushroom-light-card
      layout: vertical
      name: Bedlamp Left    
      wp_style:
        grid-column: 1 / 1
        grid-row: 1 / 1
        background-color: '#00000099'
    - type: custom:button-card
      color_type: blank-card
      wp_style:
        grid-column: 2 / 2
        grid-row: 1 / 1
    - type: custom:button-card
      color_type: blank-card
      wp_style:
        grid-column: 3 / 3
        grid-row: 1 / 1
    - entity: light.main_bedroom_lamp_right
      type: custom:mushroom-light-card
      layout: vertical
      name: Bedlamp Left       
      wp_style:
        grid-column: 4 / 4
        grid-row: 1 / 1
        background-color: '#00000099'
views:
  - title: Home
    type: custom:grid-layout
    layout:
      gridrows: auto
      grid-template-columns: 25% 25% 25% 25%
      grid-template-areas: |
        "c1 c2 c3 c4"
    badges: []
    cards: []

If you keep an eye on either task manager in chrome or native you will see the memory slowly increase and the crashes chrome.

w1tw0lf avatar Feb 14 '24 17:02 w1tw0lf

I have this too - latest Mushroom with latest HA and latest Wallpanel - refreshes are really slow, card updates significantly delayed and it seems directly related to Mushroom cards use.

I've been monitoring this today and while I do have a massive dashboard with many many mushroom cards I do see the RAM usage monitored through Task Manager just keep going up and up. It's not uncommon for me to see > 6GB allocated to that dashboard tab in Chrome. As such, the page becomes unresponsive after a while. I also tested in Edge and see the same behaviour. I'm not convinced it's Wallpanel that's the problem as I've been using that for multiple dashboards for a long time, I think it might be related to the changes made to Mushroom. I did notice that if I go back to Mushroom 3.3.0 the problem seems to disappear.

swampylee avatar Feb 16 '24 20:02 swampylee

Yes it's true. I have this problem on Wallpanel in any browsers. Maybe I can install old ver cards?

This is memory usage my mini PC station with TV panel in my room:

image

When my browser crashed to error "out of memory" - memory usage is good 😊

diemon24 avatar Feb 21 '24 21:02 diemon24

I download 3.4.0 ver. Testing for 8-10 hours ...

diemon24 avatar Feb 21 '24 22:02 diemon24

No, this is not a solution to the error. The old version behaves the same way - the browser gives an out of memory error.

diemon24 avatar Feb 23 '24 09:02 diemon24

I've been monitoring this today and while I do have a massive dashboard with many many mushroom cards I do see the RAM usage monitored through Task Manager just keep going up and up. It's not uncommon for me to see > 6GB allocated to that dashboard tab in Chrome. As such, the page becomes unresponsive after a while. I also tested in Edge and see the same behaviour. I'm not convinced it's Wallpanel that's the problem as I've been using that for multiple dashboards for a long time, I think it might be related to the changes made to Mushroom. I did notice that if I go back to Mushroom 3.3.0 the problem seems to disappear.

I tested 3.3.0, but problem remains... I don't know what's happened...

I used wallpanel with mushroom cards for a long time and it worked. But now I'm installing old versions of cards in hucs (without uninstalling) and it doesn't work correctly.

maybe it has something to do with styles? Could you try removing styles from the mushroom cards?

diemon24 avatar Feb 26 '24 22:02 diemon24

Maybe HA 2024.2 is the cause with the new Python version?

Pscharumbel avatar Feb 27 '24 07:02 Pscharumbel

Maybe HA 2024.2 is the cause with the new Python version?

Maybe. What's your version HA: HAOS or docker container? I use HA in docker container in Synology 7.1.1.

diemon24 avatar Feb 27 '24 08:02 diemon24

HAOS

Pscharumbel avatar Feb 27 '24 08:02 Pscharumbel

HAOS

I updated python ver in Synology OS to 3.11. Testing. But I think, docker container have last python ver

diemon24 avatar Feb 27 '24 09:02 diemon24

I already removed Wallpanel but still have the same behaviour. Started with 2024.2

SmartHomeFanatic avatar Feb 28 '24 12:02 SmartHomeFanatic

I've reverted back to card-mod 3.4.0. Everything is running smoothly again.

Pscharumbel avatar Mar 05 '24 10:03 Pscharumbel

So card mod was the issue? I can not reproduce the bug you mentioned with Mushroom cards only. Does someone have the issue without card mod installed?

piitaya avatar Mar 05 '24 10:03 piitaya

So card mod was the issue? I can not reproduce the bug you mentioned with Mushroom cards only. Does someone have the issue without card mod installed?

Yes, I using card mod. You think this is problem?

diemon24 avatar Mar 05 '24 15:03 diemon24

Thanks so much. I was searching for the issue for weeks now. My whole frontend was unacceptable slow. It was driving me mad. I already removed lots of stuff and moved all tabs of my dashboard into a new one for testing etc.

Firefox tabs crashed when having them open for a longer time. It really was freaking me out.

Today I removed card-mod and everything is fast again.... thank you so much for bringing my attention to that. Really wonder how this could influence the performance of the whole system that much.

SmartHomeFanatic avatar Mar 05 '24 15:03 SmartHomeFanatic

@diemon24 Could be... there was no big changes in Mushroom with the latest updates and I can not reproduce the issue with Mushroom card only. Try uninstalling card mod and see what happens, or at least, try to rollback to a previous card mod version (3.4.0).

I close the issue as the problem seems to be related to card mod.

It seems to be related to these issues :

  • https://github.com/thomasloven/lovelace-card-mod/issues/359
  • https://github.com/thomasloven/lovelace-card-mod/issues/360
  • https://github.com/thomasloven/lovelace-card-mod/issues/346

Feel free to reopen the issue if you are able to reproduce it without card mod installed.

piitaya avatar Mar 05 '24 16:03 piitaya

I see the opposite... have wallpanel running without mushroom cards and card mods, it has been stable without any issues.

Running wallpanel with mushroom cards, causes the browser to crash. I have tried it with just 1 or 2 basic mushroom light cards and crashes.

w1tw0lf avatar Mar 05 '24 16:03 w1tw0lf

@w1tw0lf Without card mod installed?

piitaya avatar Mar 05 '24 16:03 piitaya

@piitaya with card mod install.

w1tw0lf avatar Mar 05 '24 16:03 w1tw0lf

Try uninstalling card mod and see what happens, or at least, try to rollback to a previous card mod version (3.4.0).

piitaya avatar Mar 05 '24 16:03 piitaya

Sorry... it works perfectly with card mod.

When I add mushroom cards it causes the browser to crash.

w1tw0lf avatar Mar 05 '24 16:03 w1tw0lf

And does it works with mushroom card without card mod? Maybe there is an incompatibility between those two.

piitaya avatar Mar 05 '24 16:03 piitaya

I've reverted back to card-mod 3.4.0. Everything is running smoothly again.

I returned old version card mod 3.4.0. I need time for test this

diemon24 avatar Mar 05 '24 17:03 diemon24

@piitaya not just wallpanel, think it is not related.

I have use mostly mushroom cards. Noticed that browser will crashes when the page open for a long time on a normal tab. Tested mushroom cards with card mod and without...

w1tw0lf avatar Mar 05 '24 17:03 w1tw0lf

I've reverted back to card-mod 3.4.0. Everything is running smoothly again.

I returned old version card mod 3.4.0. I need time for test this

I set up automation in XA to reload the browser when it reaches 55% memory. At 20:05 today I installed the old version of card mod and manually restarted the browser. Now I see that there are some minor changes in the memory consumption graph. but this is not the final test

image

diemon24 avatar Mar 05 '24 17:03 diemon24

It's definitely the card mod 3.4.2 fault. I think we need to get an Issue for him...

diemon24 avatar Mar 05 '24 17:03 diemon24