mjdumelow
Posts: 2
Joined: Sat Mar 30, 2019 4:41 pm

Chromium kiosk mode slow to start without keyboard connected

Sat Mar 30, 2019 4:49 pm

Hi,

I have out together an image that I am using across seven PI zeros. The role of each is pretty straightforward in that it boots directly into chromium and displays a simple webpage for use in a school. However I have come across an odd issue and havent had much luck in finding any similar problems detailed elsewhere.

I built the basic image with a USB keyboard attached to the PI, With the keyboard connected the whole process works perfectly.
However, if I boot without a keyboard connected there is a significant delay before chromium starts, and by significant delay I'm talking minutes.

I would appreciate it if anyone is able to offer any thoughts on whats causing this or what I can do to narrow down the culprit.

Thanks

Andyroo
Posts: 3378
Joined: Sat Jun 16, 2018 12:49 am
Location: Lincs U.K.

Re: Chromium kiosk mode slow to start without keyboard connected

Sat Mar 30, 2019 5:16 pm

Entropy :lol:

Seriously - the random number generator seems to have an issue if the Pi does not have a keyboard / mouse attached...

Try the following and let me know how you get on:

Code: Select all

sudo apt-get install haveged
sudo systemctl enable haveged
sudo systemctl start haveged
This is a link to the initial project http://www.issihosts.com/haveged/ - do not bet money on the randomness of the random returned by this though :lol:
Need Pi spray - these things are breeding in my house...

mjdumelow
Posts: 2
Joined: Sat Mar 30, 2019 4:41 pm

Re: Chromium kiosk mode slow to start without keyboard connected

Sat Mar 30, 2019 5:51 pm

I doubt I would have got that on my own, worked a treat! :)
Thanks for your help, really appreciate it

claudi
Posts: 1
Joined: Wed Apr 03, 2019 3:54 pm

Re: Chromium kiosk mode slow to start without keyboard connected

Thu Apr 04, 2019 6:03 am

Andyroo wrote: Entropy :lol:

Seriously - the random number generator seems to have an issue if the Pi does not have a keyboard / mouse attached...
Dude, if you ever visit Barcelona contact me and I'll buy you a beer! :D :D . Seriously, I can't understand how this issue hasn't been detected before releasing the last Raspbian distro... Anyway, I don't give a f*ck about the randomness of haveged as long as it fixes this BUG.

Thank you very much!

sdsnyr94
Posts: 3
Joined: Tue May 22, 2012 8:20 pm

Re: Chromium kiosk mode slow to start without keyboard connected

Fri Jun 07, 2019 5:16 pm

Thank you. I cannot believe that the issue I have been fighting for the last couple of years all boils down to this.

We use Pi's as a digital display board, and the web page requires the credentials to be input - which I use xdotool for. However, I have always had random issues getting these to log in properly - I always thought it was wireless issues, and kept changing my script with various sleep settings to try and work around it.

I never have these issues when I set them up on my workbench - but my thoughts always went to either the ethernet on my workbench, or maybe the wireless is just better where I was. I NEVER would have associated the fact that I don't have a keyboard attached to this issue.

Andyroo
Posts: 3378
Joined: Sat Jun 16, 2018 12:49 am
Location: Lincs U.K.

Re: Chromium kiosk mode slow to start without keyboard connected

Fri Jun 07, 2019 5:21 pm

The great news is that the latest release of Stretch (April 2019) has this fixed as the kind folk built in the rng-tools package that does the same thing.

It’s documented in the release notes http://downloads.raspberrypi.org/raspbi ... _notes.txt but you have to know what the line means :lol:
Need Pi spray - these things are breeding in my house...

sdsnyr94
Posts: 3
Joined: Tue May 22, 2012 8:20 pm

Re: Chromium kiosk mode slow to start without keyboard connected

Fri Jun 07, 2019 6:16 pm

Thanks for the heads up - have you tested this? If you just install rng-tools on an existing install, do you need to do anything else for it to be functional?

Andyroo
Posts: 3378
Joined: Sat Jun 16, 2018 12:49 am
Location: Lincs U.K.

Re: Chromium kiosk mode slow to start without keyboard connected

Fri Jun 07, 2019 7:10 pm

I think I’ve not tried using rng-tools on an existing set up (mind only works alternate Fridays) - I’ve built on machine since release but that was a Zero via USB so not sure if that would have the issue.

I cannot think of any reason loading rng-tools would not work - details are at https://wiki.archlinux.org/index.php/Rng-tools but I do know the fix above worked on the previous version of Stretch fine.
Need Pi spray - these things are breeding in my house...

ackerleytng
Posts: 1
Joined: Sat Jun 08, 2019 5:11 am

Re: Chromium kiosk mode slow to start without keyboard connected

Sat Jun 08, 2019 5:14 am

It seems like starting chromium in app mode gets around the need for entropy.

Code: Select all

chromium-browser --app=http://localhost
starts up rather quickly compared to

Code: Select all

chromium-browser http://localhost

Return to “Raspbian”