Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

major rendering issues on some sites with the latest webkit #1081

Open
balejk opened this issue Feb 27, 2024 · 16 comments
Open

major rendering issues on some sites with the latest webkit #1081

balejk opened this issue Feb 27, 2024 · 16 comments
Labels

Comments

@balejk
Copy link

balejk commented Feb 27, 2024

Current Behavior:

Some websites such as Github freeze upon loading -- there is no feedback from the page, it does not respond to window resize, although it seems that for example hovering over some elements does detect them.

Desired Behavior:

All sites should render properly and stay responsive.

How can we reproduce it (step by step):

Start the latest luakit with the latest webkit (2.42.5), navigate to https://github.com/luakit/luakit/issues, try to use the page. It should freeze almost immediately.

Environment:

Linux Distribution & Version: Void Linux (but others have reproduced this with other distributions too)
Output of luakit --version:

luakit 2.3.6
  built with: webkit 2.42.5 (installed version: 2.42.5)
                 GTK 3.24.38 
                GLIB 2.78.0 
                SOUP 3.4.2 

Please see the corresponding Void issue for more details.

I was unable to reproduce this issue with epiphany or the MiniBrowser bundled with webkit. According to reports, the issue does not occur with nyxt either.

Note that this issue does not occur with the latest luakit and webkit 2.40.0.

HOME=/tmp/home luakit --log=debug > debug.log 2>&1 (start luakit, navigate to luakit Github repository, fiddle around a little, quit): debug.txt

@ghost
Copy link

ghost commented Feb 28, 2024

can't reproduce the crash, but the window resize freeze does occur for me. After resizing, the parts that have not been updated yet have the default background color (grey in my case), but hovering over them does detect elements

luakit 2.3.6-15-g2f633b31
  built with: webkit 2.42.5 (installed version: 2.42.5)
                 GTK 3.24.41
                GLIB 2.78.4
                SOUP 3.4.4

@balejk
Copy link
Author

balejk commented Feb 28, 2024 via email

@ghost
Copy link

ghost commented Feb 28, 2024

must've misread freeze as crash, my bad.

but yeah, scrolling is broken too. refreshing fixes the issue though, and the page works fine again afterwards (until you resize luakit again)

@balejk
Copy link
Author

balejk commented Feb 28, 2024 via email

@jlzht
Copy link

jlzht commented Feb 28, 2024

Openning Github without a account logged dont cause this issue, is there other pages where this unresponsive behavior happens?

@balejk
Copy link
Author

balejk commented Feb 28, 2024 via email

@jlzht
Copy link

jlzht commented Feb 28, 2024

Sorry, I actually got it working using noscript module, disabling scripts on a GitHub domain in a priv-tab (no login). I also found this issue on Steam support page (logged), as for Google, searching from www.google.com breaks instantly for me. Duckduckgo sometimes behaves similarly.

Also, I dont know if this is happening only on my machine, but after the freezing, :log, :settings, :binds, etc present a blank screen and dont load.

@c0dev0id c0dev0id added the bug label Feb 29, 2024
@balejk
Copy link
Author

balejk commented Feb 29, 2024 via email

@jlzht
Copy link

jlzht commented Mar 8, 2024

By setting webview.hardware_acceleration_policy = "always", I was unable to get any error, on-demand doesnt do anything it seems, using follow still crashes git page sometimes.

luakit 2.3.6
  built with: webkit 2.42.5 (installed version: 2.42.5)
                 GTK 3.24.38 
                GLIB 2.78.0 
                SOUP 3.4.2 

@balejk
Copy link
Author

balejk commented Mar 8, 2024 via email

@jlzht
Copy link

jlzht commented Mar 8, 2024

Yeah... confirming, the rendering issues only appear when "on-demand" option is set. Running luakit with env variable WEBKIT_DISABLE_COMPOSITING_MODE=1 disables hardware acceleration altogether, also mitigating the problem. About webkit-based browsers, maybe vimb has the option to set hardware acceleration policy, Epiphany also according to arch-wiki. I cannot install these browsers on my machine at the moment to test.

Maybe someone at the void issue can also confirm this behavior in other browsers, for better upstream report.

@oreo639
Copy link

oreo639 commented Mar 9, 2024

You can't test ondemand with a modern epiphany since it uses webkitgtk-6.0, which removed the ondemand option: WebKit/WebKit@7e5444b

I tried enabling "ondemand" hardware acceleration policy in the webkit2gtk-4.1 MiniBrowser and haven't noticed any issues.
I also can't reproduce the issue in vimb, which enables ondemand by default: https://github.com/fanglingsu/vimb/blob/dd7c3a652fcdf5420c5e8ed249f260c43e400809/src/setting.c#L99
Even after doing :set hardware-acceleration-policy=ondemand, I still cannot reproduce the issue.

But, yeah, using :set webview.hardware_acceleration_policy always or :set webview.hardware_acceleration_policy never in luakit does appear to workaround the issue.

@balejk
Copy link
Author

balejk commented Mar 9, 2024 via email

@PluMGMK
Copy link
Contributor

PluMGMK commented Apr 27, 2024

Yeah... confirming, the rendering issues only appear when "on-demand" option is set. Running luakit with env variable WEBKIT_DISABLE_COMPOSITING_MODE=1 disables hardware acceleration altogether, also mitigating the problem.

Ah, thank you so much for this, I've been dealing with this problem for what feels like over a year at this point (certainly longer than this GitHub issue has been here), and setting this env variable does indeed finally fix it! :) Just recently, DuckDuckGo's results page started breaking systematically too, so things had gotten really bad…

If this is an issue with hardware acceleration getting turned on/off, is it worth people with affected/unaffected systems posting their graphics driver info? I'm using mesa with the radeonsi driver on an AMD Radeon RX 5500 XT and am affected…

@jlzht
Copy link

jlzht commented Apr 28, 2024

If you were dealing with this problem over a year, maybe it is not related with webkit version at all? I am also using mesa-radeonsi drivers, with AMD 5500U, someone with a different graphics card should check I guess.

Upon futher investigation, for me it seems the problem is with luakit itself, try experimenting this:

  • enable on-demand option.
  • open this repo issue field and see if the rendering freezes
  • try to move using HJKL, gg or GG, or click on a link.
  • Move your mouse in and out of the browser window region repeatedly.

After some delay your request will be processed and the page will be rendered with the scroll offset or new link(even follow works). you can also try openning :bookmarks or any other windows from the freezed one. I am not a proficient with lua programming, but I think the issue might be that ´"expose"´ signal not being emmited, when ´on-demand´ is activated. The freezing might be just the browser waiting for the emit signal, I am not sure.

@PluMGMK
Copy link
Contributor

PluMGMK commented Apr 28, 2024

If you were dealing with this problem over a year, maybe it is not related with webkit version at all? I am also using mesa-radeonsi drivers, with AMD 5500U, someone with a different graphics card should check I guess.

I'm pretty sure I started experiencing it after the libsoup3 changeover, which would imply a connection to newer WebKit versions. I remember being an early adopter due to following all the software in the development version of Beyond Linux from Scratch, so it might have hit me sooner than distro users. I may be misremembering though, it might only have started after a later upgrade. But it's definitely been going on for a long time…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants