danvd / wlroots-eglstreams

A modular Wayland compositor library with EGLStreams support
MIT License
105 stars 11 forks source link

GPU Memory leaks #41

Closed danvd closed 2 years ago

danvd commented 2 years ago

client texture streams are deallocated only when client terminates, why? When resizing, old streams are not destroyed.

danvd commented 2 years ago

I slightly modified client buffer allocation/destruction. Checked that buffers are destroyed - eglDestroyStream + glDeleteTexture are called for each window size change. But still no luck - nvidia-smi shows memory leaks. I'm a bit stuck at the moment. Will search further when time permits.

danvd commented 2 years ago

I enabled dma-buf and memory leaks are gone. It's nice that dma-buf works almost fine - all clients now prefer using it instead of eglstream controller :-)

Will close in a week or so if no issues.

git-bruh commented 2 years ago

Works fine for me aswell, but chromium has tons of visual glitches (as with vanilla wlroots)

danvd commented 2 years ago

I switched to firefox + MOZ_ENABLE_WAYLAND + MOZ_WEBRENDER - it outperforms chrome in almost everything that related to smooth rendering.

git-bruh commented 2 years ago

Also, there seems to be the weird clipboard problem that used to happen on original wlroots. If you copy from firefox with ctrl + c and paste it with wl-paste, it hangs occasionally.

danvd commented 2 years ago

Hmm, I never used wl-paste. Can you share a use case for it?

hafeoz commented 2 years ago

weird clipboard problem that used to happen on original wlroots

Are you referring to this issue?

git-bruh commented 2 years ago

@hafeoz I think so, doesn't seem to happen when just copy pasting from 2 terminals or chromium, only with firefox. The issue was also described here:

foot also fails to copy-and-paste text from other applications (warn: selection.c:1602: no data received from clipboard in 2 seconds, aborting)

WAYLAND_DEBUG log: https://termbin.com/hhj6 strace log: https://termbin.com/ji27

Will try the gtk patch suggested in that issue.

EDIT: Seems to be fixed with gtk 3.24.31

PolyMeilex commented 2 years ago

I'm pretty sure it's a Firefox thing, as it happens on Gnome as well.

danvd commented 2 years ago

Works well, no visible bugs, no leaks, stable and fast. Looks like Nvidia coped with dmabuf implementation (fingers crossed).