electron / electron

:electron: Build cross-platform desktop apps with JavaScript, HTML, and CSS
https://electronjs.org
MIT License
114.12k stars 15.38k forks source link

[Bug]: Electron is flooding kernel log when running full-screen kiosk mode #34500

Closed snblackout closed 2 years ago

snblackout commented 2 years ago

Preflight Checklist

Electron Version

19.0.0

What operating system are you using?

Other Linux

Operating System Version

Raspbian Buster (2022-01-28) Linux 5.10.63-v7l+ #1496 SMP Wed Dec 1 15:58:56 GMT 2021 armv7l GNU/Linux

What arch are you using?

Other (specify below)

Last Known Working Electron version

No response

Expected Behavior

Our use case: Digital signage application. Full-screen kiosk mode. Displaying images and playing audio and video.

I have used electron-builder to package up a DEB file (ARM) and install it on multiple Pi 4 players we have available. Our players are configured for auto-boot, auto-startup and run in kiosk mode (starts in full-screen) and runs our software locally within Electron.

Expected: tailing the /var/log/kern.log should be normal behavior, no errors.

Actual Behavior

What happens is on players, Electron is flooding the kernel log with:

Jun  9 09:28:21 COMPUTER-NAME kernel: [ 4106.498381] [drm:vc4_fkms_page_flip [vc4]] ERROR Async flips aren't allowed
Jun  9 09:28:21 COMPUTER-NAME kernel: [ 4106.513871] [drm:vc4_fkms_page_flip [vc4]] ERROR Async flips aren't allowed
Jun  9 09:28:21 COMPUTER-NAME kernel: [ 4106.563603] [drm:vc4_fkms_page_flip [vc4]] ERROR Async flips aren't allowed
Jun  9 09:28:21 COMPUTER-NAME kernel: [ 4106.588787] [drm:vc4_fkms_page_flip [vc4]] ERROR Async flips aren't allowed
Jun  9 09:28:22 COMPUTER-NAME kernel: [ 4106.666342] [drm:vc4_fkms_page_flip [vc4]] ERROR Async flips aren't allowed
Jun  9 09:28:22 COMPUTER-NAME kernel: [ 4106.676891] [drm:vc4_fkms_page_flip [vc4]] ERROR Async flips aren't allowed

This happens when the Electron app is full-screen initially. If I press F11 to exit full-screen, these messages stop. If I press F11 again to enter full-screen, the messages start again.

Testing more and tapping F11 a few times to enter full-screen and exit full-screen, the messages also stop happening in kernel log.

Testcase Gist URL

No response

Additional Information

We're running our software which is using Ionic with Angular and displaying graphics and playing audio/video files. Think of a digital signage application use case.

We have many Pi players and some are exhibiting this behavior on startup, some are not. They're all using the same software version too.

Our application starts Electron automatically. We've executed our Electron app through normal menus in Raspbian and still this happens. We did this to eliminate our thought that the way we start the app is not correctly starting up on correct DISPLAY.

I have left the application in windowed mode, non full-screen mode for a few minutes, then pressed F11 to enter full screen. At that point, these errors do not happen anymore either. Similar to entering and exiting full-screen a few times.

It seems to only happen initially when the application is started and in full-screen via kiosk mode.

I've done Google search on the error and a couple results lead to something is calling an unsupported function. But strange that is only happening in full-screen.

snblackout commented 2 years ago

An update:

If I start the Electron app in normal mode, but part of the startup, in code, toggle full-screen off/on a few times (with delayed toggles using setTimeout with 500 ms delay), this fixes the flooding of the kernel log with this error. This seems to stabilize the application and not prevent out-of-memory errors after running a while.

Next I will work on getting a repo setup with a simple application that repeats this behavior so it can be investigated by anyone.

ckerr commented 2 years ago

Hey @snblackout, thanks for reporting this.

Sounds like you're already ahead of me doing triage on this in that you're already working on a repo setup, but FWIW Electron Fiddle is a great tool for making small testcases and publishing them as gists that Electron maintainers can use.

I'm adding the blocked/need-repro label for the test case. When you've finished cooking it up, please link to it in a followup comment. Thank you!

snblackout commented 2 years ago

Hello, after some more investigation and testing, we've determined that this is most likely not an Electron or Chromium issue.

Some of our players are using Raspbian version below and are not exhibiting this error.

Linux COMPUTER 4.19.118-v7l+ #1311 SMP Mon Apr 27 14:26:42 BST 2020 armv7l GNU/Linux

We also found this bug report here

Quote from this page says:

No, it's a Xorg modesetting driver bug. gdm is just the trigger.

The newer build of Raspbian has some differences in it from older versions.

I'm not sure where to go with this issue, as Raspberry Pi foundation is on Bullseye now, which we haven't tested at all.

deermichel commented 2 years ago

Thanks for the update.