secureblue / hardened-chromium

A hardened chromium for desktop Linux inspired by Vanadium.
GNU General Public License v2.0
22 stars 5 forks source link

website hangs along with UI stuttering #30

Closed alnmy closed 1 month ago

alnmy commented 1 month ago

this website hangs after a few seconds https://account.protonvpn.com/downloads when logged in chromium UI stutters really badly when set to GTK, not so bad but still happens when using "Classic" theme using secureblue gnome hardened, issue happened even when i had no modifications to the OS version of secureblue: https://github.com/secureblue/secureblue/pkgs/container/silverblue-main-hardened/252280346?tag=9f56f2f-40

video of stuttering. it doesn't look that bad on video but having input delayed by ~0.7 seconds consistently is quite an obvious issue. https://github.com/user-attachments/assets/f0aa9ce2-e6fe-4058-a94d-f028597c76da

RKNF404 commented 1 month ago

When did the issue start? Could you also provide the version you are using? Of the browser, that is.

qoijjj commented 1 month ago

@alnmy are you able to reproduce on a userns image?

also, can you provide the output of all of the following:

cat /etc/chromium/chromium.conf sudo audit2allow -a ujust check-local-overrides

alnmy commented 1 month ago

When did the issue start? Could you also provide the version you are using? Of the browser, that is.

ever since i started using secure blue last night. 127.0.6533.88 (Official Build) hardened-chromium (64-bit)

@alnmy are you able to reproduce on a userns image?

also, can you provide the output of all of the following:

cat /etc/chromium/chromium.conf sudo audit2allow -a ujust check-local-overrides

stuttering doesn't happen on userns seemingly. protonvpn site crashes though

chromium.conf audit2allow -a ujust check-local-overrides

RKNF404 commented 1 month ago

protonvpn site crashes though

On userns images?

qoijjj commented 1 month ago

@alnmy does protonvpn still crash if you enable the v8 optimizer for protonvpn in site settings/

qoijjj commented 1 month ago

also can you screenshot chrome://gpu

alnmy commented 1 month ago

protonvpn site crashes though

On userns images?

yes

@alnmy does protonvpn still crash if you enable the v8 optimizer for protonvpn in site settings/

yes

also can you screenshot chrome://gpu

image

qoijjj commented 1 month ago

@alnmy what are the steps to replicate the crash? do you just go to protonvpn.com and the page crashes? also, what do you mean by crash?

qoijjj commented 1 month ago

wait in the original post you said "this website hangs after a few seconds" but then you said it crashes

can you clarify

alnmy commented 1 month ago

wait in the original post you said "this website hangs after a few seconds" but then you said it crashes

can you clarify

It's more so being "unresponsive". The Chromium "Pages unresponsive" prompt appears after about 30 seconds of the page hanging. The page hangs after being on it for a few seconds.

The steps to replicate the crash are to log into ProtonVPN and go to the "Downloads" page.

qoijjj commented 1 month ago

@alnmy can you start the browser using the terminal by just typing chromium-browser and copy the logs?

also can you provide rpm-ostree status and cpu/gpu info?

alnmy commented 1 month ago

For whatever reason, instead of the page going "unresponsive", the page now becomes responsive after about a minute of waiting.

image

rpm-ostree cpu: ryzen 2600 gpu: rx 6700xt

Using a profiler, it can be seen that there was a function which took about 35 seconds. image

alnmy commented 1 month ago

logs

qoijjj commented 1 month ago

@alnmy and you have the v8 optimizer enabled for account.protonvpn.com?

Also, does that site hang on regular chrome?

I remember seeing slowness on that page before, but I assumed it was just a poorly optimized page :smile:

alnmy commented 1 month ago

@alnmy and you have the v8 optimizer enabled for account.protonvpn.com?

Also, does that site hang on regular chrome?

I remember seeing slowness on that page before, but I assumed it was just a poorly optimized page 😄

V8 optimiser is enabled and I have never experienced this page hanging before.

qoijjj commented 1 month ago

@alnmy got it, I can reproduce this.

qoijjj commented 1 month ago

I've seen it mildly slow before but never like this, yeah

qoijjj commented 1 month ago

@alnmy are you able to repro on google chrome?

qoijjj commented 1 month ago

@alnmy I am able to repro but after waiting for about a minute the page becomes responsive again. is this not the case for you?

alnmy commented 1 month ago

@alnmy I am able to repro but after waiting for about a minute the page becomes responsive again. is this not the case for you?

This is the case for me aswell however yesterday Chromium gave me the "Pages unresponsive" prompt. I'm not sure what has changed since then that I no longer get it.

qoijjj commented 1 month ago

useMemo is a react hook that caches the result of expensive operations. I thought maybe the disk-cache-dir change we make was affecting this, but I overrode it with a custom disk cache dir and can still repro

qoijjj commented 1 month ago

@alnmy I think that just pops up after a certain amount of time passes waiting for a function to complete. could be a bunch of other conditions making it take a bit longer sometimes

qoijjj commented 1 month ago

like other apps running, cpu clock speed, etc

qoijjj commented 1 month ago

I wonder if it's one of these features https://github.com/secureblue/hardened-chromium/blob/master/vanadium_patches/0070-enable-split-cache-by-default.patch

if you have the google-chrome rpm or even the chromium rpm and can't repro, then you could try passing --enable-features="SplitCacheByNetworkIsolationKey"

it will be tedious but we can narrow this down :smile:

qoijjj commented 1 month ago

the thing that doesn't make sense though is that we were already enabling these features via chromium.conf in secureblue before moving to hardened-chromium

ldmitch commented 1 month ago

Can be reproduced on Safari on M1 Mac, with lockdown mode disabled. Takes ~20s after initial page load before it becomes responsive and renders the rest of the page image

qoijjj commented 1 month ago

@RKNF404 was able to repro on google chrome as well. looks like this is a Proton bug caused by a recent change on their end

@alnmy you can report it here https://proton.me/support/report-bug