avahe-kellenberger / nimdow

A window manager written in Nim (In Development)
GNU General Public License v2.0
317 stars 19 forks source link

discord hang and stop responding to input #216

Closed BrianNormant closed 1 year ago

BrianNormant commented 1 year ago

Describe the bug Sometime, some applications: kitty and discord, will freeze and become unresponsive to all input, move, and even SIGTERM. The only way I can deal with them is to stash them and just forget about them. discord can be kill and will not appear on ps aux but its broken windows will still get freezed. kitty become a zombie process and can only be killed by killing xinit. Interestingly they still function properly on the backend: discord will still send notifications or manage calling. I can't still use tmux to access the terminal application in the dead window, only the display seems to be broken. The display will not move, get resized, moved to other workspace, get closed, only stash function. And if you unstash follow by set layout tiling. You will have to broken window showing the app. I used awesomeWM and It never happenned before, So I don't think It have something to do with my hardware or X11.

To Reproduce Steps to reproduce the behavior: I can't really reproduce those error, They happen really randomly, sometimes on startup, sometimes after a while. It's really inconsistent.

Expected behavior All applications should stay responsive and not freeze

Screenshots I will try to include screenshot if I happen And I can show a proper example. And find a way to record .gif

Additional context I'm using archlinux btw ™ Lastest packages. AMD APU if it matter. Installed nimdow with yay -S nimdow-bin

Really cool tilling manager btw, It's my favorite so far so thanks a lot!.

avahe-kellenberger commented 1 year ago

Interesting, I haven't had this happen before (I use discord, but not kitty).

If you find any way to reproduce please let me know!

BrianNormant commented 1 year ago

Yeah, I was just typing a very long message on discord at this very instant. Only Opera openned in another workspace, some scripts to cycle the wallpapers and the statusbar (in nimscript and bash) cmus in the background but I shouldn't have any influence.

Suddenly discord stopped responding to input. Not mouse, click, keyboard was registered. But the graphics still displayed what was happening: typing line (I don't the the name) flashing, new messages arriving. Also there was a very noticable lag when moving the application between tiles. I never waited before so I let the app just go only and after around 5min It started responding again + All keypress suddently executed.

Maybe some freeze of the connection between Xinput and the application. Or a conflict between wayland drivers and X11? I didn't uninstall Hyprland. Will try a pacman -Rns Hyprland and see If it keep happening. Where are located logs? I will send them I can properly record them.

avahe-kellenberger commented 1 year ago

The logs would only report errors so I don't think that'll be helpful, it does sound like something external to nimdow is causing this weird lag to happen. I've never used wayland, so I have any related packages installed.

Can you check your ram usage, and/or maybe disable your status bar program just to see if this issue occurs? I'm curious if https://github.com/avahe-kellenberger/nimdow/issues/191 is possibly related

BrianNormant commented 1 year ago

191 seems to have fixed the problem with kitty.

I read the issues before posting to not get a RTFM. adding appending a & disown to my super+enter keybind did the trick as I didn't exerience those issues with kitty again. did the same with discord don't really fix it. But it seem to be a bit different: the app still display its graphics correctly, as I can still even read the new message when It happen.

about ram usage its very low, around 20%: image CPU is around 10% so its not a perfomance I think.

I have 2 computers, a laptop and a tower. It happen with both of them.

BrianNormant commented 1 year ago

image Here you can see how broken the windows sometime appears when I happen And the interesting part is that Discord is killed, its doesn't even appear with ps aux | grep Discord

avahe-kellenberger commented 1 year ago

Is this maybe an issue with the compositor? I've never had this happen

BrianNormant commented 1 year ago

I can try to kill picom and see.

BrianNormant commented 1 year ago

Doesn't seems to fix the issue, I don't know a good gif recorder so I can't record but this bug is pretty wild. image

This is the same widows appearing twice, 1 is kitty. the second is supposed to be discord. This is what happen with I rotate them in the tiling layout

BrianNormant commented 1 year ago

Sorry wrong button.

And sometime it comes back from death. I don't thinks It's about #191 because It does the same when launched from a virtual terminal

image

BrianNormant commented 1 year ago

This is log from discord I get in the console if It can help:

 2023-05-22T19:00:59.649Z [Modules] Host is up to date.
2023-05-22T19:00:59.649Z [Modules] Checking for module updates at https://discord.com/api/modules/stable/versions.json
2023-05-22T19:00:59.684Z [Modules] No module updates available.
Optional module ./ElectronTestRpc was not included.
[917624:0522/150101.682783:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: BGRA_8888, share_between_threads: 0, gmb_type: shared_memory
2023-05-22T19:01:02.260Z [Modules] Checking for host updates.
2023-05-22T19:01:02.368Z [Modules] Host is up to date.
2023-05-22T19:01:02.368Z [Modules] Checking for module updates at https://discord.com/api/modules/stable/versions.json
2023-05-22T19:01:02.373Z [Modules] No module updates available.
[917624:0522/150102.650212:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: BGRA_8888, share_between_threads: 0, gmb_type: shared_memory
[917624:0522/150102.653571:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: BGRA_8888, share_between_threads: 0, gmb_type: shared_memory
[917624:0522/150102.659619:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: BGRA_8888, share_between_threads: 0, gmb_type: shared_memory
[917624:0522/150102.661872:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: BGRA_8888, share_between_threads: 0, gmb_type: shared_memory
[917624:0522/150102.664307:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: BGRA_8888, share_between_threads: 0, gmb_type: shared_memory
[917624:0522/150102.714864:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: BGRA_8888, share_between_threads: 0, gmb_type: shared_memory
[917624:0522/150102.863822:ERROR:shared_image_factory.cc(575)] Could not find SharedImageBackingFactory with params: usage: Gles2|Raster|DisplayRead|Scanout, format: BGRA_8888, share_between_threads: 0, gmb_type: shared_memory

(discord:916832): libnotify-WARNING **: 15:01:32.640: Failed to connect to proxy

(discord:916832): libnotify-WARNING **: 15:01:57.665: Failed to connect to proxy

(discord:916832): libnotify-WARNING **: 15:02:22.681: Failed to connect to proxy
[916832:0522/150247.708643:ERROR:libnotify_notification.cc(49)] notify_notification_show: domain=1646 code=24 message="Error calling StartServiceByName for org.freedesktop.Notifications: Timeout was reached"
BrianNormant commented 1 year ago

I just thought about something will reading the logs and the hyprland wiki. It says:

A notification daemon Starting method: most likely manual (exec-once) Many apps (e.g. Discord) may freeze without one running. Use e.g. dunst, mako, etc.

In the must have section.

avahe-kellenberger commented 1 year ago

Nothing built-in, but I use dunst personally

BrianNormant commented 1 year ago

So following my last comment: I did pacman -S libnotify dunst Added dunst in autostart. I will see if this keep happening and mark this as fixed tomorrow if it doens't happen anymore I guess

If this was the problem, could you edit the wiki or the README to add some work about a notification daemon and libnotify. or just link the the archwiki about desktop notification