You are not logged in.
Hey there
So, as the title says, I'm experiencing high CPU usage on Firefox 64 when saving an image, from anywhere. It wouldn't be a problem if that was all it did, but it completely locks up Firefox while it's busy. At first i thought it was only from one particular site, even though I've never had issues with that site before, but now it's any site that i go to.
Started having this issue when I updated. Any ideas as to figuring out what's causing this would be much appreciated?
Last edited by anark10n (2019-01-20 12:28:56)
Offline
"when saving an image" is too generic of an error description:
- image or actually saving anything?
- saving from a link (still has to download) or the cache (you can already see the image in a tab)?
- save *where* (local disk, remote filesystem, …)?
- does it happen when attempting to show up the context menu, the save dialog or when actually writing the file?
- does saving take too much time? does it ultimately succeed?
- does it happen w/ running FF in safe mode? ("firefox -safe-mode") - ensure there's no pending, stale FF process
Offline
Yeah, i didn't know how to approach describing the issue, my bad.
- image or actually saving anything?
Haven't tried with any other type of file. Will try and report back.
- saving from a link (still has to download) or the cache (you can already see the image in a tab)?
From the cache, it it's a link, it downloads without a high CPU usage or locking up firefox.
- save *where* (local disk, remote filesystem, …)?
Saving to local disk.
- does it happen when attempting to show up the context menu, the save dialog or when actually writing the file?
Happens when it actually writing the file.
- does saving take too much time? does it ultimately succeed?
Yes it takes longer, as i can't view the download progress until it finishes, even when i have the download window open. It does succeed in the end.
- does it happen w/ running FF in safe mode? ("firefox -safe-mode") - ensure there's no pending, stale FF process
Will try this and report back.
Offline
Reporting back:
- image or actually saving anything?
It's not only images. Happens when i try with MP4s and WEBMs. Strangely enough, it didn't happen with MP3s.
- does it happen w/ running FF in safe mode? ("firefox -safe-mode") - ensure there's no pending, stale FF process
Experiencing the same issue in safe-mode.
Offline
Is it related, maybe?
https://bbs.archlinux.org/viewtopic.php?id=242827
Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !
Offline
Quite possibly, although in my case, it happens whether or not I use the keyboard or the mouse to save a file. How do i check if it's the DBUS variable to see if it's the cause of it?
Offline
If the root cause is the same, you could try to start firefox from the terminal this way:
unset DBUS_SESSION_BUS_ADDRESS ; firefoxAnd check if the slowness is fixed.
Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !
Offline
Okay so I just tried your suggestion, and no joy. Still have the same issue.
Also, unintentionally, i managed to save 2 files at the same time, and the slow down was much worse than with 1 file.
Offline
as i can't view the download progress until it finishes, even when i have the download window open
Can you otherwise still interact w/ the firefox window(s)? (Click buttons, get a context menu, stuff lika that)
Does this also happen on the lts kernel?
Offline
Are you using KDE/Plasma and do you have Baloo enabled? Just a hunch but I've seen some weirdness with it lately where it has been "blocking" and causing (either directly or indirectly) micro-freezes for 5-60 seconds. It seems to have to have something to do with indexing of so. It sees the new file and then tries to index it for some reason causing the freeze. If you have baloo you might try disabling it to test this.
Offline
as i can't view the download progress until it finishes, even when i have the download window open
Can you otherwise still interact w/ the firefox window(s)? (Click buttons, get a context menu, stuff lika that)
Does this also happen on the lts kernel?
No interactions possible with Firefox until it finishes downloading. If i have the download window open, the progress bar remains frozen until the download is done.
@davidm
I'm using Openbox 3, and nemo as the file browser.
Offline
Does this also happen on the lts kernel?
Alternatively try passing "scsi_mod.use_blk_mq=0" to the kernel and ensure the cfq scheduler is used, cat /sys/block/sda/queue/scheduler (lts should afaik still default to deadline)
Offline
seth wrote:Does this also happen on the lts kernel?
Alternatively try passing "scsi_mod.use_blk_mq=0" to the kernel and ensure the cfq scheduler is used, cat /sys/block/sda/queue/scheduler (lts should afaik still default to deadline)
Having trouble getting to the desktop on the lts kernel for some reason, will report back when i get it working.
As for the alternative, this is what i get when i run it:
sysctl: cannot stat /proc/sys/scsi_mod/use_blk_mq: No such file or directoryShould i go ahead and still change the scheduler given the error?
Offline
What's the output of
cat /sys/block/sda/queue/scheduler?
Did you try passing the parameter at boot or at runtime?
Offline
Output of cat /sys/block/sda/queue/scheduler:
[mq-deadline] kyber bfq nonePassed the parameter at runtime.
Offline
[qutoe]Passed the parameter at runtime.[/qutoe]
Not going to work (as you figured ;-) - sorry, should have mentioned that. You'd have to re-load scsi_mod which, if possible at all, will turn out being a PITA.
Offline
@anark10n: do you happen to have firefox downloads preference set to "Always ask you where to save files"? I recall seeing people reporting high CPU usage like you with that (allthough I can't remember exactly where I did, probably bugzilla). Try changing that pref and see if the issue is still showing.
Offline
@anark10n: do you happen to have firefox downloads preference set to "Always ask you where to save files"? I recall seeing people reporting high CPU usage like you with that (allthough I can't remember exactly where I did, probably bugzilla). Try changing that pref and see if the issue is still showing.
Yes, but there's no high cpu usage when firefox downloads an image that way. Only when I 'Ctrl+S' to save an image.
Edit: Also happens with 'Right click -> Save Page As...'
Last edited by anark10n (2019-01-09 18:54:38)
Offline
@anark10n: Too bad that didn't help. Not the easiest issue to debug. Bugzilla is (over)loaded with 100% CPU bugs it seems... I wonder if you considered using any of the external download managers with Firefox. Plenty of options there, and allthough I realize there's no 'best for everyone' recommendation , I have been using aria2/uget for a long time with great performance/stability gains.
Related links of interest:
* https://addons.mozilla.org/en-US/firefo … ntegration
* https://addons.mozilla.org/en-US/firefo … ntegration
Offline
Did you effectively try to go w/o the multiqueue scheduler?
Offline
Did you effectively try to go w/o the multiqueue scheduler?
Still trying that, still failing to load the scsi_mod module. Will keep trying.
In the meantime, i found that the number of files in the directory may possibly be the cause of it, as saving to an empty directory, or even one with less files, Firefox saves like normal without high CPU usage. The directory i was trying to save to contains more than 11,000 files. Could this be an issue?
Offline
Depending on what stupid kind of stuff the GUI dialog tries to do w/ all those files (from stat'ing every file to creating previews, even cached ones): of course.
Check whether that's a reliable pattern, but the best advice I can give you in this case is "then don't do this".
Do you get different file dialogs/paths for saving pages/images and links?
Offline
For the file type, no. For the the method i use, yes. Example, 'Ctrl+S' opens the path of the previous 'Ctrl+S', while 'Save Pages As ...' opens the previous path of 'Save Pages As ...'. For some reason.
What is stat'ing?
Offline
stat /bin/bash
man 2 statYes, I meant the approach (since the original claim was a difference between saving opened images and links to images - the question is whether this is because the dialog initially shows different paths)
Offline
Seth is much more experienced and he will not give you suggestions that are not related to no word you mentioned... What if you clear all firefox preferences in folder and see if that helps? backup your stuff. Hope you manage to solve that trouble
Offline