Debian: How do I stop Firefox from lagging if on battery power?

1

I'm running Firefox ESR 68.4.1esr on a Debian 10 ("buster") x64 system. If it's relevant, the machine is a Thinkpad X1 Carbon 4th generation.

When I'm on battery power, Firefox is extremely slow to register keypresses and mouse movements and slow to open menus, new tabs, web pages, etc. It's unusable. Starting the browser in safe mode (firefox --safe-mode), a new, clean profile, and with a blank user.js file does not resolve the problem. The problem does not occur in Chromium or any other programs.

I have my CPU governors set to performance, i.e.

sudo cpupower frequency-set -g performance

and I don't see any CPU-related messages in the dmesg log. What could be causing this?

Michael A

Posted 2020-01-24T20:08:21.700

Reputation: 648

Did you check the CPU usage over time while the issue occurs? Did you make sure the frequency is actually always at 100% when using the performance governor (or whatever frequency-set does)? Do note that the CPU can go into low-power states irrespective of the frequency. – Daniel B – 2020-01-24T20:19:08.223

I have that very machine right here. Make sure BIOS, Chipset, Video and Power Drivers have been updated. There are 2020 drivers for the first two and mid-2019 drivers for the second two – John – 2020-01-24T20:30:21.870

@John Linux drivers? I use whatever kernel modules came with my backported kernel (I think it's 5.4, but I'm not in front of the machine to check) – Michael A – 2020-01-24T23:27:38.537

BIOS does not need the OS, but for the other drivers, you would need to find the Linux variant – John – 2020-01-24T23:29:05.933

@John All of the drivers on Lenovo's site are Windows-specific, which makes sense because that's the OEM OS. Was your comment meant to be Windows-specific? There are a lot of paths to take to update drivers/firmware, and it isn't clear to me how to translate those for Windows into some combination of fwupd, Intel microcode, flash-kernel, etc. on Debian. – Michael A – 2020-01-25T14:35:01.580

I was trying to see if you could get Linux drivers. Some (not all) Lenovo machines have Linux drivers – John – 2020-01-25T15:54:20.943

Did you find a solution? My ThinkPad x270 runs at 400hz when not plugged in regardless of governer. – RichieHH – 2020-02-15T09:02:13.973

@RichieHH I don't know if it's helpful for you, but I posted an answer. In my case, the problem seemed to stem from the buggy interaction between the 5.x Linux kernel and the Intel CPU/GPU. – Michael A – 2020-02-18T15:22:42.277

Answers

0

In my case, I think the problem was the 5.x Linux kernel, specifically this intel CPU/GPU bug and other related bugs. After checking dmesg, I noticed a lot of messages related to GPU hangs while using Firefox.

I had previously installed the backported kernel v5.4.0.0 immediately after installing a clean Debian 10 system.

Reverting to the kernel that comes packaged with the stable distribution (4.19.0-6) fixed the problem.

Michael A

Posted 2020-01-24T20:08:21.700

Reputation: 648