documentation icon indicating copy to clipboard operation
documentation copied to clipboard

Issues with Kiosk tutorial

Open lurch opened this issue 1 year ago • 13 comments

The power-supply section of https://www.raspberrypi.com/tutorials/how-to-use-a-raspberry-pi-in-kiosk-mode/ probably needs a bit of an update, as the "Shopping list" section says "Raspberry Pi (any model)" and "USB-C power supply unit (PSU)".

  • Models of Raspberry Pi before the Pi4 use a Micro-USB power supply
  • Pi5 is being launched with a more powerful USB-C power supply

lurch avatar Oct 16 '23 16:10 lurch

There is also a display issue being reported in #2925.

aallan avatar Oct 19 '23 07:10 aallan

Sorry for snatching this issue, @tobybroberts -- I've been doing some standardisation work on the tutorials and I've already handled this :)

nathan-contino avatar Oct 24 '23 12:10 nathan-contino

Thank you @nathan-contino - much appreciated.

tobybroberts avatar Oct 24 '23 13:10 tobybroberts

Seems to be folks still having issues with the tutorial. See #2925 for details.

aallan avatar Oct 31 '23 15:10 aallan

Regarding HDMI replug issue it seems that adding "--start-maximized" to chromium-browser parameter fixes it. Source: https://forums.raspberrypi.com/viewtopic.php?t=358317

markostamcar avatar Nov 06 '23 10:11 markostamcar

Already added the --start-maximized option to the kiosk tutorial. Is anyone aware of an option that automatically reopens crashed kiosk windows? If not, we might have to wait for Chromium to improve Bookworm support. If there's anything special happening in Bookworm besides Wayland to contribute to the frequent crashes, we might want to communicate that to the Chromium devs.

nathan-contino avatar Nov 06 '23 11:11 nathan-contino

Already added the --start-maximized option to the kiosk tutorial. Is anyone aware of an option that automatically reopens crashed kiosk windows? If not, we might have to wait for Chromium to improve Bookworm support. If there's anything special happening in Bookworm besides Wayland to contribute to the frequent crashes, we might want to communicate that to the Chromium devs.

Or away to create a watcher to restart chromium if it's not running, alternatively now firefox is bundled does this work any better?

michaelsage avatar Nov 09 '23 09:11 michaelsage

I wrote a bash script to check if chromium is still running. If it is not, the kiosk reboots. I run it under the root crontab every 15 minutes. Chromium crashes about every 3 hours and 50 minutes +/- 5 minutes on Raspberry Pi 4, 8GB, Bookworm 64 bit, Wayland:

#!/bin/bash
if [[ $(ps -afx | grep -c 'chromium-browser') -lt 2 ]]; then
        echo "$(date): Chrome Stopped. Rebooting Kiosk." >> /var/log/reboot.log
        /usr/sbin/reboot
fi

Already added the --start-maximized option to the kiosk tutorial. Is anyone aware of an option that automatically reopens crashed kiosk windows? If not, we might have to wait for Chromium to improve Bookworm support. If there's anything special happening in Bookworm besides Wayland to contribute to the frequent crashes, we might want to communicate that to the Chromium devs.

Or away to create a watcher to restart chromium if it's not running, alternatively now firefox is bundled does this work any better?

seanosteen avatar Jan 07 '24 14:01 seanosteen

Probably slightly better to use a systemd service like the one here https://raw.githubusercontent.com/arrizer/MagicMirror/487f2d1022c43ca1375ec42048f7bb0cec8db6fe/magicmirror-dashboard.service

jedahan avatar Jan 07 '24 21:01 jedahan

I've just attempted to use the kiosk tutorial, and I could not get it to work using Wayland. The issues I found were:

  • ~/.config/wayland.ini does not have a section with [autostart] and if I add it, it never gets called (using the 1 = touch /tmp/hello test method),
  • chrome won't start with --ozone-platform=wayland at all. Removing it helps.

