You are not logged in.

#1 2022-12-05 14:55:32

ipyakuza
Member
Registered: 2013-06-24
Posts: 44

[SOLVED] Firefox freezes frequently when copying or highlighting text

This started about early November after package updates.  The issue seems to be related to firefox, the kernel, and NVIDIA driver updates.  Currently Firefox 107.01 (and I've downgraded to earlier versions with the same issues).  Long story short firefox freezes and I have to kill the processes and restart it.  This thread here on reddit shows other people are experiencing the same issues and various things we've tried to resolve it. https://www.reddit.com/r/firefox/commen … s_with_no/

My current kernel: Linux rig 6.0.11-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 02 Dec 2022 17:25:31 +0000 x86_64 GNU/Linux
NVIDIA Driver: 525.60.11
Firefox: 107.01 (and older)

Running i3-gaps with plenty of ram 48GB, this isn't a system resources issue, it was solid running until the updates around Nov/late Oct timeframe now this is a consistent issue and I can make it freeze by just highlighting or copying text ~95% of the time.

Any insights are appreciated.

Last edited by ipyakuza (2022-12-22 14:15:45)

Offline

#2 2022-12-05 14:57:24

d.ALT
Member
Registered: 2019-05-10
Posts: 914

Re: [SOLVED] Firefox freezes frequently when copying or highlighting text

Does Firefox tell you something when you start it from terminal?

$ firefox

<49,17,III,I>    Fama di loro il mondo esser non lassa;
<50,17,III,I>    misericordia e giustizia li sdegna:
<51,17,III,I>    non ragioniam di lor, ma guarda e passa.

Offline

#3 2022-12-05 15:02:26

ipyakuza
Member
Registered: 2013-06-24
Posts: 44

Re: [SOLVED] Firefox freezes frequently when copying or highlighting text

Nope when I run from the terminal it just pops open and no verbose output or error messages.

Last edited by ipyakuza (2022-12-09 03:23:07)

Offline

#4 2022-12-05 15:02:55

aardwolf
Member
From: Belgium
Registered: 2005-07-23
Posts: 304

Re: [SOLVED] Firefox freezes frequently when copying or highlighting text

I have the same issue. I have found this that might be related: https://forum.manjaro.org/t/firefox-kee … /126871/14. Although in there they are discussing multiple issues and only some are talking about the behavior we see here, and in addition it auto-closed.

The exact type of freeze I have is: Randomly, not always, when using copy, paste, or when a file download dialog opens, firefox freezes. All open windows freeze. No response to mouse buttons, no response to the close button, no way to change tabs. If youtube is playing something, its audio continues for a few minutes, then stops too. It's common enough that if I copy/paste/download enough, it can happen multiple times a day.

Other things, like clicking links on websites or typing messages, do not cause freezes, it's only those things that involve clipboard or opening of a file dialog or download window in some way, or similar things (possibly also a right click menu).

This happened somewhere since november for me too.

I'm using nvidia drivers, X, cinnamon desktop. I tried disabling hw acceleration now and will see how it goes.

I also see some posts here and there that mention disabling "accessibility.force_enabled" to fix the freezes, but that had no effect on me and seems to be for a different Windows related freeze, not Linux related.

EDIT: found various more links related to this:
https://bugs.archlinux.org/task/76669
https://gitlab.freedesktop.org/xorg/lib … issues/168
https://bbs.archlinux.org/viewtopic.php … 1#p2071061

Last edited by aardwolf (2022-12-05 15:16:37)

Offline

#5 2022-12-05 15:08:25

d.ALT
Member
Registered: 2019-05-10
Posts: 914

Re: [SOLVED] Firefox freezes frequently when copying or highlighting text

Maybe related to this?

Last edited by d.ALT (2022-12-05 15:08:36)


<49,17,III,I>    Fama di loro il mondo esser non lassa;
<50,17,III,I>    misericordia e giustizia li sdegna:
<51,17,III,I>    non ragioniam di lor, ma guarda e passa.

Offline

#6 2022-12-05 15:10:04

aardwolf
Member
From: Belgium
Registered: 2005-07-23
Posts: 304

Re: [SOLVED] Firefox freezes frequently when copying or highlighting text

Doesn't look related, it's a freeze that only happens on certain actions, randomly but not consistently

Offline

#7 2022-12-05 15:27:29

ipyakuza
Member
Registered: 2013-06-24
Posts: 44

Re: [SOLVED] Firefox freezes frequently when copying or highlighting text

Yeah I'm also not running Wayland/Xwayland.

Offline

#8 2022-12-05 15:32:08

aardwolf
Member
From: Belgium
Registered: 2005-07-23
Posts: 304

Re: [SOLVED] Firefox freezes frequently when copying or highlighting text

Seems like https://gitlab.freedesktop.org/xorg/lib … issues/168 is the place to follow for the fix, where they're testing things right now

Either temporarily installing libx11-firefox-fix from AUR, or holding out and waiting for a fix, seem to be the solutions

Offline

#9 2022-12-05 15:57:08

ipyakuza
Member
Registered: 2013-06-24
Posts: 44

Re: [SOLVED] Firefox freezes frequently when copying or highlighting text

aardwolf wrote:

Seems like https://gitlab.freedesktop.org/xorg/lib … issues/168 is the place to follow for the fix, where they're testing things right now

Either temporarily installing libx11-firefox-fix from AUR, or holding out and waiting for a fix, seem to be the solutions


Thanks, this reference to libx11 and firefox was also called out in the reddit thread linked above.  Hopefully this is the issue and we get it rolled out soon.  Amazing how crippling it is not being able to copy/paste/highlight text.  Like tip toeing on a minefield.  I might try the AUR version for now.

Offline

#10 2022-12-05 16:17:12

ipyakuza
Member
Registered: 2013-06-24
Posts: 44

Re: [SOLVED] Firefox freezes frequently when copying or highlighting text

Well I installed the libx11-firefox-fix and did a full reboot but issue still exists.  Guess I will watch the thread and wait for the fix to be merged to see if that really does resolve it or if this is a different bug.

Offline

#11 2022-12-05 16:36:32

aardwolf
Member
From: Belgium
Registered: 2005-07-23
Posts: 304

Re: [SOLVED] Firefox freezes frequently when copying or highlighting text

Thanks for trying, that's disappointing to hear! I didn't try myself yet, I wonder if there's any way to see for sure if firefox is using the fixed libx11?

Offline

#12 2022-12-05 16:46:29

seth
Member
Registered: 2012-09-03
Posts: 49,971

Re: [SOLVED] Firefox freezes frequently when copying or highlighting text

You could still try to downgrade libx11 to 1.8.1-3 to see whether it's coming from there (was updated to 1.8.2 on Nov 11, 2022 what loosely fits "about early November")

Sanity check: this is FF from the repos? No flatpack, not the developer edition?

Edit:

I wonder if there's any way to see for sure if firefox is using the fixed libx11?

After downgrading libx11 log out and back in (alternatively make sure that there's no lingering FF process - closing the last window doesn't necessarily immediately terminate the control process)

Last edited by seth (2022-12-05 16:48:57)

Online

#13 2022-12-05 17:24:30

aardwolf
Member
From: Belgium
Registered: 2005-07-23
Posts: 304

Re: [SOLVED] Firefox freezes frequently when copying or highlighting text

> Sanity check: this is FF from the repos? No flatpack, not the developer edition?

Yes in my case, latest version from pacman, 107.0.1 (64-bit)

Offline

#14 2022-12-08 18:47:02

xerxes_
Member
Registered: 2018-04-29
Posts: 662

Re: [SOLVED] Firefox freezes frequently when copying or highlighting text

I'm experiencing maybe similar freeze or maybe not. In my case I discovered that it didn't completely freeze, it just not refresh when I'm on the same desktop; if it looks like freeze I can press ctrl+tab (to switch to different tab), change to other desktop (I use i3wm which has up to 10 desktops) and when I switch back I notice Firefox changed to next tab. The same is when I want to close it: press ctrl+q, change to other desktop, back and window asking if close all tabs appears and I can close Firefox without killing it.

You can try if it freeze to you: press ctrl+tab (you must have more than 1 tab open) or ctrl+q to close Firefox, switch to different window of other application (if you have no tilling manager like i3wm - kde, gnome, xfce, etc.) or change to other vt by pressing ctrl+alt+Fn where n=1...6 and back and see if Firefox react, like in my case or it really freeze.

Another interesting question is it only happens to people with nvidia binary drivers or others with different drivers also suffer...

Last edited by xerxes_ (2022-12-08 18:49:46)

Offline

#15 2022-12-09 03:14:33

ipyakuza
Member
Registered: 2013-06-24
Posts: 44

Re: [SOLVED] Firefox freezes frequently when copying or highlighting text

seth wrote:

You could still try to downgrade libx11 to 1.8.1-3 to see whether it's coming from there (was updated to 1.8.2 on Nov 11, 2022 what loosely fits "about early November")

Sanity check: this is FF from the repos? No flatpack, not the developer edition?

Edit:

I wonder if there's any way to see for sure if firefox is using the fixed libx11?

After downgrading libx11 log out and back in (alternatively make sure that there's no lingering FF process - closing the last window doesn't necessarily immediately terminate the control process)

Yes this is just stock Firefox from the repos.

Offline

#16 2022-12-09 03:21:35

ipyakuza
Member
Registered: 2013-06-24
Posts: 44

Re: [SOLVED] Firefox freezes frequently when copying or highlighting text

xerxes_ wrote:

I'm experiencing maybe similar freeze or maybe not. In my case I discovered that it didn't completely freeze, it just not refresh when I'm on the same desktop; if it looks like freeze I can press ctrl+tab (to switch to different tab), change to other desktop (I use i3wm which has up to 10 desktops) and when I switch back I notice Firefox changed to next tab. The same is when I want to close it: press ctrl+q, change to other desktop, back and window asking if close all tabs appears and I can close Firefox without killing it.

You can try if it freeze to you: press ctrl+tab (you must have more than 1 tab open) or ctrl+q to close Firefox, switch to different window of other application (if you have no tilling manager like i3wm - kde, gnome, xfce, etc.) or change to other vt by pressing ctrl+alt+Fn where n=1...6 and back and see if Firefox react, like in my case or it really freeze.

Another interesting question is it only happens to people with nvidia binary drivers or others with different drivers also suffer...

I essentially have the same thing (i3-gaps) and 10 virtual desktops.  I keep Two firefox browsers open (each with multiple tabs open) and a VLC stream of security cameras on desktop 1 (this is on a 55" 4k Samsung TV so plenty of screen to work with).  NVIDIA 3070 EVGA.  In my case it's definitely isolated to firefox application level as other windows on that desktop continue to work without issues and I can even click on desktop 7 (where my terminals are/Alacritty in order to killall -9 firefox).  All other desktops and apps continue working without issue.  It's somehow isolated to copy+paste actions in Firefox.  I do them a lot to send messages to friends.  As for consistency and occurrence rates it's all over the place.  Sometimes it just happens after 30-60 minutes then runs fine for a bit.  Other times it's back to back hangs on copy+paste actions.

Offline

#17 2022-12-09 08:14:47

seth
Member
Registered: 2012-09-03
Posts: 49,971

Re: [SOLVED] Firefox freezes frequently when copying or highlighting text

Very, wild guess: "export GDK_CORE_DEVICE_EVENTS=1"
Did it ever happen when selecting text w/ the keyboard (eg. in an input form)?

Online

#18 2022-12-09 14:08:16

ipyakuza
Member
Registered: 2013-06-24
Posts: 44

Re: [SOLVED] Firefox freezes frequently when copying or highlighting text

I couldn't find much detail on what GDK_CORE_DEVICE_EVENTS would provide (by way of firefox)

As for selecting text with keyboard yes I tried that too as to "not upset the bug gods" holding SELECT + ARROW to highlight text and clip off tailing whitespaces from a selection and it did the same thing (froze).  Again frequency is all over the place, can't seem to pin it down to any particular conditions or uptime.  It does feel like when this bug hits it's frequent.  I do have to say the last 24 hours I haven't had a single freeze yet knock on wood.

The last change I made was the libx11-firefox-fix from AUR.  I'll have to review all the package updates the last 72 hours to see if there was one related which may have resolved this issue.

Offline

#19 2022-12-09 14:15:23

seth
Member
Registered: 2012-09-03
Posts: 49,971

Re: [SOLVED] Firefox freezes frequently when copying or highlighting text

It unfucks TK input wink
Though the problems from the xinput2 handling are typically mouse related, so if the keyboard is affected as well, it's less likely related.

Online

#20 2022-12-13 16:48:06

tomz17
Member
Registered: 2018-11-15
Posts: 6

Re: [SOLVED] Firefox freezes frequently when copying or highlighting text

Turning off hardware acceleration "fixed" this for me.  (e.g. in Settings dialog, uncheck Use recommended performance settings -> Use hardware acceleration when available).   No noticeable degradation in browser performance either, so not sure what that setting even does.

Offline

#21 2022-12-14 18:54:21

ipyakuza
Member
Registered: 2013-06-24
Posts: 44

Re: [SOLVED] Firefox freezes frequently when copying or highlighting text

tomz17 wrote:

Turning off hardware acceleration "fixed" this for me.  (e.g. in Settings dialog, uncheck Use recommended performance settings -> Use hardware acceleration when available).   No noticeable degradation in browser performance either, so not sure what that setting even does.

I'm assuming this is the nvidia-settings app for the Arch repo driver?  If so I didn't see that setting on any of the tabs.  Can you paste your ~/.nvidia-settings-rc file for reference?

Offline

#22 2022-12-14 20:05:31

seth
Member
Registered: 2012-09-03
Posts: 49,971

Re: [SOLVED] Firefox freezes frequently when copying or highlighting text

More like the FF settings.
Being able to disable "Use hardware acceleration when available" for the nvidia driver would make little sense on multiple levels.

Online

#23 2022-12-14 20:05:58

damnbug
Member
Registered: 2012-09-18
Posts: 84

Re: [SOLVED] Firefox freezes frequently when copying or highlighting text

ipyakuza wrote:
tomz17 wrote:

Turning off hardware acceleration "fixed" this for me.  (e.g. in Settings dialog, uncheck Use recommended performance settings -> Use hardware acceleration when available).   No noticeable degradation in browser performance either, so not sure what that setting even does.

I'm assuming this is the nvidia-settings app for the Arch repo driver?  If so I didn't see that setting on any of the tabs.  Can you paste your ~/.nvidia-settings-rc file for reference?

I'm pretty sure tomz17 is referring to Firefox settings:

HoKvZWF.png

Offline

#24 2022-12-16 18:23:55

xerxes_
Member
Registered: 2018-04-29
Posts: 662

Re: [SOLVED] Firefox freezes frequently when copying or highlighting text

Did you updated to Firefox 108 and does it fixed it for you?

Offline

#25 2022-12-17 15:53:00

ipyakuza
Member
Registered: 2013-06-24
Posts: 44

Re: [SOLVED] Firefox freezes frequently when copying or highlighting text

xerxes_ wrote:

Did you updated to Firefox 108 and does it fixed it for you?

I updated this morning.  Here is the official Firefox 108 fix list: https://bugzilla.mozilla.org/buglist.cg … ed&limit=0

I found 5 entries around freezing but none specific to copy/highlighting.  Given the randomness of this bug occurring I will probably know more in the next 24 hours.  It happens daily for me and when it starts it keeps occurring rapidly after which is really strange.

Offline

Board footer

Powered by FluxBB