lgx2userspace
lgx2userspace copied to clipboard
Instructions for Building and Installing on Arch Linux for OBS (Endeavour OS): CMake + conan
Instructions for Building and Installing on Arch Linux for OBS (Endeavour OS): CMake + conan
In case it helps anyone here, the latest of conan doesn't work here without some changes.
Pre-build
yay -S cmake libusb libusb-compat sdl2 sdl2_gfx libpulse v4l2loopback-dkms v4l2loopback-utils libxcb libfontenc libice libsm libxaw libxcomposite libxcursor libxres conan sdl glfw glad mesa libao
git clone https://github.com/ChrisAJS/lgx2userspace
cd lgx2userspace
Change GENERATORS in dependencies.cmake (conan 1.x -> 2.x)
-conan_cmake_configure(REQUIRES libusb/1.0.26 sdl/2.26.1 glfw/3.3.8 glad/0.1.36 opengl/system GENERATORS cmake_find_package)
+conan_cmake_configure(REQUIRES libusb/1.0.26 sdl/2.26.1 glfw/3.3.8 glad/0.1.36 opengl/system GENERATORS CMakeToolchain CMakeDeps)
Change glfw::glfw to glfw in dependencies.cmake (conan 1.x -> 2.x)
-set(PLATFORM_LIBS SDL2::SDL2main SDL2::SDL2 glfw::glfw glad::glad libusb::libusb opengl::opengl ${ADDITIONAL_LIBS})
+set(PLATFORM_LIBS SDL2::SDL2main SDL2::SDL2 glfw glad::glad libusb::libusb opengl::opengl ${ADDITIONAL_LIBS})
Build
mkdir build && cd build
cmake .. -DENABLE_LGX_GC550_SUPPORT=ON -DCMAKE_BUILD_TYPE=Release
make
cmake --install .
Change
-DENABLE_LGX_GC550_SUPPORT=ONtoOFFif you don't want GC550 support.
Note: cmake will take a long time. Also, if the install/build yells about any other dependencies, just install them before running that line again.
Post-build
Run the rules:
sudo cp ../999-avermedia.rules /etc/udev/rules.d/999-avermedia.rules
sudo udevadm control --reload-rules
Unplug and plug in your LGX. Restart your computer if you also recently updated your system (X will fail to create the window if you have)
Set up your v4l2 / pulseaudio
For LGX2
sudo modprobe v4l2loopback video_nr=99 exclusive_caps=1 card_label="LGX2"
pactl load-module module-null-sink sink_name=lgx2 sink_properties=device.description=LGX2
pactl load-module module-remap-source master=lgx2.monitor source_name=lgx2 source_properties=device.description=LGX2Audio
For LGX
sudo modprobe v4l2loopback video_nr=99 exclusive_caps=1 card_label="LGX"
pactl load-module module-null-sink sink_name=lgx sink_properties=device.description=LGX
pactl load-module module-remap-source master=lgx.monitor source_name=lgx source_properties=device.description=LGXAudio
From the build directory, run this:
For LGX2
./src/cli/lgx2userspace -d /dev/video99 -a lgx2
For LGX
./src/cli/lgx2userspace -x -d /dev/video99 -a lgx
OBS Setup
Open OBS, add these sources: