pop-os / cosmic-epoch

Next generation Cosmic desktop environment
2.78k stars 78 forks source link

Discord stops accepting mouse input after its window is resized #665

Open estokes opened 1 month ago

estokes commented 1 month ago

On PopOs 22.04 with the latest cosmic debs as of 2024-08-13 using the scroll wheel in discord causes Xwayland to crash (all X11 windows become just title bars with no content and cannot be closed). Cosmic does not restart Xwayland after that and the only way to restore X11 functionality is to log out and back in.

discord output [181:0813/124034.181059:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 1 times! [181:0813/124040.253123:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 2 times! [5:0813/124049.287721:FATAL:electron_browser_main_parts.cc(502)] Failed to shutdown. [181:0813/124049.287622:ERROR:connection.cc(61)] X connection error received. Connection lost to X server ':1'

journal Aug 13 12:40:49 mazikeen cosmic-comp[253704]: Event thread exiting due to connection error Connection reset by peer (os error 104) Aug 13 12:40:49 mazikeen systemd[2165]: app-flatpak-com.discordapp.Discord-255813.scope: Consumed 14.704s CPU time. Aug 13 12:40:50 mazikeen systemd[1]: Started crash report submission. Aug 13 12:40:50 mazikeen whoopsie[256143]: [12:40:50] Using lock path: /var/lock/whoopsie/lock Aug 13 12:40:50 mazikeen systemd[1]: whoopsie.service: Deactivated successfully. Aug 13 12:40:51 mazikeen systemd[1]: Started crash report submission. Aug 13 12:40:51 mazikeen whoopsie[256147]: [12:40:51] Using lock path: /var/lock/whoopsie/lock Aug 13 12:40:51 mazikeen systemd[1]: whoopsie.service: Deactivated successfully. Aug 13 12:41:31 mazikeen cosmic-comp[253704]: Failed to update Xwm stacking order. Aug 13 12:41:31 mazikeen cosmic-comp[253704]: Failed to update Xwm stacking order.

cosmic-comp then outputs Failed to update Xwm stacking order several times per second until it is restarted.

mmstick commented 1 month ago

Do you have popdev:master added to the system?

estokes commented 1 month ago

I did not, I do now (sorry I didn't know about it). So far I can't reproduce it with the popdev:master packages. I will reopen if I manage to.

estokes commented 1 month ago

eeeeh, I spoke too soon. Now, it doesn't crash Xwayland, but switching to other windows and then back to discord causes discord to stop accepting mouse clicks or scroll wheel events. Typing still works, and the gui is still updating, but the mouse does nothing.

The tray icon also still generates a menu on click, so the app is alive, just the main window either isn't accepting clicks or isn't getting them. Possibly relevant logs,

journal Aug 13 13:41:18 mazikeen cosmic-comp[261479]: [GL] GL_INVALID_VALUE in glTexSubImage2D(xoffset 0 + width 24 > 10)

discord stderr [57:0813/133843.793702:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 3 times!

estokes commented 1 month ago

I can reproduce it reliably now. Steps,

  1. start discord (flatpak run com.discordapp.Discord) and wait for it to display content
  2. note that discord accepts mouse clicks and scroll events
  3. resize the window
  4. note that discord no longer accepts mouse clicks or scroll events
ChaoHunter commented 3 weeks ago

I encountered the same issue after following these steps.

  1. start discord (flatpak run com.discordapp.Discord) and wait for it to display content
  2. note that discord accepts mouse clicks and scroll events
  3. resize the window
  4. discord no longer accepts mouse clicks or scroll events

A workaround I found was to resize the application, switch to full screen, and then exit full screen.

KwisatzJim commented 1 week ago

this behavior happens with Brave Browser as well. the workaround works on it too. I've added popdev:master to my install