exeldro / obs-media-controls

GNU General Public License v2.0
72 stars 9 forks source link

OBS freezes on exit. #14

Closed MarioMey closed 3 years ago

MarioMey commented 4 years ago

Finally, I discovered what made OBS to freeze... this plug-in was. There is #7 that also is "a exit bug"... maybe it is the same bug.

The difference is... that I don't know how to debug it :D.

Debian 10 Buster, Mate 1.20.4, OBS 26.0.2 and Media Controls... both built here.

ogmkp commented 3 years ago

I continue to use obs-media-controls, because its showing all media in playing in the dock, not just one in the selected source toolbar included in OBS. Thanks to @exeldro for his work ! And, I'm running Debian 10 too, how can I help to reproduce the bug ?

MarioMey commented 3 years ago

@maxdrash I think that if you are playing some video and try to exit OBS, it freezes. Did you try it? Also say what version of OBS you have and if you compiled by yourself.

ogmkp commented 3 years ago

Compiled myself. 26.0.2 or 26.1 don't give some freezes on exit when playing a video for the moment.

MarioMey commented 3 years ago

Let me check something... well, you check it: Is VLC (the software) running well in your computer? Here, almost all the times, when I try to close, it gets freeze. I think this is connected with this OBS issue.

I have a Ryzen 5 3400G with a Radeon™ RX Vega 11, running amdgpu drivers, kernel 5.7.0-0.bpo.2-amd64.

ogmkp commented 3 years ago

I'm using the linux-image-amd64 stable (4.19.0-13) with proprietary nvidia drivers for a GTX970. I don't encounter problems with another setup with a RX 560 with full free drivers.

In situation, I haven't problems with VLC, within software or vdpau decoding.

MarioMey commented 3 years ago

Maybe it's something related to this video card. And maybe this bug could be closed until I discover what happens with my configuration.

ogmkp commented 3 years ago

For AMDGPU, and, after more investigation. VLC stay stuck on exit with theses video outputs: OpenGL (who use AMD UVD) OpenGL2 for embeded systems (who use AMD UVD) VDPAU (who use AMD UVD)

And don't stuck with: Xvideo XCB (who don't use AMD UVD) X11 XCB (who use AMD UVD but bad framerate)

In automatic mode, VLC uses VDPAU by default after cheking VAAPI:

VLC media player 3.0.11 Vetinari (revision 3.0.11-0-gdc0c5ced72)
[000055943115b7c0] dummy interface: using the dummy interface module...
libva info: VA-API version 1.4.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_4
libva info: va_openDriver() returns 0
[00007fc9c4003330] glconv_vaapi_x11 gl error: vaDeriveImage: invalid VASurfaceID
[00007fc9d404ab40] main video output error: video output creation failed
[00007fc9dcc70350] main decoder error: failed to create video output
[00007fc9dcc70350] avcodec decoder: Using G3DVL VDPAU Driver Shared Library version 1.0 for hardware decoding
[00007fc9d409c440] xcb_window window error: X server failure
[00007fc9dcc70350] avcodec decoder error: hardware acceleration picture allocation failed
[h264 @ 0x7fc9dcc71bc0] get_buffer() failed
[h264 @ 0x7fc9dcc71bc0] thread_get_buffer() failed
[h264 @ 0x7fc9dcc71bc0] decode_slice_header error
[h264 @ 0x7fc9dcc71bc0] no frame!

Even, when i close vlc when playing the video and vlc stay stuck in the taskbar, UVD is released from VLC and goes to "Disabled" mode. As you can see here: sudo cat /sys/kernel/debug/dri/0/amdgpu_pm_info

We have to find about a issue for VLC when closing a video playing with hardware acceleration for VLC 3.0.11 packaged in Debian 10. And thats it: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=952730 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=916595 https://trac.videolan.org/vlc/ticket/20627

On my side, I try to get bad exit on OBS related to obs-media-controls and VLC plugin maybe.

MarioMey commented 3 years ago

Oh... thanks for your investigation.

ogmkp commented 3 years ago

I can confirm OBS stay active in background on exit, I have to do a killall obs to get really closed. It's fully related to UVD/VCE of amdgpu when I start and stop streaming/recording with VAAPI for amd DRI and try to close OBS. That's not related to the great exeldro's obs-media-controls.