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

[21.11] webkitgtk: disable hardware acceleration #169058

Closed
wants to merge 1 commit into from

Conversation

blitz
Copy link
Contributor

@blitz blitz commented Apr 17, 2022

Description of changes

Since the update to webkitgtk 2.36 in #167920, webkitgtk enables hardware acceleration by default. This fully breaks GNOME Evolution for me, because the email compose window becomes unusable.

There is a workaround by setting WEBKIT_DISABLE_COMPOSITING_MODE=1, but I assume that other apps that use webkit are also affected. So this PR reverts webkit back to its 2.34 behavior of not using hardware acceleration by default.

Fixes #168645. Relates to #168532.

Marked as draft until my builds complete.

@NixOS/gnome

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.05 Release Notes (or backporting 21.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@hmenke
Copy link
Member

hmenke commented Apr 17, 2022

Wouldn't a patch like this be much more idiomatic?

diff --git a/Source/WebKit/UIProcess/gtk/HardwareAccelerationManager.cpp b/Source/WebKit/UIProcess/gtk/HardwareAccelerationManager.cpp
index 8f10c7e6..9c827a4d 100644
--- a/Source/WebKit/UIProcess/gtk/HardwareAccelerationManager.cpp
+++ b/Source/WebKit/UIProcess/gtk/HardwareAccelerationManager.cpp
@@ -38,7 +38,7 @@ HardwareAccelerationManager& HardwareAccelerationManager::singleton()
 }
 
 HardwareAccelerationManager::HardwareAccelerationManager()
