Installation troubles
SolitudeSF opened this issue · 12 comments
Having built/installed both obs-studio and this plugin no new source appears in obs. What is the exact place the files should be placed to? because it doesnt look like installing places them correctly.
- Check whether there's a
linux-kmsgrab.so
in<prefix>/lib*/obs-plugins/
, and that there are other pluginso
s there too. If not, try previous (8829f03) commit. I'm still trying to figure out what would be the correct CMake install rule for this. - Have you performed the
sudo setcap cap_sys_admin+ep "$CMAKE_PREFIX_PATH/bin/obs-kmsgrab-send"
command manually? It's missing from CMake rules currently (would make cmake require sudo, which is not great).
for (1) you can alternatively manually copy the linux-kmsgrab.so
to where other plugins are.
i moved .so to other plugins and setcapped the binary to no effect. maybe it has to do with UNIX_STRUCTURE=0 i built obs with, since thats was listen on wiki. yes, with UNIX_STRUCTURE=1 files are installed correctly. but for some reason obs itself stopped working.
Interesting. It should be completely agnostic to UNIX_STRUCTURE, unless there's something weird with obs-plugintemplate resources installation. I'll look into that. Thanks!
For UNIX_STRUCTURE=0 you have to manually cd into where obs
binary is and run it from there.
in the process of trying to make it work i irreversibly killed my system, so had to reinstall. thats a first one in many years. guessing some volatile part of my setup misinteracted with setcapped binary.
obs allows installing plugins in user directory under $XDG_CONFIG_DIR/obs/plugins. is that a supported scenario here? because that didnt work for me either.
Sorry to hear that. It's hard to imagine how a single setcapped binary could affect the rest of the system though.
Currently, as it is still very experimental, the user-specific XDG_ path is not really supported -- you still need to place the send setcapped binary alongside the obs
binary. It's just hardcoded this way. I was planning to change that though, and maybe relax the setcap requirement by replacing it with polkit-sudo or something.
I've tried to address installation destination and binary location issues. If it's still relevant, you can try grabbing the latest master.
It also tries to use pkexec instead of setcap'ped binary.
It's hard to imagine how a single setcapped binary could affect the rest of the system though.
yeah, its wasnt that.
i managed to get linux-kmsgrab to appear in loadeded modules, but no new input source i see:
is present.error: [linux-kmsgrab] linux-dmabuf cannot run on non-EGL platforms
. what am i missing
You need to somehow force EGL mode. It's automatically on for Wayland (there's no GLX, only EGL). I haven't looked how it's done in master. My fork used to have EGL/GLX switch in Settings.
i made obs run in EGL mode with OBS_USE_EGL=1
but when i add DMA-BUF source it crashes with obs: symbol lookup error: /home/solitude/app/obs/usr/lib/obs-plugins/linux-kmsgrab.so: undefined symbol: eglGetProcAddress
Hmm. If OBS is using EGL, then this function should have been linked into current process already.
Anyway, I've updated this plugin to not depend on EGL directly at all, and use the gs_texture_create_from_dmabuf
function provided by OBS. This should fix this particular issue.
yes, that fixed it. i had to point it to my discrete gpu, but after that it worked. thank you for you time.