Firefox slow boot time

Hi folks, sorry If if I’m in the wrong section, it’s just that maybe somebody here had similar kind of annoyance and already found the solution. An hour of gooleing around didn’t really yield any results.

I’m looking for an easy fix for slow firefox boot time. I would like to run some process in the background - similar to what chromium does. So that when I close the firefox, next time when I’m opening it again, FF started up almost immediately. When I have FF running and open another instance of it - it opens up almost immediately.

I’m not sure that it is manjaro related issue, but just in case anyone is wondering, I’m running KDE plasma.

1 Like

Perhaps: Preload - ArchWiki


Thanks very much, but that didn’t help.

What didn’t help? What did you do? It might take more than 5 minutes to see a result.

Perhaps there’s a bottleneck causing programs to launch slower than you’d like.

Please post your system info as outlined here:

The Preload. I followed the wikis instructions and even did a reboot. Same result.

 [    0.000000] Linux version 5.10.42-1-MANJARO (builduser@LEGION) (gcc
 (GCC) 11.1.0, GNU ld (GNU Binutils) 2.36.1) #1 SMP PREEMPT Thu Jun 3 
14:37:11 UTC 2021
[    0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-5.10-x86_64 root
=UUID=98ba592f-165d-4268-a9e2-d8c897fd12a7 rw resume=UUID=26739df7-fc6
9-4c40-9b45-b4e5003276d0 udev.log_priority=3
[    0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating 
point registers'
[    0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers
[    0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers
[    0.000000] x86/fpu: xstate_offset[2]:  576, xstate_sizes[2]:  256
[    0.000000] x86/fpu: Enabled xstate features 0x7, context size is 8
32 bytes, using 'standard' format.
[    0.000000] BIOS-provided physical RAM map:
[    0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009cfff] 
[    0.000000] BIOS-e820: [mem 0x000000000009d000-0x000000000009ffff] 
[    0.000000] BIOS-e820: [mem 0x00000000000e0000-0x00000000000fffff] 
[    0.000000] BIOS-e820: [mem 0x0000000000100000-0x00000000ae138fff] 
[    0.000000] BIOS-e820: [mem 0x00000000ae139000-0x00000000bb82ffff] 
[    0.000000] BIOS-e820: [mem 0x00000000bb830000-0x00000000bb87ffff] 
[    0.000000] BIOS-e820: [mem 0x00000000bb880000-0x00000000bcc73fff] 
[    0.000000] BIOS-e820: [mem 0x00000000bcc74000-0x00000000bce7efff] 
[    0.000000] BIOS-e820: [mem 0x00000000bce7f000-0x00000000bcefefff] 
ACPI data
[    0.000000] BIOS-e820: [mem 0x00000000bceff000-0x00000000bf9fffff] 
[    0.000000] BIOS-e820: [mem 0x00000000f8000000-0x00000000fbffffff] 

What command did you run to generate that output and what is it supposed to tell us?

Please post your system info:

inxy -Fazy

I’m so sorry. I ran dmesg | less - the first pinned post in the “How to provide good information” thread. Wasn’t sure myself how exactly that info supposed to help. Anyway, here’s the output you have been looking for.

Kernel: 5.10.42-1-MANJARO x86_64 bits: 64 compiler: gcc v: 11.1.0  
parameters: BOOT_IMAGE=/boot/vmlinuz-5.10-x86_64  
root=UUID=98ba592f-165d-4268-a9e2-d8c897fd12a7 rw
resume=UUID=26739df7-fc69-4c40-9b45-b4e5003276d0 udev.log_priority=3

Desktop: KDE Plasma 5.21.5 tk: Qt 5.15.2 wm: kwin_x11 vt: 1 dm: SDDM

Distro: Manjaro Linux base: Arch Linux  
Type: Laptop System: LENOVO product: 20AWS1XV00 v: ThinkPad T440p  
serial: <filter> Chassis: type: 10 serial: <filter>  
Mobo: LENOVO model: 20AWS1XV00 v: 0B98401 WIN serial: <filter>  
UEFI-[Legacy]: LENOVO v: GLETA1WW (2.55 ) date: 04/20/2020  
ID-1: BAT0 charge: 46.5 Wh (99.8%) condition: 46.6/56.2 Wh (83.0%)  
volts: 12.4 min: 10.8 model: LGC 45N1147 type: Li-ion serial: <filte
status: Unknown  
Info: Quad Core model: Intel Core i7-4712MQ bits: 64 type: MT MCP  
arch: Haswell family: 6 model-id: 3C (60) stepping: 3 microcode: 28
L2: 6 MiB  
flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx  
bogomips: 36732  
Speed: 3126 MHz min/max: 800/3300 MHz Core speeds (MHz): 1: 3126 2:
3: 2994 4: 2998 5: 3070 6: 3276 7: 2994 8: 2998  
Vulnerabilities: Type: itlb_multihit status: KVM: VMX disabled  
Type: l1tf  
mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulne
Type: mds mitigation: Clear CPU buffers; SMT vulnerable  
Type: meltdown mitigation: PTI  
Type: spec_store_bypass  
mitigation: Speculative Store Bypass disabled via prctl and seccomp  
Type: spectre_v1  
mitigation: usercopy/swapgs barriers and __user pointer sanitization

Type: spectre_v2 mitigation: Full generic retpoline, IBPB: condition
IBRS_FW, STIBP: conditional, RSB filling
Type: srbds mitigation: Microcode  
Type: tsx_async_abort status: Not affected  
Device-1: Intel 4th Gen Core Processor Integrated Graphics  
vendor: Lenovo ThinkPad T440p driver: i915 v: kernel bus-ID: 00:02.0

chip-ID: 8086:0416 class-ID: 0300  
Display: x11 server: X.Org 1.20.11 compositor: kwin_x11 driver:  
loaded: intel display-ID: :0 screens: 1  
Screen-1: 0 s-res: 3520x1232 s-dpi: 96 s-size: 928x325mm (36.5x12.8"
s-diag: 983mm (38.7")  
OpenGL: renderer: Mesa DRI Intel HD Graphics 4600 (HSW GT2)  
v: 4.5 Mesa 21.1.2 compat-v: 3.0 direct render: Yes  
Device-1: Intel Xeon E3-1200 v3/4th Gen Core Processor HD Audio  
vendor: Lenovo ThinkPad T440p driver: snd_hda_intel v: kernel  
bus-ID: 00:03.0 chip-ID: 8086:0c0c class-ID: 0403  
Device-2: Intel 8 Series/C220 Series High Definition Audio  
vendor: Lenovo ThinkPad T440p driver: snd_hda_intel v: kernel  
bus-ID: 00:1b.0 chip-ID: 8086:8c20 class-ID: 0403  
Sound Server-1: ALSA v: k5.10.42-1-MANJARO running: yes  
Sound Server-2: JACK v: 0.125.0 running: no  
Sound Server-3: PulseAudio v: 14.2 running: yes  
Sound Server-4: PipeWire v: 0.3.30 running: yes  
Device-1: Intel Ethernet I217-LM vendor: Lenovo ThinkPad T440p  
driver: e1000e v: kernel port: 3080 bus-ID: 00:19.0 chip-ID: 8086:15
class-ID: 0200  
IF: enp0s25 state: up speed: 1000 Mbps duplex: full mac: <filter>  
Device-2: Intel Wireless 7260 driver: iwlwifi v: kernel port: efa0  
bus-ID: 03:00.0 chip-ID: 8086:08b2 class-ID: 0280  
IF: wlp3s0 state: down mac: <filter>  
Device-1: Intel Bluetooth wireless interface type: USB driver: btusb
v: 0.8  
bus-ID: 2-11:3 chip-ID: 8087:07dc class-ID: e001  
Report: rfkill ID: hci0 rfk-id: 2 state: up address: see --recommend
Local Storage: total: 223.57 GiB used: 96.52 GiB (43.2%)  
SMART Message: Unable to run smartctl. Root privileges required.  
ID-1: /dev/sda maj-min: 8:0 vendor: SanDisk model: SDSSDA240G  
size: 223.57 GiB block-size: physical: 512 B logical: 512 B speed: 6
.0 Gb/s
rotation: SSD serial: <filter> rev: 00RL scheme: MBR  
ID-1: / raw-size: 206.7 GiB size: 202.4 GiB (97.92%) used: 96.52 GiB
fs: ext4 dev: /dev/sda1 maj-min: 8:1  
Kernel: swappiness: 60 (default) cache-pressure: 100 (default)  
ID-1: swap-1 type: partition size: 16.87 GiB used: 0 KiB (0.0%) prio
rity: -2                                                               
dev: /dev/sda2 maj-min: 8:2  
System Temperatures: cpu: 79.0 C mobo: 0.0 C  
Fan Speeds (RPM): cpu: 4172  
Processes: 236 Uptime: 55m wakeups: 1 Memory: 15.33 GiB  
used: 2.14 GiB (13.9%) Init: systemd v: 248 tool: systemctl Compiler
gcc: 11.1.0 clang: 12.0.0 Packages: pacman: 1202 lib: 330 Shell: Bas
v: 5.1.8 running-in: konsole inxi: 3.3.04

You’ve got 16GB RAM and an SSD, there’s no reason why Firefox should be starting slow. Perhaps test with a new profile.

Try with a clean profile and no active extensions. Most FF issues are the result of a corrupted profile.

Thanks guys, I already tried that before creating this thread. Sorry for not mentioning it in OP. Same kind of issue. Well, not an issue really, more of an annoyance. Chromium runs something in the background and because of that opens almost immediately but Firefox does not have a daemon or anything, so first instance takes around 4-5 seconds but every other instance starts almost immediately, even faster than Chromium. So I was hoping, that maybe I can tweak FF’s about:config somehow or something quick like that.

I also cleared startup cache. Clean install of FF DE behaves in a same manner.

Chromium doesn’t run anything in the background by default unless you changed something. I think you’ll get more help by providing info about startup times for a new clean profile compared to chromium. Or what about installing nightly to see if it makes any difference?

What do you get for about:telemetry → Simple Measurements → firstPaint

Tried FF nightly - same behavior.
In chromium settings I have “Continue running background apps when Chromium is closed” ticked on - that’s why I thought that it’s running some daemon for faster start up.

firstPaint2 2583
firstPaint 3210

not sure this still works but if you want to try.
open about:profiles
note root directory: your going to want to copy & paste the path later.
go into your autostart/startup app, depends on your desktop your using.
firefox --headless -P /the/profile/path

for example i use sway, so mine looks like this to autostart apps.

Thanks a lot man, that’s a beautiful WM you have there.

I couldn’t find such folder in my DE (KDE), I think that I have to create .desktop file and place it here /usr/share/applications .

I tried running this command in terminal and got an error:

exec firefox --headless -P /home/god/.mozilla/firefox/g49zs465.default-release
*** You are running in headless mode.
[GFX1-]: RenderCompositorSWGL failed mapping default framebuffer, no dt
Warning: Program ‘/bin/bash’ crashed.

But thanks for the effort, I really appreciate it.

Could be I screwed it up? Anyone know is there a different folder or maybe I have to create .desktop file from scratch by following KDE guide and add it through GUI “Autostart”?

okay, kde it is.
open your file manager(dolphin?), press ctrl+h to show hidden.
go .config-> autostart(create if not there)
right click-> new file-> rename-> firefox.desktop
open in your text editor
[Desktop Entry]
Exec=firefox --headless -P /home/god/.mozilla/firefox/g49zs465.default-release

then save.

I look at the TO’s Lenovo T440s and mine, both under KDE.
T440s of the TO with i7 and 16GB RAM:
Speed: 3126 MHz
System temperature: cpu: 79.0
Fan speeds (RPM): cpu: 4172

My values T440s i5 with 16GB RAM when calling this forum with firefox:
Speed: 1198 MHz
System temperature: cpu: 47.0
Fan speeds (RPM): cpu: 0

Could this also indicate that there is another application running in the background outside of Firefox, which makes the CPU sweat and the fan roar?

Thank you very much for step by step instruction, you are amazing! I followed it precisely but it did not help, sadly.

not much you can do to start firefox faster.
it is what it is, i didn’t think it was that bad, 6 bounces of the firefox icon seems pretty decent to me on my rpi4 4gb.
i just loaded a fresh copy of kde on to a sd card, i have it on usb but it was getting to hot, i don’t have a fan on my rpi4.

anyways i’ll boot up kde in a bit & have a look around some more.

Wow. You are an absolute legend! Thank you so much.

I think manfrago might be on the right track. Firstpaint should be less than a second with your specs. In sysguard, do you see any other processes with high CPU usage?