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.
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:
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.
Open Dolphin and navigate to ~/.local/share/applications
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.
In the first Dolphin window, delete the linked desktop launcher.
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.
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
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?