imagiro1
Posts: 4
Joined: Thu Feb 27, 2020 2:57 am

Starting a single app in Buster

Thu Feb 27, 2020 3:14 am

I feel like this question has been asked numerous times, but I haven't been able to get this to work.

I have a RPi Zero W with a HyperTouch display that I want to run a single webpage. I can get this to work if I using the raspi-config to auto login to the Desktop GUI and run a custom script to load Chromium.

My issue is this lags too much. Too many resources are wasted on the GUI. So I want to launch a single application (chromium) from the terminal (raspi-config - 3 - Console Autologin). It seems nothing I do starts chromium. My latest failed attempt was running chromium from ~/.xinitrc.

What is the recommended method for starting a single application (chromium) in Buster? Can somebody explain the boot process? Is it similar to ArchLinux?

User avatar
topguy
Posts: 6284
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Starting a single app in Buster

Thu Feb 27, 2020 3:52 pm

My issue is this lags too much.
What exactly "lags" ? What is the page supposed to do ?
Too many resources are wasted on the GUI.
Which model Pi are we talking about ?
You probably overestimate the resource usage by the desktop.

You should log into the Pi via SSH and install and run the command "htop" and then see if either CPU or Memory are overloaded.

User avatar
Imperf3kt
Posts: 3375
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: Starting a single app in Buster

Thu Feb 27, 2020 8:55 pm

A Pi0W struggles with chromium.
I have not used mine in awhile, but the last time I tried to open a Web page on a Zero W, I believe it took around two minutes. (Probably part of the reason why it has been so long since I used it)
55:55:44:44:4C
52:4C:52:42:41

imagiro1
Posts: 4
Joined: Thu Feb 27, 2020 2:57 am

Re: Starting a single app in Buster

Fri Feb 28, 2020 1:55 am

Yeah, I was really surprised how slow the webpage ran. I have a simple Python Flask server that runs in the background. The heart has a beating heart (all css animation). It just skips frames to the point you can't really see the animation.

It's running on a rPi Zero W.

I've broken the Pi. It no longer starts the GUI (sudo raspi-config - 3 - Desktop Autologin). So, I'm unable to run htop.

But it seems like both your recommendations are to move away from the RPi Zero W?

kerry_s
Posts: 255
Joined: Thu Jan 30, 2020 7:14 pm

Re: Starting a single app in Buster

Fri Feb 28, 2020 3:29 am

i think your wasting resources on the desktop just to launch a browser.
something like this:
https://www.sylvaindurand.org/launch-ch ... iosk-mode/

adapted to raspbian lite might leave enough of the 512 memory to work. like you don't need to worry about the xset stuff, you can disable blanking in raspi-config, for chromium-browser you want rpi-chromium-mods instead to get the optimized build.

etc....

imagiro1
Posts: 4
Joined: Thu Feb 27, 2020 2:57 am

Re: Starting a single app in Buster

Sat Feb 29, 2020 3:41 am

I reinstalled Buster with no GUI. It does run slightly better. Running just the Flask and Website and running htop, CPU: 42.2%, Mem: 391M/432M, and Swp: 100M/100M.

Increased swap: /etc/dphys-swapfile CONF_SWAPFILE=256
Installed rpi-chromium-mods

htop: CPU: 22%-58%, Mem: 304M/432M, Swp: 21.5M/256M

Much better. However, the the heart (css animation) no longer shows up on the display. :roll: :shock: :(

kerry_s
Posts: 255
Joined: Thu Jan 30, 2020 7:14 pm

Re: Starting a single app in Buster

Sat Feb 29, 2020 4:14 am

up the memory split to 95, that should give you 64m free for 3d like rendering like a beating heart.
you might want to do the chrome flag mods for full acceleration.
I'll post that later, I'm on my tablet cooking dinner right now.

imagiro1
Posts: 4
Joined: Thu Feb 27, 2020 2:57 am

Re: Starting a single app in Buster

Sat Feb 29, 2020 4:38 am

Yes please. Unsure what you mean by upping the memory split. Thanks.

kerry_s
Posts: 255
Joined: Thu Jan 30, 2020 7:14 pm

Re: Starting a single app in Buster

Sat Feb 29, 2020 4:45 am

here's the settings for "chrome://flags", after relaunch check "chrome://gpu"
run "sudo raspi-config" -> advanced options -> memory split
i think default on raspbian lite is 64, if you check "sudo vcdbg reloc" you loose like 28m to the system. so your just getting the full amount free.
never mind the "smooth scrolling" that's a personal preference.
you can check the gpu before mods if your curios :D
Attachments
2020-02-28-184122_749x477_scrot.png
2020-02-28-184122_749x477_scrot.png (60.24 KiB) Viewed 253 times
2020-02-28-183652_522x319_scrot.png
2020-02-28-183652_522x319_scrot.png (51.81 KiB) Viewed 253 times
2020-02-28-183549_804x670_scrot.png
2020-02-28-183549_804x670_scrot.png (100.07 KiB) Viewed 253 times

kerry_s
Posts: 255
Joined: Thu Jan 30, 2020 7:14 pm

Re: Starting a single app in Buster

Sat Feb 29, 2020 4:55 am

my bag it's 92, but 95 ain't going to hurt. the lowest to get what you want is the best, leave more for the cpu.
da, forgot the pic.
Attachments
2020-02-28-185750_752x479_scrot.png
2020-02-28-185750_752x479_scrot.png (75.49 KiB) Viewed 239 times

Return to “Advanced users”