LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Firefox freezing the system (https://www.linuxquestions.org/questions/linux-software-2/firefox-freezing-the-system-4175682562/)

tux01 09-23-2020 04:26 AM

Firefox freezing the system
 
Hi, I am using a distro with KDE on a laptop with Intel CPU and dual GPU Intel and AMD. My kernel is 5.4.5, I have 4Gb RAM and a swap file of the same size. When using Firefox I have a weird and annoying issue: after a while, regardless of how many tabs I open, the browser freezes when I right-click on a link or simply try to open a menu, locking up the whole system. There is no high memory usage, the swap file is not even touched, and I have no addons, just a clean profile. Things I have tried with no joy:
1) Creating a new profile and deleting the old one.
2) Turning off hardware acceleration.
3) Switching compositor from OpenGL to Xrender.
I have also talked to the devs of my distro, their only advice was to launch Firefox from terminal and wait for error messages that, in fact, didn't show up. What else could I try? Thanks.

pan64 09-23-2020 04:53 AM

there is no usable info, so I can only guess: firefox uses some incompatible libraries. Probably there is a site (video/page/whatever) you opened which will fool the browser. Probably it is not related to firefox at all, but (for example to your video driver). Or something else....

tux01 09-23-2020 05:38 AM

Quote:

Originally Posted by pan64 (Post 6168809)
there is no usable info

Yes I know, unfortunately debugging Firefox is a pain in the neck because it does not write logs.
Quote:

Originally Posted by pan64 (Post 6168809)
Probably there is a site (video/page/whatever) you opened which will fool the browser. Probably it is not related to firefox at all, but (for example to your video driver). Or something else....

It looks like that menus are affected rather than specific websites, even clicking on the hamburger menu or trying to change some settings could lock the system...My video drivers are all up-to-date, wondering if it might be a kernel issue?

pan64 09-23-2020 05:50 AM

it can be even an overclocking/overheating issue too. Need to find some traces... to work with.
You might check /var/log, dmesg, Xorg*log or ???
You might try to ssh into that host to see if only X was locked and you also try to look around (in that case)

tux01 09-23-2020 07:01 AM

thanks, I have also read a reddit thread where falling back to modesetting is recommended instead of loading the xf86-video-intel driver. I couldn't uninstall the driver, so I created a 20-modesetting.conf file in /etc/X11/xorg.conf.d accordingly. Let's see if this is of any help.
UPDATE: dumb idea, I have checked Xorg.log and modesetting was already enabled before i created the file...Other logs and dmesg didn't show any particular warnings. BTW my FF version is quite old, 68-esr, my distro doesn't have a newer one yet.

frankbell 09-23-2020 07:05 PM

You could try starting Firefox from the command line. There's a chance it might throw some useful error messages to the terminal.

tux01 09-24-2020 01:59 AM

Yes, I had tried, but it didn't throw anything..really really weird...

X-LFS-2010 10-04-2020 02:24 AM

my kinda non-relevant experience is ...

my "old firefox" for debian used to lock up after opening many tabs or or being left open over night. it would always leak memory, continually allocating more until it imploded and locked up the desktop with it

I compiled my own firefox (skipped some features due to laziness so not all websites worked) - but never had it crash overnight again

i don't suggest that, but i suggest two things:

