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

Freeze with Qt 6.6.3 + NVidia + Wayland/wlroots #8154

Open
andyhunne opened this issue Apr 1, 2024 · 15 comments
Open

Freeze with Qt 6.6.3 + NVidia + Wayland/wlroots #8154

andyhunne opened this issue Apr 1, 2024 · 15 comments

Comments

@andyhunne
Copy link

andyhunne commented Apr 1, 2024

Version info:
qutebrowser v3.1.0
Git commit: 3d86d78 on main (2024-03-27 23:58:36 +0100)
Backend: QtWebEngine 6.6.2, based on Chromium 112.0.5615.213 (from api)
Qt: 6.6.2 (compiled 6.6.3)

CPython: 3.11.8
PyQt: 6.6.1

Qt wrapper info:
PyQt6: success
PyQt5: not imported
-> selected: PyQt6 (via autoselect)

colorama: 0.4.6
jinja2: 3.1.3
pygments: 2.17.2
yaml: 6.0.1
adblock: 0.6.0
objc: no
PyQt6.QtWebEngineCore: 6.6.0
PyQt6.sip: 6.7.12
pdf.js: 4.0.379 (/usr/share/pdf.js/build/pdf.mjs)
sqlite: 3.45.2
QtNetwork SSL: OpenSSL 3.2.1 30 Jan 2024

Style: Qt6CTProxyStyle
Platform plugin: wayland
OpenGL: OpenGL ES
Platform: Linux-6.8.2-arch2-1-x86_64-with-glibc2.39, 64bit
Linux distribution: Arch Linux (arch)
Frozen: False
Imported from /usr/lib/python3.11/site-packages/qutebrowser
Using Python from /usr/bin/python3
Qt library executable path: /usr/lib/qt6, data path: /usr/share/qt6

Paths:
cache: /home/andy/.cache/qutebrowser
config: /home/andy/.config/qutebrowser
data: /home/andy/.local/share/qutebrowser
runtime: /run/user/1000/qutebrowser
system data: /usr/share/qutebrowser

Autoconfig loaded: yes
Config.py: /home/andy/.config/qutebrowser/config.py has been loaded
Uptime: 3:29:53

I tried the *-git version of qutebrowser for initial troubleshooting. The issue is also present with the non git version, v3.1.0 from Arch repos.

Does the bug happen if you start with --temp-basedir?:
Yes

Description
Upgrading to Qt 6.6.3 causes qutebrowser to freeze & become unresonsive.

How to reproduce
Upgrade to Qt 6.6.3, and watch qutebrowser freeze for a running session, or any subsequently launched sessions.
Downgrade to Qt 6.6.2 and the problem is 'fixed'.

Apologies for the lack of further info - I needed to downgrade to get back to work. Posting this for more of a warning/caution to fellow Arch users. Please let me know any further info you'd like to assist with troubleshooting.

@andyhunne andyhunne changed the title Arch users - don't upgrade to qt6-*-6.6.* just yet. Qt 6.6.3 upgrade on Arch causes qutebrowser to become unresponsive Apr 1, 2024
@itrajkov
Copy link

itrajkov commented Apr 2, 2024

Which Qt package specifically is the cause of this? How did you find which one to downgrade?
Did you downgrade all of them? If so, how?

@lucilanga
Copy link

No issues here (~150 tabs opened):

qutebrowser v3.1.0
Git commit: 3d86d78-dirty on makepkg (2024-03-27 23:58:36 +0100)
Backend: QtWebEngine 6.6.3, based on Chromium 112.0.5615.213 (from api)
Qt: 6.6.3

...

Style: QFusionStyle
Platform plugin: wayland
OpenGL: AMD, 4.6 (Compatibility Profile) Mesa 24.0.4-arch1.2
Platform: Linux-6.8.2-arch2-1-x86_64-with-glibc2.39, 64bit
Linux distribution: Arch Linux (arch)

@andyhunne
Copy link
Author

I don't know the specific one, but my hunch was the Qt6 upgrade I'd performed earlier in the day was the cause as I've had this happen before. Previously it was qt6-webkit that was the issue. I just downgraded all of them as I was in a bit of a rush to get back to work, rebooted and it resolved.

Downgrade was done with the following procedure:
https://wiki.archlinux.org/title/downgrading_packages

And for the moment, adding the following line to /etc/pacman.conf will ignore the qt6 upgrades:
IgnoreGroup = qt6

@The-Compiler
Copy link
Member

