[How to do instruction] Using the Vivaldi browser for Local Display - Printable Version +- Moode Forum (https://moodeaudio.org/forum) +-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3) +--- Forum: FAQ and Guides (https://moodeaudio.org/forum/forumdisplay.php?fid=9) +--- Thread: [How to do instruction] Using the Vivaldi browser for Local Display (/showthread.php?tid=3357) |
Using the Vivaldi browser for Local Display - TheOldPresbyope - 01-10-2021 Update 20210311 - This guide was written specifically for moOde 7.0.1. With the advent of moOde 7.1.0 we find new versions of chromium-browser and vivaldi-stable have been issued. The eventual memory exhaustion problem has been demonstrated in moOde 7.1.0 with chromium-browser 84.0.4147.141, 84.0.4147.105-rpt3, 88.0.4324.187-rpt1. The problem has also been demonstrated with vivaldi-stable 3.6.2165.40-1. Therefore, at the present time, there is no reason to install Vivaldi. The solution must be found elsewhere. Background Some users of moOde 7.0.1 on an RPi3B+ with Local Display enabled and with an HDMI display (*not* the 7-in Touch Display or other non-HDMI display) have experienced a system "lock out" after a lengthy idling period. At least one failure mode has been traced to the chromium browser package installed in 7.0.1. This browser is used as the local Web client in moOde and is responsible for rendering what is seen on the local display. When the local display is enabled, an initial chromium process is started and spawns 8 more processes to handle various browser tasks. After a lengthy period in pause/idle mode, the type=renderer chromium process unexpectedly starts consuming memory to the point where other processes, including the system scheduler, begin experiencing difficulty, leading ultimately to at least temporary catatonia. The root cause of this behavior has not yet been determined. It was not experienced with moOde 6.7.1, which is based on an earlier version of Raspberry Pi OS which in turn includes an earlier version of the Chromium browser. Also, it has not been determined whether the behavior occurs on RPi4B models which have more memory than the RPi3B+ and, if it does, whether the system is able to heal itself when more headroom is available or simply takes longer to lock out. In the meantime an experiment has suggested that using the Vivaldi browser instead of the Chromium browser as the local client may ameliorate the situation. Vivaldi is a cross-platform browser based on the same Chromium engine used in the full Chromium browser. The two browsers use this engine in different ways, which gave rise to the experiment. Fortunately, the APIs and options are similar, so that the substitution is nearly a "drop in" replacement. Installing Vivaldi in moOde This procedure is benign in the sense that it does no irreversible harm to your moOde installation. The steps are performed from the command line of the moOde player under test, which of course must be using an HDMI display for the Local Display. Best to stay in the home directory of user "pi" but that's not essential if you know what you're doing. 1. Install the sole missing dependency Code: sudo apt install font-liberation 2. Download the 68MB Vivaldi browser package Code: wget https://downloads.vivaldi.com/stable/vivaldi-stable_3.5.2115.87-1_armhf.deb This is the current version at the time of writing, but it's always worth checking on the Vivaldi download page. It's the package named Linux DEB ARM in the pull-down menu. Note: at the time of writing there is only one ARM package---"armhf" meaning 32-bit binary. That's the one you want even if in future they also offer a 64-bit version (unless of course you've rebuilt moOde as a 64-bit clean system, in which case you've got the chops to do all this yourself). 3. Install the package Code: sudo dpkg -i vivaldi-stable_3.5.2115.87-1_armhf.deb 4. Modify moOde to use the Vivaldi browser - make a backup of /home/pi/.xinitrc so you can recover if needed. (The naked "cd" command ensures you are in the /home/pi directory) Code: cd - as root and using your favorite text editor (for example, "sudo nano .xinitrc"), change the invocation of "chromium-browser" to "vivaldi-stable" in .xinitrc, so that the line reads (note this is a single line no matter how it is displayed here) Code: vivaldi-stable --app=http://localhost/ --window-size=$SCREENSIZE --window-position=0,0 --no-first-run -enable-features=OverlayScrollbar --disable-infobars --disable-session-crashed-bubble 5. Reboot for good luck, or at least disable and then re-enable the Local Display. [If you decide to change back 6. Restoring the stock configuration - save the modified .xinitrc for possible future use Code: cd - copy the stock configuration back Code: cd Like before, reboot or at least disable and then re-enable the Local Display.] Exercise the new browser Try all the usual functions and features. Try to reproduce the conditions in which you previously experienced "lock up." Report your experiences to the Forum. If you're a bithead, you'll have compared the two browsers for number and types of processes spawned, for memory and CPU consumption, yada yada yada. They differ. In someways the Vivaldi processes seem to be "heavier". As well, the initial vivaldi process spawns not one but two type=renderer processes. Nevertheless, they don't seem ever to start binging on system resources at least in my first, 10-hour experiment. RE: Using the Vivaldi browser for Local Display - Alaini93 - 01-10-2021 Thanks Kent, I'm installing right now, 3) forgot an "h" in Code: ...armf.deb should be Code: armhf.deb RE: Using the Vivaldi browser for Local Display - TheOldPresbyope - 01-10-2021 Oops. That's what I get for typing instead of copy/paste. Fixed. Thanks, Kent RE: Using the Vivaldi browser for Local Display - Alaini93 - 01-10-2021 it does not work for me, it stays stuck here (see pic) if you can read it. RE: Using the Vivaldi browser for Local Display - TheOldPresbyope - 01-11-2021 (01-10-2021, 09:19 PM)Alaini93 Wrote: it does not work for me, it stays stuck here (see pic) if you can read it. I see I forgot that the work on the .xinitrc file must be done as root because of its permissions in a stock moOde install. Sigh. I've amended the guide accordingly. However, because of this error on my part you should have received a "permission denied" error or something similar when you tried to save .xinitrc after editing it as user "pi". Did you? If so, what did you do then? Your posted screen image suggests that you rebooted with either no .xinitrc file or an unreadable one, so that the local display client couldn't start. Can you still see the moOde WebUI on a computer/phone/tablet? Can you still ssh into your player from another computer? --- the answer to both of these questions should be yes. Assuming that I'm correct in my interpretation of what I see, then the remedy is to ssh into the moOde player and correct the .xinitrc file or its permissions. Maybe first you should post here the outputs you get from these two commands after ssh'ing to the player Code: ls -la /home/pi/.xinitrc Regards, Kent RE: Using the Vivaldi browser for Local Display - Alaini93 - 01-11-2021 Hi Kent, I always used "sudo" when editing file, don't know if it's a good habit. And yes I can access ssh, and browse, just no local UI. Now I changed again xinitrc with vivaldi and I get the screen stuck at "Ooops: Teminated". Just this one line at the top. Also I have the Moode splashscreen enable (maybe a problem). here is what I get: Code: pi@moode:~ $ ls -la /home/pi/.xinitrc no hurry, I'll be back home tomorrow by 6pm EST Thanks for your time. RE: Using the Vivaldi browser for Local Display - TheOldPresbyope - 01-11-2021 @Alaini93 Quote:Also I have the Moode splashscreen enable (maybe a problem). Seriously? A two-year old out-of-band software hack that was developed on moOde 4.2 and you neglected to tell us? You must be a difficult patient for your doctor. I seem to recall I thought at the time there was something either not right or not needed in that procedure---I was experimenting with the framebuffer at the time for a different kind of display---but I'd have to go rummage through old notes to see what my issue was if I had one. Nevertheless, I just tried it on my test player. It seems to still work on moOde 7.0.1 and doesn't interfere with my use of Vivaldi. Your issue must lie elsewhere. Always using sudo when you edit is a terrible practice but I can understand the motivation. A lot of files in moOde are owned by root including some which don't need to be. For all that, your /home/pi/.xinitrc is marked owner=pi, group=pi whereas the distributed version is owner=root, group=root. It does not matter in this case, but in general changing file permissions or file ownership is a bad thing. As for the content of your .xinitrc file, nothing jumps out at me. I don't know what to suggest you try next. Regards, Kent RE: Using the Vivaldi browser for Local Display - Alaini93 - 01-11-2021 (01-11-2021, 02:19 PM)TheOldPresbyope Wrote: @Alaini93 Yes splashscreen works fine, but I'm waiting for you to update the mod. Ok, no problem I will deal with chromium. I used to leave it on because of the clock on the 2nd screen. That's weird that it cannot open vivaldi, I don't have any problem switching between browser in Windows |