NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
16.71k stars 13.15k forks source link

[WebkitGTK/NVIDIA] Epiphany sometimes doesn't display websites #32580

Open etu opened 6 years ago

etu commented 6 years ago

Issue description

I'm on Gnome 3.26, and I manage to get gray areas with Epiphany on several websites I've tried. Not all of them though... Some of them are even hosted on the same server where one works and one doesn't. They have the same TLS configuration. And content seemed to be fetched since I can do Ctrl+a Ctrl+c and paste the content somewhere else.

This issue is mentioned here: https://github.com/NixOS/nixpkgs/pull/31407#issuecomment-343548520

What's annoying is that it's not just Epiphany, it's also Gnome Settings for adding online accounts.

Steps to reproduce

I don't know how to reproduce this. It works on my two laptops but not my desktop with more or less only hardware differences and some difference in installed software. The main hardware difference is that my desktop is Nvidia with the blob, the laptops is intel.

Technical details

cc @jtojnar

jtojnar commented 6 years ago

Maybe this bug? Could you try running env WEBKIT_DISABLE_COMPOSITING_MODE=1 epiphany?

etu commented 6 years ago

Yes, that did work.

This also did work env WEBKIT_DISABLE_COMPOSITING_MODE=1 gnome-control-center online-accounts just for reference if people needs it.

And, I do not have a hybrid thingy with intel/nvidia bumblebee. I have a stationary computer with built in intel and a separate nvidia-card.

jtojnar commented 6 years ago

Either the upstream bug is not limited to hybrid graphics, or it is a separate but similar upstream issue. Could you try commenting on the WebKit bug tracker?

Personally, I am unable to reproduce it, since nvidia drivers do not work on my laptop at all.

etu commented 6 years ago

I've made a comment there that showed some examples of pages that are broken, which card I have, which drivers I'm running and so on. So yeah, seems like an upstream issue.

I will dig into this to see if arch has the same issue, I can probably ask some friend on nvidia on arch if they have seen this.

etu commented 6 years ago

So, I was told to make a new issue because they thought it was unrelated.

Link to it here: https://bugs.webkit.org/show_bug.cgi?id=180739

etu commented 6 years ago

@vcunat Hey, you mentioned this issue here https://github.com/NixOS/nixpkgs/pull/31407#issuecomment-343548520, do you happen to have a setup with NVIDIA on your system?

Maybe you as well can leave a comment on the webkit tracker if you have any more information.

vcunat commented 6 years ago

Yes, that was either "nvidia" or "noveau", not sure what was at that moment (but certainly not hybrid setup).

etu commented 6 years ago

I've just tried this on my system with nouveau and was unable to reproduce it. I've talked to an ex-college of mine who runs Archlinux with gnome3 on nvidia and it works for him, so I asked him for what versions of webkitgtk and nvidia he's running.

On NixOS we're on 387.22 of Nvidia, Arch is on 387.34. I'm working on testing 387.34 at the moment.

Edit: And it did not resolve this issue :/

sheyll commented 5 years ago

Nix-noob here, is it somehow possible to set up the WEBKIT_DISABLE_COMPOSITING_MODE=1 variable system-wide automatically?

jtojnar commented 5 years ago

@sheyll Sure, just add environment.variables.WEBKIT_DISABLE_COMPOSITING_MODE = 1; to your configuration.nix.

sheyll commented 5 years ago

Thanks so much! This works, I only had to add double quotes:

{
environment.variables.WEBKIT_DISABLE_COMPOSITING_MODE = "1";
}
brainrake commented 5 years ago

Looks like the above solves this issue. Can we close it? Thanks.

etu commented 5 years ago

Looks like the above solves this issue. Can we close it? Thanks.

@brainrape: How would a workaround that (probably) makes the performance worse that isn't default set be a "solution"? The bug is still there. I'm not sure we can do anything about it.

But I don't think that this issue should be closed because when people have problems and look for issues. They don't look for closed issues. Because closed issues have been properly resolved. Which isn't the case here.

brainrake commented 5 years ago

I see what you mean, thanks. I meant there is an upstream issue for the bug (making this a duplicate), and there is a workaround. Can we improve the situation by setting WEBKIT_DISABLE_COMPOSITING_MODE=1 in the affected packages, when running on nvidia, until it's fixed upstream? I'd be happy to prepare a PR.

calbrecht commented 4 years ago

Sort of the same problem here. epiphany starts, shows a blank white page, and as soon as the rendering of the browsed webpage starts, shows the dark-theme gray background (if dark theme is enabled). Output on terminal, where i started epiphany with

% nix-shell -p epiphany --run epiphany
** (epiphany:1574): WARNING **: 17:42:14.258: Failed to search secrets in password schema: The name org.freedesktop.secrets was not provided by any .service files
Cannot create EGL context: invalid display (last error: EGL_SUCCESS)
Cannot get default EGL display: EGL_BAD_PARAMETER

% hwinfo --gfx #excerpt
  Model: "Intel Skylake GT2 [HD Graphics 520]"
  Vendor: pci 0x8086 "Intel Corporation"
  Device: pci 0x1916 "Skylake GT2 [HD Graphics 520]"

% nix-info -m
 - system: `"x86_64-linux"`
 - host os: `Linux 5.6.8, NixOS, 20.09.git.06bed535690M (Nightingale)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.3.4`
 - nixpkgs: `/home/alab/ws/nixpkgs`

Maybe this is as simple as this thing is missing libGL, libEGL or so, i don't know.

-- edit Forgot to mention i am on swaym wayland

terlar commented 4 years ago

Same for me on gnome wayland, exact same graphics spec as @calbrecht.

srid commented 3 years ago

Happens on Gnome wayland, nixos-unstable.

  Model: "Intel UHD Graphics"
  Vendor: pci 0x8086 "Intel Corporation"
  Device: pci 0x9b41 "UHD Graphics"
$ nix-info -m
 - system: `"x86_64-linux"`
 - host os: `Linux 5.9.0-rc5, NixOS, 21.03pre244365.06b27898a45 (Okapi)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.3.7`
 - channels(root): `"nixos-21.03pre244365.06b27898a45, home-manager, nixos-hardware"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
austinbutler commented 3 years ago

Also getting the blank screen on hangouts.google.com and messenger.com. env WEBKIT_DISABLE_COMPOSITING_MODE=1 epiphany works.

❯ lspci | grep -i graphics
00:02.0 VGA compatible controller: Intel Corporation Skylake GT2 [HD Graphics 520] (rev 07)
❯ nix-info -m                                   
 - system: `"x86_64-linux"`
 - host os: `Linux 5.8.14, NixOS, 21.03pre246543.24c9b05ac53 (Okapi)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.3.7`
 - channels(root): `"nixos-21.03pre246543.24c9b05ac53, home-manager"`
 - channels(austin): `"home-manager"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
❯ epiphany                                      
Cannot get default EGL display: EGL_BAD_PARAMETER
Cannot get default EGL display: EGL_BAD_PARAMETER
Cannot create EGL context: invalid display (last error: EGL_SUCCESS)
stale[bot] commented 3 years ago

I marked this as stale due to inactivity. → More info

jmercouris commented 3 years ago

This is still a problem. Please don't mark things as stale.

svavs commented 3 years ago

Same situation on my system running Cinnamon. Unable to see the Google webpage when adding online accounts (white background). It works running env WEBKIT_DISABLE_COMPOSITING_MODE=1 cinnamon-settings online-accounts.

❯ hwinfo --gfx 
16: PCI 100.0: 0302 3D controller                               
  Model: "nVidia GM107M [GeForce GTX 960M]"
  Vendor: pci 0x10de "nVidia Corporation"
  Device: pci 0x139b "GM107M [GeForce GTX 960M]"
  Driver: "nvidia"
  Driver Modules: "nvidia"

25: PCI 02.0: 0300 VGA compatible controller (VGA)
  Model: "Intel HD Graphics 530"
  Vendor: pci 0x8086 "Intel Corporation"
  Device: pci 0x191b "HD Graphics 530"
  Driver: "i915"
  Driver Modules: "i915"