The only way I got autostart to work was via the ~/.config/autostart/* method (as suggested here).

My env:

  • Raspberry Pi 3 Model B Plus Rev 1.3
  • Linux 6.1.0-rpi8-rpi-v8
  • Debian GNU/Linux 12 (bookworm)

dansiviter avatar Feb 13 '24 17:02 dansiviter

I don't think that used to be in the tutorial.

michaelsage avatar Feb 13 '24 18:02 michaelsage

I think the tutorial is a little confused as it mentions both https://realtime.nationalrail.co.uk/... and the two URLs it's supposed to switch between https://raspberrypi.com and https://time.is/London. I think that's because something are lifted/shifted from the train timetable tutorial. Either way I think they need reviewing in light of latest Bookworm build.

dansiviter avatar Feb 13 '24 19:02 dansiviter

Maybe it is a good idea to add to the tutorial how to hide your cursor? Because for what I can find it's a real pain in the ass with bookworm.

ivandolman avatar Feb 19 '24 16:02 ivandolman

Any updates on this?

The Pi 5 does not have autostart either?

1liminal1 avatar Feb 23 '24 07:02 1liminal1

@nathan-contino When you're back from vacation can you take a look at this and try and sort it out once and for all?

aallan avatar Feb 23 '24 09:02 aallan

Also, none of the old screen turn off methods seem to work with Wayland. Could we please get some direction on this? Its very frustrating not having a way to turn off the screen for those of us running kiosks as home calendar displays (not to mention just plane wasteful running the screen 24h per day)

Stuff like this, that was working last week for some people, is now just logging people off their Pis after the latest update.

wlr-randr --output HDMI-A-1 --off
wlr-randr --output HDMI-A-1 --on

Thanks

1liminal1 avatar Feb 26 '24 05:02 1liminal1

Probably some overlap with #3353.

aallan avatar Mar 12 '24 19:03 aallan

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar May 12 '24 02:05 github-actions[bot]

Not so fast!

nathan-contino avatar May 12 '24 12:05 nathan-contino

The kiosk tutorial states that

Kiosk mode works on all Raspberry Pi models.

This is confusing since the tutorial then relies on Wayfire which is (still) only available on Raspberry Pi 4 and newer.

To achieve this, we will edit .config/wayfire.ini. .config/wayfire.ini is a configuration file used to modify the behaviour and appearance of Wayfire, which is used to render the desktop in Raspberry Pi OS.

phieri avatar May 17 '24 23:05 phieri

Great point. However, I believe we use Wayfire to render the desktop on any Raspberry Pi running the Wayland window server. It's just that Raspberry Pi 4, 400, and 5 run Wayland by default since Raspberry Pi OS Bookworm.

I've updated the tutorial to specifically call out the Wayland dependency, and added instructions on how to switch to Wayland on an older Raspberry Pi as well. I also updated our documentation with a cmdline.txt snippet required to switch to Wayland on those earlier models.

Hopefully these changes will make the current tutorial more accessible to folks running older models of Raspberry Pi.

Closing this issue as we've tracked down the stability issues in kiosk mode to Chrome/Wayland bugs that are both out of our control and should see improvements trickling through as more and more Linux users switch to Wayland.

I'll create a separate issue to document cursor hiding and screen turn off methods in Wayland when running Kiosk mode. Since we want the tutorials to remain short and sweet and general-purpose, I'll add that content to the documentation on Kiosk mode, which needs updating anyway.

Thanks all for the information here, everyone.

nathan-contino avatar May 18 '24 12:05 nathan-contino

Does this work for DietPi?

I7T5 avatar Jun 08 '24 04:06 I7T5

Does this work for DietPi?

All of our documentation and tutorials are written for Raspberry Pi OS (with a few exceptions ). So if it happens to also work with third-party OSes (that are also based on Debian) then great, but if our instructions don't work on your favourite OS, then you'll have to ask on the forums of that OS for additional help.

lurch avatar Jun 10 '24 09:06 lurch