05-07-2021, 01:01 PM
(05-03-2021, 03:27 PM)pmartin Wrote: Try Firefox to solve the Chromium memory bug@pmartin: Awesome, you provided the successful solution to overcome the chromium browser bug that swallows after a certain time the available memory, which resulted in the moode player being non responsive to any command.
Note: this is only a try and is working with one Raspberry Pi 4B whith 2GB of RAM, an Allo Boss DAC Hat, Rotary encoder for volume with button for play/pause (mpc toggle) and a 3,5" HDMI display.
I checked Firefox-esr and this browser is not affected by the memory leak.
I checked for 2 days and still works stable.
Firefox includes a kiosk mode but does not use the whole screen when invoked from .xinitrc, leaving a vertical black border on the right and another one at the bottom of the screen.
When Firefox runs from a window manager it works right in kiosk mode filling all the diaplay. The lightest window manager I know is awesome.
I tested to start localui running awesome. In awesome config I put autostart of Firefox in kiosk mode.
To check firefox with the localui service:
Open a console and install Firefox:
Code:sudo apt-get install firefox-esr
Install the awesome window manager
Code:sudo apt-get install awesome
Modify the .xinitrc to run awesome only
Code:sudo nano /home/pi/.xinitrc
Comment with # chromium command and write as last line:
awesome
Type CTRL+0 enter CTRLX to save and close nano editor
Modify /etc/xdg/awesome/awesome/rc.lua to start Firefox with the awesome session
Code:sudo nano /etc/xdg/awesome/rc.lua
Paste this code at the end of file:
Code:autorun = true
autorunApps =
{
"/usr/bin/firefox-esr --kiosk --private-window http://localhost",
}
if autorun then
for app = 1, #autorunApps do
awful.util.spawn(autorunApps[app])
end
end
Type CTRL+0 enter CTRLX to save file and close nano editor
Test the new localui with Firefox typing:
sudo systemctl stop localui
sudo systemctl start localui
If Firefox show bookmarks or other tabs, stop localui and Firefox and just delete all files in folder /home/pi/.mozilla
With your solution to replace chromium-browser by firefox-esr resolves the issue and moode audio player just continues to play flawlessly.
Great work. thx a lot.
Comments:
When I followed your procedure, I first got error messages when trying to install firefox-esr. That was due to non up to date dependencies, which were quickly resolved by executing the following command at the beginning:
Code:
sudo apt update
After everything worked fine, I also got rid off by everything that was related to chromium:
Code:
sudo apt purge --remove chromium-browser
sudo apt autoremove
sudo apt autoclean
@Tim & Alaini93: To your question whether this could be due to a faulty RPi 3B+: The answer is No. I had seen this issue now on two different RPi 3B+ and one RPi 4 with 2GB RAM.
@Kent: I read your comprehensive writing about pros and cons to swap the browser. My feedback is that pmartin's proposal is the solution. moode 7.2.0 is just working great again.
thx to all who contribute to this great forum.
brgds,
Gerhard
Gerhard