-    : m_canUseHardwareAcceleration(true)
+    : m_canUseHardwareAcceleration(false)
     , m_forceHardwareAcceleration(false)
 {
 #if !ENABLE(WEBGL)

Since the update to 2.36, webkitgtk enables hardware acceleration by
default. This causes problems in applications like Evolution on
specific hardware platforms (Intel Tiger Lake), where HTML views
become empty grey panes.
@blitz blitz force-pushed the webkitgtk-rendering-issue branch from 61e045d to 6bee055 Compare April 17, 2022 15:10
@blitz
Copy link
Contributor Author

blitz commented Apr 17, 2022

Wouldn't a patch like this be much more idiomatic?

True. I've updated the patch. I modified the getenv line earlier, because it seemed easier to review for people unfamiliar with C++.

Copy link
Member

@hmenke hmenke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works fine.

Screenshot from 2022-04-17 18-30-47

@hmenke
Copy link
Member

hmenke commented Apr 17, 2022

Result of nixpkgs-review pr 169058 run on x86_64-linux 1

2 packages marked as broken and skipped:
  • gnome.gnome-documents
  • xmonad_log_applet
209 packages failed to build:
  • ChowKick
  • adapta-gtk-theme
  • alfis
  • almanah
  • apostrophe
  • astroid
  • aws-workspaces
  • balsa
  • bespokesynth
  • birdfont
  • bookworm
  • bubblemail
  • calls
  • chatty
  • chrome-gnome-shell
  • cinnamon.cinnamon-common
  • cinnamon.cinnamon-control-center
  • cinnamon.cinnamon-gsettings-overrides
  • cinnamon.cinnamon-screensaver
  • citrix_workspace (citrix_workspace_21_09_0)
  • citrix_workspace_20_04_0
  • citrix_workspace_20_06_0
  • citrix_workspace_20_09_0
  • citrix_workspace_20_10_0
  • citrix_workspace_20_12_0
  • citrix_workspace_21_01_0
  • citrix_workspace_21_03_0
  • citrix_workspace_21_06_0
  • citrix_workspace_21_08_0
  • claws-mail
  • cog
  • dbeaver
  • dropbox-cli
  • eclipse-mat
  • eclipses.eclipse-committers
  • eclipses.eclipse-cpp
  • eclipses.eclipse-java
  • eclipses.eclipse-jee
  • eclipses.eclipse-modeling
  • eclipses.eclipse-platform
  • eclipses.eclipse-rcp
  • eclipses.eclipse-scala-sdk
  • eclipses.eclipse-sdk
  • elementary-planner
  • empathy (gnome.empathy)
  • eolie
  • ephemeral
  • epiphany (gnome.epiphany)
  • evolution-ews
  • evolutionWithPlugins
  • feedreader
  • foliate
  • folks (gnome.folks)
  • font-manager
  • formiko
  • gfbgraph (gnome.gfbgraph)
  • giara
  • glade (gnome.glade)
  • gnome-builder
  • gnome-feeds
  • gnome-inform7
  • gnome-photos (gnome.gnome-photos)
  • gnome-recipes
  • gnome.bijiben (gnome.gnome-notes)
  • gnome.cheese
  • gnome.devhelp
  • gnome.file-roller
  • gnome.geary
  • gnome.gnome-applets
  • gnome.gnome-books
  • gnome.gnome-boxes
  • gnome.gnome-calendar
  • gnome.gnome-contacts
  • gnome.gnome-control-center (gnome.gnome_control_center)
  • gnome.gnome-flashback
  • gnome.gnome-initial-setup
  • gnome.gnome-maps
  • gnome.gnome-music
  • gnome.gnome-online-miners
  • gnome.gnome-panel
  • gnome.gnome-session (gnome.gnome_session)
  • gnome.gnome-shell (gnome.gnome_shell)
  • gnome.gnome-terminal (gnome.gnome_terminal)
  • gnome.gnome-todo
  • gnome.gnome-tweaks (gnome.gnome-tweak-tool)
  • gnome.gnome-user-share
  • grilo-plugins (gnome.grilo-plugins)
  • gnome.gvfs
  • libgepub (gnome.libgepub)
  • libzapojit (gnome.libzapojit)
  • gnome.nautilus
  • gnome.nautilus-python
  • gnome.polari
  • shotwell (gnome.shotwell)
  • gnome.sushi
  • gnome.totem
  • tracker-miners (gnome.tracker-miners)
  • yelp (gnome.yelp)
  • gnomeExtensions.easyScreenCast
  • gnomeExtensions.gsconnect
  • gnomeExtensions.night-theme-switcher
  • gnucash
  • gnunet-gtk
  • gnvim
  • gnvim-unwrapped
  • gthumb
  • haskellPackages.ghcjs-dom-hello
  • haskellPackages.gi-javascriptcore
  • haskellPackages.gi-webkit2
  • haskellPackages.gi-webkit2webextension
  • haskellPackages.jsaddle-webkit2gtk
  • haskellPackages.reflex-dom
  • haskellPackages.reflex-dom-fragment-shader-canvas
  • haskellPackages.reflex-localize-dom
  • haskellPackages.webkit2gtk3-javascriptcore
  • jami-client-gnome
  • kgx
  • kicad-small
  • kicad-unstable-small
  • kotatogram-desktop
  • liferea
  • lispPackages.cl-webkit2
  • lispPackages.nyxt
  • luakit
  • lutris
  • lutris-free
  • lutris-unwrapped
  • mailnagWithPlugins
  • marker
  • mate.atril
  • mate.mate-user-guide
  • mavproxy
  • meteo
  • midori-unwrapped
  • mmex
  • nasc
  • newsflash
  • notes-up
  • nyxt
  • onboard
  • osmo
  • pantheon.elementary-calendar
  • pantheon.elementary-capnet-assist
  • pantheon.elementary-code
  • pantheon.elementary-greeter
  • pantheon.elementary-gsettings-schemas
  • pantheon.elementary-mail
  • pantheon.elementary-photos
  • pantheon.elementary-session-settings
  • pantheon.elementary-tasks
  • pantheon.epiphany
  • pantheon.extra-elementary-contracts
  • pantheon.file-roller
  • pantheon.notes-up
  • pantheon.switchboard-plug-a11y
  • pantheon.switchboard-plug-keyboard
  • pantheon.switchboard-plug-onlineaccounts
  • pantheon.switchboard-with-plugs
  • pantheon.wingpanel-applications-menu
  • pantheon.wingpanel-indicator-datetime
  • pantheon.wingpanel-with-indicators
  • pdfpc
  • phosh
  • playonlinux
  • poedit
  • portfolio
  • printrun
  • protonvpn-gui
  • python38Packages.humblewx
  • python38Packages.kicad
  • python38Packages.wxPython_4_0
  • python38Packages.wxPython_4_1
  • python39Packages.humblewx
  • python39Packages.kicad
  • python39Packages.wxPython_4_0
  • python39Packages.wxPython_4_1
  • pytrainer
  • quisk
  • quodlibet
  • quodlibet-full
  • quodlibet-without-gst-plugins
  • quodlibet-xine
  • quodlibet-xine-full
  • rednotebook
  • remmina
  • rymcast
  • setzer
  • skytemple
  • sparkleshare
  • surf
  • surf-display
  • synology-drive
  • tangram
  • tdesktop
  • thiefmd
  • timeline
  • tonelib-zoom
  • tunefish
  • ulauncher
  • vala-language-server
  • vimb-unwrapped
  • vimix-gtk-themes
  • vocal
  • webkit2-sharp
  • webkitgtk_4_1
  • whatsapp-for-linux
  • whitesur-gtk-theme
  • wike
  • xiphos
5 packages built:
  • evolution
  • evolution-data-server (gnome.evolution-data-server ,gnome.evolution_data_server)
  • gnome-online-accounts (gnome.gnome-online-accounts ,gnome.gnome_online_accounts)
  • libgdata (gnome.libgdata)
  • webkitgtk (gnome.webkitgtk)

@hmenke
Copy link
Member

hmenke commented Apr 17, 2022

Hm, that's weird. @Mic92 Version: /nix/store/4dm8ra2zipr58x4q8c59pgd6xv6q5bbd-nixpkgs-review-2.6.4

$ nix-shell -p nixpkgs-review --run "nixpkgs-review pr 169058"
$ git -c fetch.prune=false fetch --no-tags --force https://github.com/NixOS/nixpkgs release-21.11:refs/nixpkgs-review/0 pull/169058/head:refs/nixpkgs-review/1
$ git worktree add /home/henri/.cache/nixpkgs-review/pr-169058-1/nixpkgs c093b038d8df8bfcec81d62219b093440adf3e53
Preparing worktree (detached HEAD c093b038d8d)
Updating files: 100% (29052/29052), done.
HEAD is now at c093b038d8d Merge pull request #168903 from NixOS/backport-168855-to-release-21.11
$ git merge --no-commit --no-ff 6bee0550531bf20a7e291393ded04402c3808b30
Automatic merge went well; stopped before committing as requested
$ nix --experimental-features nix-command build --no-link --keep-going --option build-use-sandbox relaxed -f /home/henri/.cache/nixpkgs-review/pr-169058-1/build.nix
error: attribute 'bijiben' missing

       at /home/henri/.cache/nixpkgs-review/pr-169058-1/build.nix:71:9:

           70|         gnome-recipes
           71|         gnome."bijiben"
             |         ^
           72|         gnome."cheese"
(use '--show-trace' to show detailed location information)

Anyway, not related to this PR.

@blitz blitz marked this pull request as ready for review April 17, 2022 18:17
@blitz blitz requested a review from jonringer as a code owner April 17, 2022 18:17
@hmenke
Copy link
Member

hmenke commented Apr 17, 2022

Result of nixpkgs-review pr 169058 run on x86_64-linux 1

2 packages marked as broken and skipped:
  • gnome.gnome-documents
  • xmonad_log_applet
16 packages failed to build:
  • citrix_workspace (citrix_workspace_21_09_0)
  • citrix_workspace_20_04_0
  • citrix_workspace_20_06_0
  • citrix_workspace_20_09_0
  • citrix_workspace_20_10_0
  • citrix_workspace_20_12_0
  • citrix_workspace_21_01_0
  • citrix_workspace_21_03_0
  • citrix_workspace_21_06_0
  • citrix_workspace_21_08_0
  • quodlibet
  • quodlibet-full
  • quodlibet-without-gst-plugins
  • quodlibet-xine
  • quodlibet-xine-full
  • xiphos
198 packages built:
  • ChowKick
  • adapta-gtk-theme
  • alfis
  • almanah
  • apostrophe
  • astroid
  • aws-workspaces
  • balsa
  • bespokesynth
  • birdfont
  • bookworm
  • bubblemail
  • calls
  • chatty
  • chrome-gnome-shell
  • cinnamon.cinnamon-common
  • cinnamon.cinnamon-control-center
  • cinnamon.cinnamon-gsettings-overrides
  • cinnamon.cinnamon-screensaver
  • claws-mail
  • cog
  • dbeaver
  • dropbox-cli
  • eclipse-mat
  • eclipses.eclipse-committers
  • eclipses.eclipse-cpp
  • eclipses.eclipse-java
  • eclipses.eclipse-jee
  • eclipses.eclipse-modeling
  • eclipses.eclipse-platform
  • eclipses.eclipse-rcp
  • eclipses.eclipse-scala-sdk
  • eclipses.eclipse-sdk
  • elementary-planner
  • empathy (gnome.empathy)
  • eolie
  • ephemeral
  • epiphany (gnome.epiphany)
  • evolution
  • evolution-data-server (gnome.evolution-data-server ,gnome.evolution_data_server)
  • evolution-ews
  • evolutionWithPlugins
  • feedreader
  • foliate
  • folks (gnome.folks)
  • font-manager
  • formiko
  • gfbgraph (gnome.gfbgraph)
  • giara
  • glade (gnome.glade)
  • gnome-builder
  • gnome-feeds
  • gnome-inform7
  • gnome-online-accounts (gnome.gnome-online-accounts ,gnome.gnome_online_accounts)
  • gnome-photos (gnome.gnome-photos)
  • gnome-recipes
  • gnome.bijiben (gnome.gnome-notes)
  • gnome.cheese
  • gnome.devhelp
  • gnome.file-roller
  • gnome.geary
  • gnome.gnome-applets
  • gnome.gnome-books
  • gnome.gnome-boxes
  • gnome.gnome-calendar
  • gnome.gnome-contacts
  • gnome.gnome-control-center (gnome.gnome_control_center)
  • gnome.gnome-flashback
  • gnome.gnome-initial-setup
  • gnome.gnome-maps
  • gnome.gnome-music
  • gnome.gnome-online-miners
  • gnome.gnome-panel
  • gnome.gnome-session (gnome.gnome_session)
  • gnome.gnome-shell (gnome.gnome_shell)
  • gnome.gnome-terminal (gnome.gnome_terminal)
  • gnome.gnome-todo
  • gnome.gnome-tweaks (gnome.gnome-tweak-tool)
  • gnome.gnome-user-share
  • grilo-plugins (gnome.grilo-plugins)
  • gnome.gvfs
  • libgdata (gnome.libgdata)
  • libgepub (gnome.libgepub)
  • libzapojit (gnome.libzapojit)
  • gnome.nautilus
  • gnome.nautilus-python
  • gnome.polari
  • shotwell (gnome.shotwell)
  • gnome.sushi
  • gnome.totem
  • tracker-miners (gnome.tracker-miners)
  • webkitgtk (gnome.webkitgtk)
  • yelp (gnome.yelp)
  • gnomeExtensions.easyScreenCast
  • gnomeExtensions.gsconnect
  • gnomeExtensions.night-theme-switcher
  • gnucash
  • gnunet-gtk
  • gnvim
  • gnvim-unwrapped
  • gthumb
  • haskellPackages.ghcjs-dom-hello
  • haskellPackages.gi-javascriptcore
  • haskellPackages.gi-webkit2
  • haskellPackages.gi-webkit2webextension
  • haskellPackages.jsaddle-webkit2gtk
  • haskellPackages.reflex-dom
  • haskellPackages.reflex-dom-fragment-shader-canvas
  • haskellPackages.reflex-localize-dom
  • haskellPackages.webkit2gtk3-javascriptcore
  • jami-client-gnome
  • kgx
  • kicad-small
  • kicad-unstable-small
  • kotatogram-desktop
  • liferea
  • lispPackages.cl-webkit2
  • lispPackages.nyxt
  • luakit
  • lutris
  • lutris-free
  • lutris-unwrapped
  • mailnagWithPlugins
  • marker
  • mate.atril
  • mate.mate-user-guide
  • mavproxy
  • meteo
  • midori-unwrapped
  • mmex
  • nasc
  • newsflash
  • notes-up
  • nyxt
  • onboard
  • osmo
  • pantheon.elementary-calendar
  • pantheon.elementary-capnet-assist
  • pantheon.elementary-code
  • pantheon.elementary-greeter
  • pantheon.elementary-gsettings-schemas
  • pantheon.elementary-mail
  • pantheon.elementary-photos
  • pantheon.elementary-session-settings
  • pantheon.elementary-tasks
  • pantheon.epiphany
  • pantheon.extra-elementary-contracts
  • pantheon.file-roller
  • pantheon.notes-up
  • pantheon.switchboard-plug-a11y
  • pantheon.switchboard-plug-keyboard
  • pantheon.switchboard-plug-onlineaccounts
  • pantheon.switchboard-with-plugs
  • pantheon.wingpanel-applications-menu
  • pantheon.wingpanel-indicator-datetime
  • pantheon.wingpanel-with-indicators
  • pdfpc
  • phosh
  • playonlinux
  • poedit
  • portfolio
  • printrun
  • protonvpn-gui
  • python38Packages.humblewx
  • python38Packages.kicad
  • python38Packages.wxPython_4_0
  • python38Packages.wxPython_4_1
  • python39Packages.humblewx
  • python39Packages.kicad
  • python39Packages.wxPython_4_0
  • python39Packages.wxPython_4_1
  • pytrainer
  • quisk
  • rednotebook
  • remmina
  • rymcast
  • setzer
  • skytemple
  • sparkleshare
  • surf
  • surf-display
  • synology-drive
  • tangram
  • tdesktop
  • thiefmd
  • timeline
  • tonelib-zoom
  • tunefish
  • ulauncher
  • vala-language-server
  • vimb-unwrapped
  • vimix-gtk-themes
  • vocal
  • webkit2-sharp
  • webkitgtk_4_1
  • whatsapp-for-linux
  • whitesur-gtk-theme
  • wike

@jtojnar
Copy link
Member

jtojnar commented Apr 18, 2022

I am pretty sure hardware acceleration was always on on supported hardware, hence the various bug reports about it. Since disabling it will likely have significant impact on performance e.g. for people using Epiphany web browser, I would rather go with some less invasive method.

@blitz
Copy link
Contributor Author

blitz commented Apr 18, 2022

I am pretty sure hardware acceleration was always on on supported hardware, hence the various bug reports about it. Since disabling it will likely have significant impact on performance e.g. for people using Epiphany web browser, I would rather go with some less invasive method.

Fair point. What about wrapping evolution with WEBKIT_DISABLE_COMPOSITING_MODE=1?

@blitz
Copy link
Contributor Author

blitz commented Apr 18, 2022

Closing in favor of #169170.

@blitz blitz closed this Apr 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants