element-desktop icon indicating copy to clipboard operation
element-desktop copied to clipboard

Element not Rendering Graphics

Open InklingGirl opened this issue 1 year ago • 26 comments

Steps to reproduce

  1. Where are you starting? What can you see? Open Element as per standard on a GNOME desktop, but the window proceeds to flash & goes on to not render anything but a text cursor at the bottom of it. Screenshot from 2023-06-21 22-46-44 Even the topbar icon is caught up in this, as it briefly renders on launching the program & then visually disappears (while still being clickable).
  2. No more steps, just doesn't work lol.

Outcome

What did you expect?

For Element to render correctly.

What happened instead?

On opening, the window proceeds to flash & go on to not render anything but a text cursor at the bottom of it. Screenshot from 2023-06-21 22-46-44

Operating system

Ubuntu 22.04.2 LTS (Jammy Jellyfish) OS w/ GNOME 42.5 DE on Wayland window server

Application version

Can't see, but latest

How did you install the app?

https://packages.element.io/debian/ i.e. the first-party Deb repo for Element, via apt

Homeserver

No response

Will you send logs?

Yes

InklingGirl avatar Jun 21 '23 12:06 InklingGirl

I still need help w/ this, I'm not able to use Element at all until it's resolved. I wonder, would turning off hardware acceleration be a working temporary stopgap? I can't see any of the menus, so I can't change the setting graphically, but is it represented in a config file? Thanks.

InklingGirl avatar Jun 22 '23 07:06 InklingGirl

In my case at least, using ppa-purge to remove ppa:ernstp/mesarc (the PPA from which I was getting graphics drivers) & downgrade the graphics packages seems to have fixed element-desktop's rendering issues. Still, I would like a response to my above enquiry about switching element-desktop to software mode w/o access to the GUI before I consider closing this issue. Thanks.

InklingGirl avatar Jun 23 '23 08:06 InklingGirl

try running with --disable-gpu --in-process-gpu

pbsds avatar Jun 29 '23 00:06 pbsds

Thanks for the tip @pbsds, this is no longer an issue for me, but it might be helpful in the future to have that command.

InklingGirl avatar Jun 29 '23 07:06 InklingGirl

W/ the build of Mesa Canonical ships & also the current build of Mesa from ppa:kisak/kisak-mesa, this issue doesn't persist for me.

InklingGirl avatar Jun 29 '23 07:06 InklingGirl

--disable-gpu --in-process-gpu

this helped me with my issue, but why is this neccessary now? It worked fine before. I am on debian testing.

sascha-wi avatar Jul 05 '23 08:07 sascha-wi

I've had issues with multiple electron applications, where the fix was the same. Could be an electron update thing

pbsds avatar Jul 05 '23 09:07 pbsds

Is brave-browser Electron? I had the same issue w/ that.

InklingGirl avatar Jul 05 '23 10:07 InklingGirl

@InklingGirl brave is based on Chromium, Electron is also based on Chromium.

t3chguy avatar Jul 05 '23 10:07 t3chguy

Maybe an even upperstream issue then? Who knows, but for reference: https://github.com/brave/brave-browser/issues/30180

InklingGirl avatar Jul 05 '23 10:07 InklingGirl

If anyone is still experiencing, I may reopen

--disable-gpu --in-process-gpu

this helped me with my issue, but why is this neccessary now? It worked fine before. I am on debian testing.

Since @sascha-wi is still experiencing, I'll reopen this.

InklingGirl avatar Jul 05 '23 10:07 InklingGirl

So uhh did anyone file an Electron/chromium issue for that?

fogti avatar Jul 08 '23 00:07 fogti

I can also confirm that with the flag --disable-gpu --in-process-gpu Element is starting fine. I am on Ubuntu 22.04. I remember that I recently got a new update for Element, but I have no idea if the issue is somehow related. My GPU is a RX 580.

ailequal avatar Jul 11 '23 06:07 ailequal