(1) china google et al like nvidia and sony not intel, and they sometimes cause support issues (prove it? no, i'm blogging take that for what it is)

(2) do you have that problem using google's compiled browser? if not, then it's the web browser (meaning - replace your web browser - it's what is buggy)

ondoho 10-04-2020 02:57 AM

^ erm, what?!
:scratch:

Even though it's been 10 days, I ask OP:
define "freeze" - can you wait it out? Can you still close FF, or does it corrupt your desktop?
If it's just overload, you should verify that (system monitor, in CLI: top or htop). Also, what kind of CPU exactly.

tux01 10-04-2020 04:45 AM

Quote:

Originally Posted by X-LFS-2010 (Post 6172432)
my kinda non-relevant experience is ...
my "old firefox" for debian used to lock up after opening many tabs or or being left open over night. it would always leak memory, continually allocating more until it imploded and locked up the desktop with it

a memory leak is in fact my first guess, however I opened as much as 40-50 tabs and surprisingly it was only consuming some 600 Mb of my total 4 Gb RAM...it looks that actually my problems is not related to the number of tabs but rather to the rate they are opened at. Even if I open few tabs but quickly, the browser almost always freezes. However, the opposite is true sometimes: if I left a tab open for a while and I right-click on a new link I experience the issue.
Quote:

Originally Posted by X-LFS-2010 (Post 6172432)
do you have that problem using google's compiled browser? if not, then it's the web browser (meaning - replace your web browser - it's what is buggy)

Unfortunately I couldn't try this. My distro is a small, independent one based on musl and they only offer Firefox in their repos. This means that, even if I download an AppImage of another browser, it won't run because it's compiled against glibc...

tux01 10-04-2020 04:55 AM

Quote:

Originally Posted by ondoho (Post 6172441)
^ erm, what?!
:scratch:

Even though it's been 10 days, I ask OP:
define "freeze" - can you wait it out? Can you still close FF, or does it corrupt your desktop?
If it's just overload, you should verify that (system monitor, in CLI: top or htop). Also, what kind of CPU exactly.

Most of the time, it will lock the whole desktop and I can't help but hard-rebooting the system, because I couldn't even run a shell. However, sometimes is just the browser hanging and I can open the system monitor, but there is no high CPU or RAM usage, everything looks normal from this point of view and my swap file is not used at all.
I have a 4xIntel i5 CPU 2.40GHz and a dual Intel and AMD GPU. All the firmware is installed and up-to-date.

zeebra 10-04-2020 06:02 AM

Quote:

Originally Posted by tux01 (Post 6172464)
Most of the time, it will lock the whole desktop and I can't help but hard-rebooting the system, because I couldn't even run a shell. However, sometimes is just the browser hanging and I can open the system monitor, but there is no high CPU or RAM usage, everything looks normal from this point of view and my swap file is not used at all.
I have a 4xIntel i5 CPU 2.40GHz and a dual Intel and AMD GPU. All the firmware is installed and up-to-date.

There is NO high CPU or RAM usage at all, or Firefox is not using high CPU or RAM? If you can manage it, next time it freezes up, ctrl+alt+f2 to a getty terminal and run "top"..

I've been dealing with some similar issues with Firefox, but these are due to kswapd running amok, due to, eh, something, in Firefox.. Memory leaks.. Anyways, what I am doing is removing all swapiness to see if that can finally solve the issue.

Ps. I've run Firefox from the terminal and seen useful messages.

tux01 10-04-2020 07:28 AM

Quote:

Originally Posted by zeebra (Post 6172474)
There is NO high CPU or RAM usage at all, or Firefox is not using high CPU or RAM? If you can manage it, next time it freezes up, ctrl+alt+f2 to a getty terminal and run "top"..

I've been dealing with some similar issues with Firefox, but these are due to kswapd running amok, due to, eh, something, in Firefox.. Memory leaks.. Anyways, what I am doing is removing all swapiness to see if that can finally solve the issue.

Ps. I've run Firefox from the terminal and seen useful messages.

The system alone uses about 400 Mb RAM, and I noticed that, even opening as much as 50 tabs, the total RAM only reaches 1 Gb, so it looks like it's not a matter of quantity but maybe of how the browser handles this memory, I really can't say. I also tried running Firefox from terminal, no messages at all, everything seems normal until a random freeze.

ondoho 10-05-2020 01:04 AM

Quote:

Originally Posted by tux01 (Post 6172464)
a dual Intel and AMD GPU.

It could have sth to do with this.
I think I have seen similar problems recently involving FF and dual graphics.
Try to either dis- or enable hardware accelaration in FF (Settings => General => Performance).

Generally, we need to get some relevant logs/output... journalctl maybe, last boot is "journalctl -b -1" IIRC. Better check that.

tux01 10-05-2020 06:30 AM

Quote:

Originally Posted by ondoho (Post 6172682)
It could have sth to do with this.
I think I have seen similar problems recently involving FF and dual graphics.
Try to either dis- or enable hardware accelaration in FF (Settings => General => Performance).

Already tried, hardware acceleration is enabled by default but it looks like changing the number of content processes or turning off the option makes no difference. Generally speaking, I read elsewhere that hybrid video cards on Linux are a pain.
Quote:

Originally Posted by ondoho (Post 6172682)
Generally, we need to get some relevant logs/output... journalctl maybe, last boot is "journalctl -b -1" IIRC. Better check that.

Thanks, however my distro does not have systemd so I don't have journalctl..I tried to inspect logs in /var/ but I couldn't find anything useful, at least in the logs that I checked (sddm, rc, dmesg, Xorg).


All times are GMT -5. The time now is 08:02 AM.