❯ nix-info -m
 - system: `"x86_64-linux"`
 - host os: `Linux 5.4.119, NixOS, 20.09.4169.ac60476ed94 (Nightingale)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.3.11`
 - channels(root): `"nixos-20.09.4169.ac60476ed94"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
tgharib commented 2 years ago

This bug also affects other webkit browsers such as nyxt, vimb, luakit, etc.

SeraphyBR commented 2 years ago

I'm glad I discovered this issue, I was having a problem developing an app using tauri, and it uses webkitgk on linux, and it wasn't displaying the webpage with react, passing WEBKIT_DISABLE_COMPOSITING_MODE=1 yarn tauri dev it worked

stale[bot] commented 2 years ago

I marked this as stale due to inactivity. → More info

r3k2 commented 2 years ago

I am having similar issue, when I start nyxt browser on a computer with nvidia and nvidia propietary drivers the CPU goes up to 300% and I have to stop it.. :( I have tried with that env variable, no luck, seems this is the opposite, is not using the gpu at all and trying the CPU, such why 300% cpu use... is going to fry my computer. nyxt-cpu

AdsonCicilioti commented 1 year ago

I'm glad I discovered this issue, I was having a problem developing an app using tauri, and it uses webkitgk on linux, and it wasn't displaying the webpage with react, passing WEBKIT_DISABLE_COMPOSITING_MODE=1 yarn tauri dev it worked

This is a beautiful workaround that, despite displaying the web pages, everything is extremely laggy: scrolling pages, css animations, etc.

ghost commented 1 year ago

this is still an issue on 2023. That said, I only use intel GFX.

This might be the bug we're all hitting https://bugs.webkit.org/show_bug.cgi?id=238244

jtojnar commented 1 year ago

There are likely multiple bugs since there are multiple implementations. They will be somewhat unified in the next release due to be released in September: https://blogs.igalia.com/carlosgc/2023/04/03/webkitgtk-accelerated-compositing-rendering/

jmercouris commented 1 year ago

In any case, we should update the version of WebKitGTK+ in nixpkgs.

jtojnar commented 1 year ago

See #218143 for that.

ghost commented 1 year ago

There are likely multiple bugs since there are multiple implementations. They will be somewhat unified in the next release due to be released in September: https://blogs.igalia.com/carlosgc/2023/04/03/webkitgtk-accelerated-compositing-rendering/

Yeah I saw this some hours ago, pretty exciting.

cscorley commented 5 months ago

I ran into the same issues while working on a Tauri (webkitgtk) app I'm building and packaging as an AppImage. The app built requires transparency.

Specifically, the error I was seeing was the EGL_BAD_PARAMETER one (among others, but can ignore those for now):

(process:210255): Gtk-WARNING **: 18:05:04.683: Locale not supported by C library.
        Using the fallback 'C' locale.
Fontconfig error: Cannot load default config file: No such file: (null)
Could not determine the accessibility bus address

(process:210276): Gtk-WARNING **: 18:05:05.077: Locale not supported by C library.
        Using the fallback 'C' locale.
MESA-LOADER: failed to open nouveau: /run/opengl-driver/lib/dri/nouveau_dri.so: cannot open shared object file: No such file or directory (search paths /run/opengl-driver/lib/dri, suffix _dri)
MESA-LOADER: failed to open zink: /run/opengl-driver/lib/dri/zink_dri.so: cannot open shared object file: No such file or directory (search paths /run/opengl-driver/lib/dri, suffix _dri)
MESA-LOADER: failed to open kms_swrast: /run/opengl-driver/lib/dri/kms_swrast_dri.so: cannot open shared object file: No such file or directory (search paths /run/opengl-driver/lib/dri, suffix _dri)
MESA-LOADER: failed to open swrast: /run/opengl-driver/lib/dri/swrast_dri.so: cannot open shared object file: No such file or directory (search paths /run/opengl-driver/lib/dri, suffix _dri)
Failed to create GBM device for render device: /dev/dri/renderD128: No such file or directory
Cannot get default EGL display: EGL_BAD_PARAMETER
Cannot create EGL context: invalid display (last error: EGL_SUCCESS)
Fontconfig error: Cannot load default config file: No such file: (null)

Setting WEBKIT_DISABLE_COMPOSITING_MODE=1 worked. This gave me the idea to also start xcompmgr.

Starting xcompmgr -n before launching my AppImage worked. I've confirmed xcompmgr method works for 3 systems when running the AppImage: my dev NixOS, an ArchLinux, and an Ubuntu 16.04.

Hoping this helps someone!

Wolf1098 commented 1 month ago

Not sure if different issue, different distro, but this is what gnome gives me without your fix AcceleratedSurfaceDMABuf was unable to construct a complete framebuffer, and then it works with the proposed

env WEBKIT_DISABLE_COMPOSITING_MODE=1 gnome-control-center online-accounts

igorgue commented 1 month ago

Just want to mention that I'm using webkitgtk-6 (with Rust and libadwaita) on Hyprland and I had to setup the WEBKIT_DISABLE_COMPOSITING_MODE=1 variable to display a Webkit WebView inside of the app on startup, a new tab somehow does work.

This looks like a crazy bug...