Works fine for me too (though I only tried X11, not Wayland). I also asked in IRC, and nobody there seems to have the same issue with Qt 6.6.3, even with someone on Wayland.

@andyhunne could you see how things look if you run the testbrowser script?

@Abso793
Copy link

Abso793 commented Apr 2, 2024

Hello, I have the same issue. The browser hangs completely and i had to kill it. Didn't have the time to investigate yet. Hyprland,Wayland and Nvidia

@The-Compiler
Copy link
Member

A few questions for people who are affected:

  • Does it reproduce with the testbrowser script?
  • X11 or Wayland? If Wayland, what compositor?
  • NVidia/Intel/AMD?
  • What exactly needs to be downgraded for things to start working again? You should be able to downgrade Qt packages individually, and I'd suspect the culprit to be qt6-wayland, qt6-webengine or qt6-base (in that order).

@The-Compiler
Copy link
Member

Also, if this is NVidia specific: Long shot, but does export QT_OPENGL_NO_SANITY_CHECK=1 change anything?

If so, this is the culprit:

@LanderMoerkerke
Copy link

Hi @The-Compiler, I've debugged a little, here are my findings:

  • Only Wayland + NVIDIA seems to reproduce the issue. I've tested it via Xorg (dwm)+ Intel, Xorg (dwm) + Nvidia and both instances of Qutebrowser are working properly.
  • Setting the env var QT_OPENGL_NO_SANITY_CHECK=1 made Qutebrowser responsive so this mitigates the issue for now.
  • I couldn't downgrade the individual Qt packages since I get the following error: Cannot mix incompatible Qt library (6.6.2) with this library (6.6.3)

All observations were tested with the testbrowser script.

My version settings, currently writing this in Hyprland + Intel.

Hope this helps!

@andyhunne
Copy link
Author

@The-Compiler Will try to test later today with your suggested steps, but I did try the testbrowser script when the problem initially surfaced already, and had the same results.
FYI - Wayland, NVIDIA here, so it seems you're on the right track.

@Abso793
Copy link

Abso793 commented Apr 2, 2024

export QT_OPENGL_NO_SANITY_CHECK=1 works

@The-Compiler The-Compiler changed the title Qt 6.6.3 upgrade on Arch causes qutebrowser to become unresponsive Freeze with Qt 6.6.3 + NVidia + Wayland/wlroots Apr 2, 2024
@ionenwks
Copy link

ionenwks commented Apr 2, 2024

Originally thought it'd be wlroots-specific but I can reproduce with Gnome/mutter, Plasma 6/kwin, and Hyprland + NVIDIA (1070 card w/ 550.67 drivers), so probably safe to say it's wayland+nvidia anything.

In all 3 case QT_OPENGL_NO_SANITY_CHECK=1 indeed did the trick, fwiw it also unsurprisingly works when using xwayland (QT_QPA_PLATFORM=xcb).

That was with Qt6.6.3, but I'm going to try 6.7.0 later (need to compile webengine so it'll be some time).

@andyhunne
Copy link
Author

I can confirm this workaround (QT_OPENGL_NO_SANITY_CHECK=1) also works for me

@ionenwks
Copy link

ionenwks commented Apr 3, 2024

That was with Qt6.6.3, but I'm going to try 6.7.0 later (need to compile webengine so it'll be some time).

No issues with 6.7.0 that I could see, no workarounds needed.

Edit: haven't took time to look at the git history / bugs but kind of wish I knew what fixed it so could potentially backport in qtwayland-6.6.3 without rushing 6.7.0 to stable users in Gentoo -- albeit qtwebengine itself bumped chromium among other major changes so perhaps it just no longer cause issues rather than a fix in qtwayland

@willruggiano
Copy link
Contributor

Also, if this is NVidia specific: Long shot, but does export QT_OPENGL_NO_SANITY_CHECK=1 change anything?

If so, this is the culprit:

Same issue here, and this worked for me.

@ionenwks
Copy link

ionenwks commented Apr 22, 2024

https://bugreports.qt.io/browse/QTBUG-124174 exists now, which pretty much confirms what's already known here

Recent comments gave some insight on why 6.7.0 is fine despite qtwayland remaining unchanged in that regard, which is most likely because of qt/qtwebengine@088408f from a quick look.

So if do a qutebrowser-side workaround, it's really only needed with exactly 6.6.3 -- In Gentoo we got rid of 6.6.3 at this point so not going to worry about it though.

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

No branches or pull requests

8 participants