trigg / Discover

Yet another discord overlay for linux
GNU General Public License v3.0
647 stars 29 forks source link

Permanent black overlay when a game disables the compositor after game start #236

Closed zany130 closed 2 years ago

zany130 commented 2 years ago

Steps to Reproduce Steps to reproduce the behavior:

  1. enable force xshape
  2. enable notifications
  3. disable overlay while notification overlay is showing
  4. See a permanent black overlay drawn on top of the game (this does show discord notifications but the overlay stays stay there at all times)

Expected behavior Discord messages show on top of the game and disappear after the configured timeout time

Problematic behavior A permanent black overlay is drawn over the game that does not disappear after messages time out.

Desktop (please complete the following information):

inxi -b
System:
  Host: Kiseki Kernel: 5.17.4-256-tkg-pds arch: x86_64 bits: 64
    Desktop: KDE Plasma v: 5.24.4 Distro: Garuda Linux
Machine:
  Type: Desktop Mobo: ASRock model: X470 Taichi serial: <superuser required>
    UEFI: American Megatrends v: P4.86 date: 01/27/2022
CPU:
  Info: 6-core AMD Ryzen 5 2600X [MT MCP] speed (MHz): avg: 4119
    min/max: 2200/3600
Graphics:
  Device-1: NVIDIA GP104 [GeForce GTX 1080] driver: nvidia v: 510.60.02
  Display: x11 server: X.Org v: 21.1.3 with: Xwayland v: 22.1.1 driver: X:
    loaded: nvidia gpu: nvidia,nvidia-nvswitch resolution: 1: 2560x1080
    2: 3840x2160~60Hz
  OpenGL: renderer: NVIDIA GeForce GTX 1080/PCIe/SSE2
    v: 4.6.0 NVIDIA 510.60.02
Network:
  Device-1: Intel I211 Gigabit Network driver: igb
Drives:
  Local Storage: total: 2.96 TiB used: 3.02 TiB (102.3%)
Info:
  Processes: 482 Uptime: 3h 28m Memory: 31.27 GiB used: 17.56 GiB (56.1%)
  Shell: fish inxi: 3.3.15

Installation Method

Additional context For some reason, everything works as expected (no permanent black overlay) when the app is started after the game is running.

trigg commented 2 years ago

What Desktop is this on? Gnome, KDE, Xfce? What compositor?

trigg commented 2 years ago

KDE, just seen the convo, sorry

MurdoMaclachlan commented 2 years ago

I don't know exactly how this works, but when I first turned off compositing on Xfce, a number of apps (including the settings applet) got black bars around them that went away after they restarted. Someone logged an Xfce bug report a couple of years ago for something like this, the developer response was:

It shows as black above because you turned the compositor off after the client was started. First and foremost, please don't do that, clients such as gtk applications cannot deal with the compositor being turned off and will shows a black area instead of the transparency expected.

That said, the black area you show above in your screenshot is part of the client, some of it is used for resize handles, the rest is shadows.

trigg commented 2 years ago

Similar issue, good catch.

The major thing to note is I will probably enable-by-default and remove the option for Force XShape as there are no apparent side effects and it covers a whole bunch of edge cases... I'm confused it doesn't cover this one

midget3111 commented 2 years ago

After further testing, we believe this issue may be specifically Nvidia related.

zany130 commented 2 years ago

Switched to an rx 6700xt and I am able to reproduce the issue there

trigg commented 2 years ago

Is this with 'Force XShape' on?

zany130 commented 2 years ago

yes

trigg commented 2 years ago

Then I'm not really sure much more can be done on this. Disabling compositing mid-session in this manner isn't well supported by gtk and that's how we're drawing the overlay

trigg commented 2 years ago

If you're still watching this, it is worth testing with newer updates of KDE and Discover-overlay. I can no longer produce this issue

zany130 commented 2 years ago

I can still reporduce in a fully up-to-date Garuda system (arch based) on kde with discover installed from the AUR. Run checked the box for showings test notifications and disabled the compositor while it is showing

EDIT: tried with the flatpak version as i noticed the aur version is out of date. But it didn't make a difference disabling the compositor while the overlay is up leaves a black window

trigg commented 2 years ago

Odd that AUR is out of date. I meant latest from git, which should get pulled in with https://aur.archlinux.org/packages/discover-overlay-git

zany130 commented 2 years ago

i was using the non git aur

https://aur.archlinux.org/packages/discover-overlay

trigg commented 2 years ago

That's fair, that won't have my latest attempts to fix the issue though :)

zany130 commented 2 years ago

I thought the flatpak was already at 5he latest version since i saw you pushed a new i thought the flatpak was at the latest with that aur build and when i saw it hadn't been updated i tried the flatpak.

Works on the git air package though. It sometimes flickers a bit but only once from my testing (honestly didn't test to much since i now moved to Wayland)

trigg commented 2 years ago

Thanks for testing again!