Salamek / chromium-kiosk

Chromium kiosk is simple package turning your Archlinux or Debian (and alike) based PC/Raspberry into simple web kiosk using chromium.
GNU General Public License v3.0
60 stars 10 forks source link

White screen with mouse cursor and then restarts - every two seconds #51

Closed mishoboss closed 2 years ago

mishoboss commented 2 years ago

Installed it on armbian on Orange Pi 4 LTS and I get process restarts every two seconds. I see a white screen with the mouse cursor for a fraction of the second before it restarts the process.

chromium-kiosk system_info shows this:

orangepi4:~$ chromium-kiosk system_info
Can't open display 
Traceback (most recent call last):
  File "/usr/bin/chromium-kiosk", line 33, in <module>
    sys.exit(load_entry_point('chromium-kiosk==0.5.13', 'console_scripts', 'chromium-kiosk')())
  File "/usr/lib/python3/dist-packages/chromium_kiosk/__main__.py", line 5, in main
    _main()
  File "/usr/lib/python3/dist-packages/chromium_kiosk/bin/chromium_kiosk.py", line 439, in main
    getattr(command, 'chosen')()  # Execute the function specified by the user.
  File "/usr/lib/python3/dist-packages/chromium_kiosk/bin/chromium_kiosk.py", line 422, in system_info
    primary_screen = detect_primary_screen()
  File "/usr/lib/python3/dist-packages/chromium_kiosk/tools.py", line 80, in detect_primary_screen
    lines = subprocess.check_output(['xrandr', '--listactivemonitors']).splitlines()
  File "/usr/lib/python3.9/subprocess.py", line 424, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.9/subprocess.py", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['xrandr', '--listactivemonitors']' returned non-zero exit status 1.

systemctl status getty@tty1.service shows this:

● getty@tty1.service - Getty on tty1
     Loaded: loaded (/lib/systemd/system/getty@.service; enabled; vendor preset: enabled)
    Drop-In: /usr/lib/systemd/system/getty@tty1.service.d
             └─10-noclear.conf
             /etc/systemd/system/getty@tty1.service.d
             └─override.conf
     Active: active (running) since Fri 2022-05-20 23:50:42 EEST; 441ms ago
       Docs: man:agetty(8)
             man:systemd-getty-generator(8)
             http://0pointer.de/blog/projects/serial-console.html
   Main PID: 18321 (login)
      Tasks: 0 (limit: 4463)
     Memory: 764.0K
        CPU: 27ms
     CGroup: /system.slice/system-getty.slice/getty@tty1.service
             ‣ 18321 /bin/login -f

May 20 23:50:42 orangepi4 systemd[1]: Started Getty on tty1.
May 20 23:50:42 orangepi4 login[18321]: pam_unix(login:session): session opened for user chromium-kiosk(uid=998) by LOGIN(uid=0)

cat /etc/systemd/system/getty@tty1.service.d/override.conf:

[Service]
ExecStart=
ExecStart=-/usr/sbin/agetty --skip-login --nonewline --noissue --autologin chromium-kiosk --noclear %I $TERM
Salamek commented 2 years ago
subprocess.CalledProcessError: Command '['xrandr', '--listactivemonitors']' returned non-zero exit status 1.

what does xrandr --listactivemonitors when run under chromium-kiosk user?

mishoboss commented 2 years ago

@Salamek, I get this:

image
mishoboss commented 2 years ago

Hi @Salamek, please ping if you need more info. It's practically unusable now.

Salamek commented 2 years ago

@mishoboss hi sorry for the late response, i had my focus on https://github.com/Salamek/qiosk...

chromium-kiosk system_info works only when X session is running correctly, and since it looks like it crashes all the time, no X session is created so that is why there is no active display...

for some reason calling exec chromium-kiosk run --config_prod in /home/chromium-kiosk/.xinitrc crashes...

You may try to replace that line^ with exec chromium to start the x session correctly with normal chromium (we do this so we can debug why chromium-kiosk is not starting)

After that try to run chromium-kiosk run --config_prod from terminal under chromium-kiosk user... you should get crash backtrace...

d3dx9 commented 2 years ago

Hi @Salamek

I notice the same on a Raspberry Pi 4 with newest kernel. It starts, show cursor, then shortly a white page and closes as a loop.

Any idea?

Salamek commented 2 years ago

@d3dx9 hi

i was able to reproduce this issue on RPI3B+ with latest raspbian, it looks like chromium package is broken on Rpi, raspbian provides its own package named chromium-browser that works, chromium-kiosk:1.0.6 attempts to load chromium-browser first...

so do

apt update && apt upgrade && apt install chromium-browser

That should fix it on latest rasbian...

d3dx9 commented 2 years ago

Perfect, that works :) Thank you!