Since Plasma 6 update, Ferdium chat app goes blank after coming back from sleep

On KDE Neon, I use Ferdium (front-end for many popular chatting systems) installed as a Flatpak from Discover. Since the Plasma 6 update, it goes completely blank after I wake the computer from sleep. Even if I close the app and restart it, it stays blank. I have checked the system monitor to make sure it was been completely closed. This didn’t happen before Plasma 6, and I have reinstalled the entire OS since the Plasma 6 update as well.

Here is the Nvidia info from the lspci -v output.

01:00.0 VGA compatible controller: NVIDIA Corporation GP106 [GeForce GTX 1060 6GB] (rev a1) (prog-if 00 [VGA controller])
        Subsystem: eVga.com. Corp. GP106 [GeForce GTX 1060 6GB]
        Flags: bus master, fast devsel, latency 0, IRQ 38
        Memory at ee000000 (32-bit, non-prefetchable) [size=16M]
        Memory at d0000000 (64-bit, prefetchable) [size=256M]
        Memory at e0000000 (64-bit, prefetchable) [size=32M]
        I/O ports at e000 [size=128]
        Expansion ROM at 000c0000 [virtual] [disabled] [size=128K]
        Capabilities: <access denied>
        Kernel driver in use: nvidia
        Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia

01:00.1 Audio device: NVIDIA Corporation GP106 High Definition Audio Controller (rev a1)
        Subsystem: eVga.com. Corp. GP106 High Definition Audio Controller
        Flags: bus master, fast devsel, latency 0, IRQ 17
        Memory at ef080000 (32-bit, non-prefetchable) [size=16K]
        Capabilities: <access denied>
        Kernel driver in use: snd_hda_intel
        Kernel modules: snd_hda_intel

This is a bit annoying because I basically have to restart my machine every time it goes to sleep.

Any ideas on where to start troubleshooting?

When you say “blank”, do you mean “not redrawing at all and just a black box” or “it looks like an app but all the text is missing”?

Are you using Wayland or X11? You can find this in the info center, or by running kinfo in the terminal.

I’m using Wayland.

This is what it looks like:

Can you tell if this is an X11 application or a native Wayland application?

One way I like to check that (mostly because it makes me laugh) is to run xeyes and then move the cursor on top of the application in question - if xeyes sees the cursor on the application then its an X11 application.

Another way is to run the kwin debug console (open krunner and start typing “kwin debug” and it will be one of the options) and see if the window in question is listed under “X11 windows”.

The eyes followed my cursor just fine over Ferdium. I even clicked all over Ferdium to make sure. Also, Ferdium is listed under X11 Windows in kwin debug.

Btw, the xeyes test was funny! I didn’t know about that program.

So the likely cause is that Ferdium is using Electron as the toolkit, and Electron, XWayland and NVidia do not play well together (see this bug report on the Signal app, which also uses Electron).

There are a few workaround suggested that rely on being able to add command line options to the Ferdium application launcher - which is unfortunately not very friendly to do under Flatpak/Discover/Plasma/something - if you right click the Ferdium desktop entry in the main menu and select “Edit application”, you will find that you cannot save your changes.

The hack around that, is as follows:

  1. In the main menu, locate the launcher you want to edit and right click it and select “edit application”. Look at the title for the dialog that opens - it will say something like “Properties for” followed by a file name ending in .desktop. For Ferdium it will be org.ferdium.Ferdium.desktop. Make a note of that file name.
  2. Open Dolphin and navigate to ~/.local/share/applications
  3. Locate the Flatpak launcher link for the application you want to edit - in our case it will be org.ferdium.Ferdium.desktop - it will have a “link emblem” on the icon (two chain links connected). Right click the icon and select “Show target”. This will open a second Dolphin window showing only the real desktop launcher file for the application.
  4. In the first Dolphin window, delete the linked desktop launcher.
  5. Copy the desktop launcher from the second Dolphin window back into the first.

Now you should be able to edit the desktop launcher by either just right clicking the icon in the Dolphin window right there and selecting “Properties”, or by using the “Edit application” menu action on the main menu entry.

To add command line arguments, in the desktop launcher properties dialog - switch to “Application”, and in the “Arguments” edit box go to the end of the text, put a space and whatever arguments you want to try.

I would have started with trying --disable-gpu, but I don’t use an Nvidia GPU and I cannot reproduce the behavior you describe, so I cannot test the workaround.

Good luck!

Thanks for the good luck! I think it helped with putting the argument in. Here’s a screenshot to confirm if I did it correctly:

Everything worked fine, but the problem still persists after waking up from sleep. Ferdium stays black. Also, I noticed that I get this error notification repeatedly, with or without --disable-gpu:

KWin Window Manager
Desktop effects were restarted due to graphics reset.

The only way that I know to get rid of it is to log out and log back in. Yet, even when I log out and back in to resolve the error message, Ferdium is still black. To get Ferdium working again, I have to reboot the machine.

Also, I tried putting the machine to sleep and waking it up without Ferdium open, and I did not get the error. Perhaps it’s some sort of interaction between Ferdium and Wayland bug, so maybe there’s a way to have the machine close Ferdium right before it goes to sleep?

Fun fact: I accidentally placed --disable-gpu argument in front of the others at first. When I ran Ferdium, the cursor gave me the loading sign and I could literally hear the machine making some sort of processing noise/grind, lol. I hope I didn’t do any major damage :laughing::grimacing:

This is a good indication that there are problems with the Nvidia driver - you get this message when the driver resets. It also means that adding --disable-gpu didn’t actually disable the GPU.

Btw - did you try to use the Flatpak permissions configuration in System settings to disable X11 access from Ferdium?

Below is my GPU driver situation. Should I try changing to another version of the driver?

❯ glxinfo | grep OpenGL
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: NVIDIA GeForce GTX 1060 6GB/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 535.161.07
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6.0 NVIDIA 535.161.07
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 535.161.07
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:
❯ sudo ubuntu-drivers list --gpgpu
[sudo] password for backonmybs: 
nvidia-driver-525-server, (kernel modules provided by linux-modules-nvidia-525-server-generic-hwe-22.04)
nvidia-driver-545, (kernel modules provided by linux-modules-nvidia-545-generic-hwe-22.04)
nvidia-driver-525, (kernel modules provided by linux-modules-nvidia-525-generic-hwe-22.04)
nvidia-driver-418-server, (kernel modules provided by nvidia-dkms-418-server)
nvidia-driver-390, (kernel modules provided by nvidia-dkms-390)
nvidia-driver-470-server, (kernel modules provided by linux-modules-nvidia-470-server-generic-hwe-22.04)
nvidia-driver-470, (kernel modules provided by linux-modules-nvidia-470-generic-hwe-22.04)
nvidia-driver-535, (kernel modules provided by linux-modules-nvidia-535-generic-hwe-22.04)
nvidia-driver-450-server, (kernel modules provided by nvidia-dkms-450-server)
nvidia-driver-535-server, (kernel modules provided by linux-modules-nvidia-535-server-generic-hwe-22.04)

I checked, and disabling x11 access from Ferdium doesn’t seem to be an option.