Just wondering if it's just me, but my Pi4 (4GB) experiences frequent "hangs" while using the Chromium browser. I am typing this comment from Firefox, because it has gotten so bad that I can't use Chromium any more.
I am so embedded in the Chrome/google ecosystem that this causes me a lot of stress. Is there any way to fix this?
Basically, when Chromium is running, whether I am actively working in the browser window or even elsewhere in the desktop, I get periods of about 5 seconds where I can't click anything, type anything, etc...
I am not experiencing this in Firefox.
Any thoughts?
Re: Pi4: Chromium Browser Causes frequent hangs (5 seconds or so duration)
Yes !
I had exactly the same problem. It is mentioned on another topic.
I tried swapping my Sandisk Ultra microSD for a brand new Samsung EVO Plus card in case my old card was corrupt. It did nothing.
But, I put in a little spare Sandisk card. Plugged in an SSD with Buster on it to a USB 3 port, and followed the instructions to boot from the microSD and run Buster on the SSD.
That cured all the Chromium problems and fixed a lot of other little niggles too.
If you don;t have access to an SSD, but do have access an external USB 3 HDD, it might be worth trying out.
I had exactly the same problem. It is mentioned on another topic.
I tried swapping my Sandisk Ultra microSD for a brand new Samsung EVO Plus card in case my old card was corrupt. It did nothing.
But, I put in a little spare Sandisk card. Plugged in an SSD with Buster on it to a USB 3 port, and followed the instructions to boot from the microSD and run Buster on the SSD.
That cured all the Chromium problems and fixed a lot of other little niggles too.
If you don;t have access to an SSD, but do have access an external USB 3 HDD, it might be worth trying out.
Remember, nobody is listening to you
until you fart ...
until you fart ...
-
- Posts: 2247
- Joined: Thu Feb 05, 2015 11:25 pm
Re: Pi4: Chromium Browser Causes frequent hangs (5 seconds or so duration)
I'm not an expert in this area but pauses in GUI desktop use on computers are usually caused by something else taking some time
One of the most common reasons is that the OS has run out of RAM and is swapping stuff out from RAM to external storage etc
This would explain the OP issue and might explain why shifting to faster external storage would seem to cure the second one
I'd check to see if your coming close to using all your RAM up
One of the most common reasons is that the OS has run out of RAM and is swapping stuff out from RAM to external storage etc
This would explain the OP issue and might explain why shifting to faster external storage would seem to cure the second one
I'd check to see if your coming close to using all your RAM up
Re: Pi4: Chromium Browser Causes frequent hangs (5 seconds or so duration)
The problem with freezing Chromium is to some extent related to the OS settings. For several months now I have been using only Raspberries as my main computer (to be honest, I use two Raspberries). I am an active Internet user, I watch films for a long time, listen to music and do almost everything I did on a “regular” computer. Therefore, I first of all got rid of the “freezing” of Chromium. In fact, it is very easy and you do not even need to install an external SSD (although this is a good idea). Chromium "freezes" due to the fact that it constantly writes to the sd card, which causes the illusion of stopping. I just transferred the whole /home/pi directory to virtual memory (fstab> tmpfs). After that, I never saw Chromium “freeze”, and also Chromium does not write its garbage to my card.
PS Chromium also has an unpleasant problem of computer “freezing” during frequent viewing of video. I still don’t know how to solve this problem, I suspect that there are some imperfections with video drivers, but I can’t check it yet. In this case, Chromium simply shuts down the entire operating system and you need to physically disconnect the power source.
But besides Chromium there are several more browsers that you can use.
PS Chromium also has an unpleasant problem of computer “freezing” during frequent viewing of video. I still don’t know how to solve this problem, I suspect that there are some imperfections with video drivers, but I can’t check it yet. In this case, Chromium simply shuts down the entire operating system and you need to physically disconnect the power source.
But besides Chromium there are several more browsers that you can use.
Re: Pi4: Chromium Browser Causes frequent hangs (5 seconds or so duration)
Interesting, not seen it on Pi, but I do get occasional pauses of about 10s on my x86 laptop (I7, 16GB RAM) when using Chrome. So I don't think it's limited to the Pi, or even the ARM architecture.
Principal Software Engineer at Raspberry Pi Ltd.
Working in the Applications Team.
Working in the Applications Team.
Re: Pi4: Chromium Browser Causes frequent hangs (5 seconds or so duration)
Lately I see this occasionally on my Samsung TAB S4.
The road to insanity is paved with static ip addresses
Re: Pi4: Chromium Browser Causes frequent hangs (5 seconds or so duration)
If you mean freezing playing video from a site like YouTube, I was getting frustrated by Chromium either freezing, or continually buffering.PS Chromium also has an unpleasant problem of computer “freezing” during frequent viewing of video. I still don’t know how to solve this problem,
gkreidl solved it for me, by posting on this forum, a method to view video from some sites (some hundreds of sites actually) by using the system kweb Minimal Kiosk Browser used on the early Pis with little RAM available.
He set up a method for adding a bookmark to Chromium that enables it to use youtube-dl to extract a video from the current page then open a VLC standalone window, and play the video.
Now, as has been pointed out to me in another discussion, youtube-dl extracts at 720p. However, on a 4k Youtube video, VLC is giving me a clearer, sharper video, with no buffering at 720p (according to VLC codec info) on the Pi 4, than I can get on a dedicated 4k streaming player alongside it.
I'm not trying to 'sell' anything here. Just suggesting that there's a quite easy and effective way to get very good streaming video performance from Chromium.
The alternative, which is particularly good on the 'testing' VLC package for raspbian, is to open VLC, do CTRL+n copy the link from Chromium and paste it into VLC.
Remember, nobody is listening to you
until you fart ...
until you fart ...
Re: Pi4: Chromium Browser Causes frequent hangs (5 seconds or so duration)
I might give that a try. I think i have an old SSD laying around somewhere.RossDv8 wrote: ↑Tue Nov 26, 2019 3:58 amYes !
I had exactly the same problem. It is mentioned on another topic.
I tried swapping my Sandisk Ultra microSD for a brand new Samsung EVO Plus card in case my old card was corrupt. It did nothing.
But, I put in a little spare Sandisk card. Plugged in an SSD with Buster on it to a USB 3 port, and followed the instructions to boot from the microSD and run Buster on the SSD.
That cured all the Chromium problems and fixed a lot of other little niggles too.
If you don;t have access to an SSD, but do have access an external USB 3 HDD, it might be worth trying out.
Re: Pi4: Chromium Browser Causes frequent hangs (5 seconds or so duration)
Maybe I am getting my terminology wrong, but isn't virtual memory a physical disk (or in this case the SD card)?renice123 wrote: ↑Tue Nov 26, 2019 1:36 pmThe problem with freezing Chromium is to some extent related to the OS settings. For several months now I have been using only Raspberries as my main computer (to be honest, I use two Raspberries). I am an active Internet user, I watch films for a long time, listen to music and do almost everything I did on a “regular” computer. Therefore, I first of all got rid of the “freezing” of Chromium. In fact, it is very easy and you do not even need to install an external SSD (although this is a good idea). Chromium "freezes" due to the fact that it constantly writes to the sd card, which causes the illusion of stopping. I just transferred the whole /home/pi directory to virtual memory (fstab> tmpfs). After that, I never saw Chromium “freeze”, and also Chromium does not write its garbage to my card.
PS Chromium also has an unpleasant problem of computer “freezing” during frequent viewing of video. I still don’t know how to solve this problem, I suspect that there are some imperfections with video drivers, but I can’t check it yet. In this case, Chromium simply shuts down the entire operating system and you need to physically disconnect the power source.
But besides Chromium there are several more browsers that you can use.
Did you mean a RAMdisk? Do you have any tips on how to do this? I am willing to give this a try.
Re: Pi4: Chromium Browser Causes frequent hangs (5 seconds or so duration)
It doesn't appear that my RAM is coming close to being full. htop shows about 1.74GB in use (of 3.81GB) with firefox and chromium open (about 3 tabs each).mattmiller wrote: ↑Tue Nov 26, 2019 7:40 amI'm not an expert in this area but pauses in GUI desktop use on computers are usually caused by something else taking some time
One of the most common reasons is that the OS has run out of RAM and is swapping stuff out from RAM to external storage etc
This would explain the OP issue and might explain why shifting to faster external storage would seem to cure the second one
I'd check to see if your coming close to using all your RAM up
Re: Pi4: Chromium Browser Causes frequent hangs (5 seconds or so duration)
I deleted Firefox because it was crashing a lot. Like the 'Aww Snap' message in Chromium, but it says something else.
I fixed the problem in Chromium, but could not solve it in firefox, even trying things other people did.
However, here's my memory usage with Chromium (3 tabs) and Epiphany (3 tabs) just for comparison:
I fixed the problem in Chromium, but could not solve it in firefox, even trying things other people did.
However, here's my memory usage with Chromium (3 tabs) and Epiphany (3 tabs) just for comparison:
Code: Select all
pi@raspberrypi:~ $ free -h
total used free shared buff/cache available
Mem: 3.5Gi 912Mi 1.7Gi 320Mi 973Mi 2.3Gi
Swap: 2.0Gi 0B 2.0Gi
pi@raspberrypi:~ $
Remember, nobody is listening to you
until you fart ...
until you fart ...
Re: Pi4: Chromium Browser Causes frequent hangs (5 seconds or so duration)
Sorry, I don't speak English well. Yes, I'm talking about creating a disk in RAM. As far as I know (I'm an old Linux user), Chromium contains critical errors by inheritance. Firefox also borrows many errors: these browsers have a lot in common. There are, for example, browsers such as Luakit, which do not cause disasters when working with the operating system.
Alas, there are no worthy alternatives, as these browsers have captured the market and monopolists.
I tried to limit the appetite of Chromium through ulimit, this does not help. Chromium is just a poorly written program and you have to put up with it.
The most unpleasant critical error of Chromium is the failure of the whole system to work if Chromium freezes at some point. This failure cannot be isolated due to an error in the kernel video driver (as far as I understand the problem)
Failure is easy to cause if you go to sites where there is a lot of flash, video and javascript (usually these are video sites with many windows of movie previews). Chromium freezes at some point, and the entire operating system freezes with it. Watchdog does not help. Only physical power off helps. The failure of the operating system almost always occurs after about an hour of viewing such sites (when you leaf through pages with a preview).
The same problem was at Jessie in Raspberry, I conclude that this is a hereditary disease associated with the architecture of arm and poorly written program Chromium.
I found a solution with zram and electronic disks in the memory on a diskless client forum. The essence can be described in the following words.
1. Install the zram program (here on the forum there is a thread dedicated to this program).
Zram can really fix some of Debian's problem areas.
2. Then create the necessary entries in fstab (for user pi).
Transfer the entire / home / pi directory to RAM, mount it as tmpfs. To save some important settings (for example, passwords and site logins), you can write a boot script that will write data to /home/pi/.config at boot time. This is convenient if you want to use Chromium and automatically save cookies and other settings.
It will also allow you to configure the system once, write all the data to a directory on the memory card and automatically copy the data to home / pi / when loading
It will also extend the life of your memory card, as browsers are programs that kill the memory card with uninterrupted recording garbage.
3. Optimize fstab, specify such parameters as noatime, nodiratime, errors = remount-ro and others.
The journaled file system does not work well with memory cards, since it also writes data to the memory card almost every second of its own. File system can be optimized
It is better to transfer these directories to memory.
tmpfs / var / log tmpfs nosuid, nodev 0 0
tmpfs / var / tmp tmpfs nosuid, nodev 0 0
4. Many programs write their unnecessary logs to disk. Disable logging of these programs or create links to recording directories in tmp
#rm -rf / var / lib / dhcp / var / lib / dhcpcd5 / var / spool
ln -s / tmp / var / lib / dhcp
ln -s / tmp / var / lib / dhcpcd5
ln -s / tmp / var / spool
Add to this the following
rm -rf / var / cache / fontconfig
ln -s / tmp / var / cache / fontconfig
Do you need fontconfig cache? Are you sure you know why you need / var / lib / dhcpcd5? This seems to be trash that you most likely will never need. Make a symbolic link.
There are many sites that describe even more advanced ways to speed up the operating system, including by optimizing the work with the file system and disabling the garbage output of programs, I write about the methods that I use.
If the cache is organized in RAM, Chromium is very fast. For several months now I have been using only Raspberry microcomputers at home and have almost no discomfort. Except for the tragic hang of Raspberries due to poorly written Chromium.
PS The Debian forums are abusively abusing Chromium. Large RAM does not help Chromium; Chromium simply hangs the system due to critical errors in any case.
Alas, there are no worthy alternatives, as these browsers have captured the market and monopolists.
I tried to limit the appetite of Chromium through ulimit, this does not help. Chromium is just a poorly written program and you have to put up with it.
The most unpleasant critical error of Chromium is the failure of the whole system to work if Chromium freezes at some point. This failure cannot be isolated due to an error in the kernel video driver (as far as I understand the problem)
Failure is easy to cause if you go to sites where there is a lot of flash, video and javascript (usually these are video sites with many windows of movie previews). Chromium freezes at some point, and the entire operating system freezes with it. Watchdog does not help. Only physical power off helps. The failure of the operating system almost always occurs after about an hour of viewing such sites (when you leaf through pages with a preview).
The same problem was at Jessie in Raspberry, I conclude that this is a hereditary disease associated with the architecture of arm and poorly written program Chromium.
I found a solution with zram and electronic disks in the memory on a diskless client forum. The essence can be described in the following words.
1. Install the zram program (here on the forum there is a thread dedicated to this program).
Zram can really fix some of Debian's problem areas.
2. Then create the necessary entries in fstab (for user pi).
Transfer the entire / home / pi directory to RAM, mount it as tmpfs. To save some important settings (for example, passwords and site logins), you can write a boot script that will write data to /home/pi/.config at boot time. This is convenient if you want to use Chromium and automatically save cookies and other settings.
It will also allow you to configure the system once, write all the data to a directory on the memory card and automatically copy the data to home / pi / when loading
It will also extend the life of your memory card, as browsers are programs that kill the memory card with uninterrupted recording garbage.
3. Optimize fstab, specify such parameters as noatime, nodiratime, errors = remount-ro and others.
The journaled file system does not work well with memory cards, since it also writes data to the memory card almost every second of its own. File system can be optimized
It is better to transfer these directories to memory.
tmpfs / var / log tmpfs nosuid, nodev 0 0
tmpfs / var / tmp tmpfs nosuid, nodev 0 0
4. Many programs write their unnecessary logs to disk. Disable logging of these programs or create links to recording directories in tmp
#rm -rf / var / lib / dhcp / var / lib / dhcpcd5 / var / spool
ln -s / tmp / var / lib / dhcp
ln -s / tmp / var / lib / dhcpcd5
ln -s / tmp / var / spool
Add to this the following
rm -rf / var / cache / fontconfig
ln -s / tmp / var / cache / fontconfig
Do you need fontconfig cache? Are you sure you know why you need / var / lib / dhcpcd5? This seems to be trash that you most likely will never need. Make a symbolic link.
There are many sites that describe even more advanced ways to speed up the operating system, including by optimizing the work with the file system and disabling the garbage output of programs, I write about the methods that I use.
If the cache is organized in RAM, Chromium is very fast. For several months now I have been using only Raspberry microcomputers at home and have almost no discomfort. Except for the tragic hang of Raspberries due to poorly written Chromium.
PS The Debian forums are abusively abusing Chromium. Large RAM does not help Chromium; Chromium simply hangs the system due to critical errors in any case.
Re: Pi4: Chromium Browser Causes frequent hangs (5 seconds or so duration)
Quick update
I configured my Pi4 to use an SSD as the root drive and this improved things significantly. Using a cheap PNY CS900 120GB SSD and a StarTech USB3-to-2.5" SATA adapter.
My only complaint is that the adapter I am using doesn't have an LED activity indicator. It is nice to see the access indicator running (as it did on a different adapter). Unfortunately, the other adapter with the LED didn't play nice with the pi4's USB3 ports due to a chipset limitation.
I used this guide (with minor adjustments) to make it work (excellent resource!):
https://jamesachambers.com/raspberry-pi ... sh-drives/
EDIT: corrected model number of PNY SSD to CS900 (not CS300).
I configured my Pi4 to use an SSD as the root drive and this improved things significantly. Using a cheap PNY CS900 120GB SSD and a StarTech USB3-to-2.5" SATA adapter.
My only complaint is that the adapter I am using doesn't have an LED activity indicator. It is nice to see the access indicator running (as it did on a different adapter). Unfortunately, the other adapter with the LED didn't play nice with the pi4's USB3 ports due to a chipset limitation.
I used this guide (with minor adjustments) to make it work (excellent resource!):
https://jamesachambers.com/raspberry-pi ... sh-drives/
EDIT: corrected model number of PNY SSD to CS900 (not CS300).
Re: Pi4: Chromium Browser Causes frequent hangs (5 seconds or so duration)
I am in Australia, so this link might not be any use to you other than to show an actual adapter that 'WORKS'.My only complaint is that the adapter I am using doesn't have an LED activity indicator. It is nice to see the access indicator running (as it did on a different adapter). Unfortunately, the other adapter with the LED didn't play nice with the pi4's USB3 ports due to a chipset limitation.
So if you are searching for an adapter, perhaps look for one that looks exactly like this one. The two little dots near where it says SATA are a Red LED for Power and a Blue LED for Activity.
http://www.ebay.com.au/itm/USB3-0-to-SA ... 443f9f80a7
It works great with the Pi 3B+ and Pi 4, especially with SSD.
These do show up in searches in other countries, and of course, China. But in my country they are pretty expensive. AUD $10 - $12 (Free Postage). I'm about to buy one or two more.
It's worth the price to know it works. And to have the power and activity lights.

Remember, nobody is listening to you
until you fart ...
until you fart ...
Re: Pi4: Chromium Browser Causes frequent hangs (5 seconds or so duration)
Ha - that looks like one that I could have purchased, but it would have taken a couple of extra days!RossDv8 wrote: ↑Sun Dec 01, 2019 4:16 amI am in Australia, so this link might not be any use to you other than to show an actual adapter that 'WORKS'.My only complaint is that the adapter I am using doesn't have an LED activity indicator. It is nice to see the access indicator running (as it did on a different adapter). Unfortunately, the other adapter with the LED didn't play nice with the pi4's USB3 ports due to a chipset limitation.
So if you are searching for an adapter, perhaps look for one that looks exactly like this one.
USB-3-SATA.jpg
The two little dots near where it says SATA are a Red LED for Power and a Blue LED for Activity.
http://www.ebay.com.au/itm/USB3-0-to-SA ... 443f9f80a7
It works great with the Pi 3B+ and Pi 4, especially with SSD.
These do show up in searches in other countries, and of course, China. But in my country they are pretty expensive. AUD $10 - $12 (Free Postage). I'm about to buy one or two more.
It's worth the price to know it works. And to have the power and activity lights.![]()

https://www.amazon.com/ELUTENG-Adapter- ... uage=en_US
Re: Pi4: Chromium Browser Causes frequent hangs (5 seconds or so duration)
Damn. That ELUTENG one is exactly the same as the one I have. And I just bought another one from ebay (local) for just over $10 incl post. It was a bit under AUD $8 delivered if I wanted to wait a few weeks for shipping form China.
One of these days I will remember we have Amazon in Australia. Difficult when I've been buying from ebay since about 2000...
E D I T
I don;t feel so bad now.
Amazon Australia has it just a tad more expensive (AUD$15.81+ $7.64 Delivery)
than the US $7.99 price.
In Aus that is more than twice the price of the ebay one incl delivery So it might be worth checking your ebay for one in your country.
One of these days I will remember we have Amazon in Australia. Difficult when I've been buying from ebay since about 2000...
E D I T
I don;t feel so bad now.
Amazon Australia has it just a tad more expensive (AUD$15.81+ $7.64 Delivery)
than the US $7.99 price.
In Aus that is more than twice the price of the ebay one incl delivery So it might be worth checking your ebay for one in your country.
Remember, nobody is listening to you
until you fart ...
until you fart ...
Re: Pi4: Chromium Browser Causes frequent hangs (5 seconds or so duration)
Me too!
New install on Pi4. Chromium browser just stops for up to 5 seconds frequently when scrolling, switching tabs, typing.
I set up "top" in a terminal window to see if I could find out what was causing the problem but the CPU and memory usage are all low during these hangs so it must be something in the browser itself.
It got to be so irritating that is was unusable. I installed Firefox ESR from repository and it doesn't have this problem at all. Works much better.
New install on Pi4. Chromium browser just stops for up to 5 seconds frequently when scrolling, switching tabs, typing.
I set up "top" in a terminal window to see if I could find out what was causing the problem but the CPU and memory usage are all low during these hangs so it must be something in the browser itself.
It got to be so irritating that is was unusable. I installed Firefox ESR from repository and it doesn't have this problem at all. Works much better.
Re: Pi4: Chromium Browser Causes frequent hangs (5 seconds or so duration)
My Raspberry Pi 4 with 8GB also had frequent 5 seconds freeze. So, I followed the idea given above by renice123.
But instead of putting all pi home dir on tmpfs, I created a tmpfs only for /home/pi/.config/chromium folder mounted on /var/chrome_files with size of 512M. With that entry in /etc/fstab I backed up my .config/chromium to .config/chromium_orig (new folder). Then created a symbolic link from the tmpfs folder /var/chrome_files to .config/chrome
Now when I reboot, I am getting the symbolic link active. So I copied the chromim_orig folder content to chromium folder.
Now when I start Chromium Browser, I have not seen any 5 second stop or freeze. I opened up to 9 tabs, played youtube and cnn and bbc etc and I could switch tabs easily without any freeze.
Thanks to renice123 for the idea. I think I will do the folder copy with a shell script later.
Unfortunately this idea did not work on Raspberry Pi 3. That just freezes even with two tabs. So the Pi3 is not good for Chromium we need a minimum of Pi 4 with 4GB RAM. I do not have a Pi4 with 2GB. If somebody could test and give feedback it will be re-nice.
This way I have my code-oss installed, and Nim compiler installed all in my home pi folder. This looks like a minimal change to still have Chromium Browser working on Pi4.
Thanks
But instead of putting all pi home dir on tmpfs, I created a tmpfs only for /home/pi/.config/chromium folder mounted on /var/chrome_files with size of 512M. With that entry in /etc/fstab I backed up my .config/chromium to .config/chromium_orig (new folder). Then created a symbolic link from the tmpfs folder /var/chrome_files to .config/chrome
Now when I reboot, I am getting the symbolic link active. So I copied the chromim_orig folder content to chromium folder.
Now when I start Chromium Browser, I have not seen any 5 second stop or freeze. I opened up to 9 tabs, played youtube and cnn and bbc etc and I could switch tabs easily without any freeze.
Thanks to renice123 for the idea. I think I will do the folder copy with a shell script later.
Unfortunately this idea did not work on Raspberry Pi 3. That just freezes even with two tabs. So the Pi3 is not good for Chromium we need a minimum of Pi 4 with 4GB RAM. I do not have a Pi4 with 2GB. If somebody could test and give feedback it will be re-nice.
This way I have my code-oss installed, and Nim compiler installed all in my home pi folder. This looks like a minimal change to still have Chromium Browser working on Pi4.
Thanks