I can confirm getting the same issue in the last update (flag --disable-gpu --in-process-gpu temporarily solves it, but it's a pain having to maintain a terminal opened). Hope it's solved soon. I have Ubuntu 22.04.2 LTS with AMD Ryzen 7 Graphics (Renoir). Selection_1506

MiquelRForgeFlow avatar Jul 11 '23 08:07 MiquelRForgeFlow

I can confirm getting the same issue in the last update (flag --disable-gpu --in-process-gpu temporarily solves it, but it's a pain having to maintain a terminal opened). Hope it's solved soon. I have Ubuntu 22.04.2 LTS with AMD Ryzen 7 Graphics (Renoir). Selection_1506

You can use the following alias which won't hang your terminal (it works with bash). alias element-desktop-gpu="element-desktop --disable-gpu --in-process-gpu &> /dev/null &"

ailequal avatar Jul 11 '23 08:07 ailequal

On nixos i modify the desktop entry with an override:

  nixpkgs.config.packageOverrides = pkgs: {
    element-desktop = pkgs.element-desktop.overrideAttrs (old: {
      desktopItem = old.desktopItem.override (old: {
        exec = "element-desktop --disable-gpu --in-process-gpu %u";
      });
    });
  };

pbsds avatar Jul 12 '23 14:07 pbsds

I found a solution in another issue that fixed the white screen for me: Delete the contents of ~/.config/Element/GPUCache (or ~/.config/Riot/GPUCache if you upgraded to Element from Riot).

edit: Ah, I just saw that this is also mentioned in joepie91's link to nixpkgs.

Taranchul avatar Jul 22 '23 07:07 Taranchul

I found a solution in another issue that fixed the white screen for me: Delete the contents of ~/.config/Element/GPUCache (or ~/.config/Riot/GPUCache if you upgraded to Element from Riot).

edit: Ah, I just saw that this is also mentioned in joepie91's link to nixpkgs.

Worked for me aswell.

sascha-wi avatar Jul 24 '23 06:07 sascha-wi

Was using Element last night without issue, this morning Element started showing this issue, additionally chrome wasn't rendering correctly. Reinstalling chrome would fix the problem with chrome but as soon as I opened element up it would return. removing the contents of ~/.config/Element/GPUCache as recommend above seems to have fixed both the issue with element and it's strange interaction with my browser.

NOFUNEVER avatar Jul 28 '23 20:07 NOFUNEVER

Same here. Yesterday's update from https://packages.element.io/debian caused the white window again, removal of GPUCache/* fixed it again.

Maybe Element should empty that directory on startup or after an update as a temporary solution until the real reason is found and fixed?

Taranchul avatar Jul 29 '23 05:07 Taranchul

Reinstalling chrome would fix the problem with chrome

Chrome has its own cache directories. You could try to empty them or at least GPUCache the next time (maybe after a backup):

~/.config/google-chrome/GrShaderCache
~/.config/google-chrome/ShaderCache
~/.config/google-chrome/Default/GPUCache

(Source)

Taranchul avatar Jul 29 '23 06:07 Taranchul

So today nothing works anymore? regardless how I start element-desktop it shows basically just black background?

Edit: https://github.com/vector-im/element-desktop/issues/1074#issue-1799450013 same issue, deleting GPUCache and starting it with --disable-gpu --in-process-gpu makes it work again.

can we finally get a fix for this mess?

sascha-wi avatar Aug 07 '23 07:08 sascha-wi

With AMD videocard element-nightly not started on wayland. With --disable-gpu --in-process-gpu element-desktop-nightly was started success.

log not success start was:

element-desktop-nightly --enable-features=UseOzonePlatform --ozone-platform=wayland  --ozone-platform-hint=auto                                 
/home/progserega/.config/Element-Nightly exists: yes
/home/progserega/.config/Riot-Nightly exists: no
Enabling Sentry with dsn=https://[email protected]/6 environment=nightly
Starting auto update with base URL: https://packages.element.io/nightly/update/
Auto update not supported on this platform
Fetching translation json for locale: en_EN
Changing application language to ru
Fetching translation json for locale: ru
Resetting the UI components after locale change
Resetting the UI components after locale change
[43757:1208/061947.412899:ERROR:gbm_wrapper.cc(253)] Failed to export buffer to dma_buf: Нет такого файла или каталога (2)
[43757:1208/061947.413015:ERROR:gbm_pixmap_wayland.cc(82)] Cannot create bo with format= RGBA_8888 and usage=SCANOUT
[43757:1208/061947.413092:ERROR:gbm_wrapper.cc(253)] Failed to export buffer to dma_buf: Нет такого файла или каталога (2)
[43757:1208/061947.413153:ERROR:gbm_pixmap_wayland.cc(82)] Cannot create bo with format= RGBA_8888 and usage=GPU_READ
[43757:1208/061947.413204:ERROR:shared_image_factory.cc(926)] CreateSharedImage: could not create backing.
[43757:1208/061947.413258:ERROR:shared_image_factory.cc(758)] DestroySharedImage: Could not find shared image mailbox
[43757:1208/061947.413378:ERROR:gpu_service_impl.cc(1089)] Exiting GPU process because some drivers can't recover from errors. GPU process will restart shortly.
[43774:1208/061947.421130:ERROR:command_buffer_proxy_impl.cc(127)] ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer.
[43690:1208/061947.423233:ERROR:gpu_process_host.cc(991)] GPU process exited unexpectedly: exit_code=8704
[43794:1208/061947.572526:ERROR:gbm_wrapper.cc(253)] Failed to export buffer to dma_buf: Нет такого файла или каталога (2)
[43794:1208/061947.572744:ERROR:gbm_pixmap_wayland.cc(82)] Cannot create bo with format= RGBA_8888 and usage=SCANOUT
[43794:1208/061947.572892:ERROR:gbm_wrapper.cc(253)] Failed to export buffer to dma_buf: Нет такого файла или каталога (2)
[43794:1208/061947.573056:ERROR:gbm_pixmap_wayland.cc(82)] Cannot create bo with format= RGBA_8888 and usage=GPU_READ
[43794:1208/061947.573169:ERROR:shared_image_factory.cc(926)] CreateSharedImage: could not create backing.
[43794:1208/061947.573259:ERROR:shared_image_factory.cc(758)] DestroySharedImage: Could not find shared image mailbox
[43794:1208/061947.573402:ERROR:gpu_service_impl.cc(1089)] Exiting GPU process because some drivers can't recover from errors. GPU process will restart shortly.
[43774:1208/061947.580940:ERROR:command_buffer_proxy_impl.cc(319)] GPU state invalid after WaitForGetOffsetInRange.
[43690:1208/061947.581876:ERROR:gpu_process_host.cc(991)] GPU process exited unexpectedly: exit_code=8704
[43806:1208/061947.721218:ERROR:gbm_wrapper.cc(253)] Failed to export buffer to dma_buf: Нет такого файла или каталога (2)
[43806:1208/061947.721376:ERROR:gbm_pixmap_wayland.cc(82)] Cannot create bo with format= RGBA_8888 and usage=SCANOUT
[43806:1208/061947.721459:ERROR:gbm_wrapper.cc(253)] Failed to export buffer to dma_buf: Нет такого файла или каталога (2)
[43806:1208/061947.721519:ERROR:gbm_pixmap_wayland.cc(82)] Cannot create bo with format= RGBA_8888 and usage=GPU_READ
[43806:1208/061947.721594:ERROR:shared_image_factory.cc(926)] CreateSharedImage: could not create backing.
[43806:1208/061947.721652:ERROR:shared_image_factory.cc(758)] DestroySharedImage: Could not find shared image mailbox
[43806:1208/061947.721849:ERROR:gpu_service_impl.cc(1089)] Exiting GPU process because some drivers can't recover from errors. GPU process will restart shortly.
[43774:1208/061947.729367:ERROR:command_buffer_proxy_impl.cc(127)] ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer.
[43690:1208/061947.730242:ERROR:gpu_process_host.cc(991)] GPU process exited unexpectedly: exit_code=8704
[43690:1208/061947.757581:ERROR:nss_util.cc(357)] After loading Root Certs, loaded==false: NSS error code: -8018
[43774:1208/061947.867456:ERROR:command_buffer_proxy_impl.cc(127)] ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer.
[43690:1208/061948.258750:ERROR:object_proxy.cc(577)] Failed to call method: org.freedesktop.DBus.StartServiceByName: object_path= /org/freedesktop/DBus: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Changing application language to ru
Fetching translation json for locale: ru
Resetting the UI components after locale change

progserega avatar Dec 07 '23 20:12 progserega

For the record, i've switched to the following electron flag, which at least give be a smidgen of performance:

element-desktop --use-gl=desktop 

pbsds avatar Dec 08 '23 09:12 pbsds

FTR, this is not an issue on nixos 23.11: no workaround needed and i get hardware acceleration finally.

This can maybe be closed

pbsds avatar Jan 11 '24 22:01 pbsds

FTR, this is not an issue on nixos 23.11: no workaround needed and i get hardware acceleration finally.

This can maybe be closed

Just because you have no issues on your OS doesn't mean the issue can be closed.

sascha-wi avatar Jan 12 '24 08:01 sascha-wi