mirror of
https://github.com/Lurkki14/tuxclocker.git
synced 2024-11-21 15:57:25 -06:00
use NVML from Flatpak NVIDIA runtime
Fixes NVML failing due to mismatch with driver version
This commit is contained in:
parent
2fe03802cf
commit
103f8707b9
@ -102,18 +102,11 @@ NVIDIA GPUs require [Coolbits](https://wiki.archlinux.org/index.php/NVIDIA/Tips_
|
||||
AMD GPUs require the [amdgpu.ppfeaturemask](https://wiki.archlinux.org/title/AMDGPU#Boot_parameter) boot parameter to edit writable properties (`amdgpu.ppfeaturemask=0xffffffff` for all functionality)
|
||||
|
||||
## Using prebuilt binaries
|
||||
NOTE: the prebuilt binaries may not work for NVIDIA GPUs due to NVML requiring a specific version of the NVIDIA driver. See [this issue.](https://github.com/Lurkki14/tuxclocker/issues/63)
|
||||
|
||||
Possible remedies:
|
||||
|
||||
- Use a distribution package if applicable
|
||||
- Compile from source
|
||||
- Create a Flatpak package
|
||||
|
||||
You can use the `tuxclocker.tar` from the release page if you don't want to compile. The tarball is generated from the `mkTarball.sh` script.
|
||||
|
||||
- Download the tarball into some empty directory
|
||||
- Extract the contents eg. (`tar xf tuxlocker.tar`)
|
||||
- For NVIDIA users, run `./nvidiaInstall.sh` before running to get suitable NVIDIA libraries through Flatpak
|
||||
- Run `sudo echo && ./run.sh` in the same folder (sudo is needed for the daemon)
|
||||
|
||||
## Using distribution packages
|
||||
|
15
mkTarball.sh
15
mkTarball.sh
@ -18,14 +18,25 @@ export DBUS_SYSTEM_BUS_ADDRESS='unix:path=/tmp/tuxclocker-dbus-socket'
|
||||
export LD_LIBRARY_PATH=\"${libPathsColonSep[@]}\"
|
||||
export QT_PLUGIN_PATH=\"$qtPluginPath\"
|
||||
export TUXCLOCKER_PLUGIN_PATH=\"$tuxclockerPluginPath\"
|
||||
nvidiaVersion=\$(cat /sys/module/nvidia/version | sed 's/\./-/g')
|
||||
flatpakNvidiaPath=\$(find /var/lib/flatpak/runtime/org.freedesktop.Platform.GL.nvidia-\$nvidiaVersion/x86_64/*/active/files/lib)
|
||||
sudo -E dbus-run-session --config-file=dev/dbusconf.conf \
|
||||
sudo -E LD_LIBRARY_PATH=\"\$LD_LIBRARY_PATH\" ./.tuxclockerd-wrapped & \
|
||||
sudo -E LD_LIBRARY_PATH=\$flatpakNvidiaPath:\"\$LD_LIBRARY_PATH\" ./.tuxclockerd-wrapped & \
|
||||
(unset LD_LIBRARY_PATH; sleep 2) && ./.tuxclocker-qt-wrapped; \
|
||||
unset LD_LIBRARY_PATH && \
|
||||
sudo kill \$(pidof .tuxclockerd-wrapped)
|
||||
" > run.sh
|
||||
chmod +x run.sh
|
||||
|
||||
# Script to install suitable NVIDIA runtime through Flatpak
|
||||
echo "
|
||||
nvidiaVersion=$(cat /sys/module/nvidia/version | sed 's/\./-/g')
|
||||
flatpak install org.freedesktop.Platform.GL.nvidia-\$nvidiaVersion
|
||||
" > nvidiaInstall.sh
|
||||
chmod +x nvidiaInstall.sh
|
||||
|
||||
# Only copy libraries from Nix store (.so's)
|
||||
neededLibs=$(find $(nix-store -qR $(nix-build release.nix)) | grep ".*.so")
|
||||
tar cavf tuxclocker.tar.xz ${neededLibs[@]} ./.tuxclocker-qt-wrapped ./.tuxclockerd-wrapped ./run.sh ./dev/dbusconf.conf
|
||||
tar cavf tuxclocker.tar.xz ${neededLibs[@]} ./.tuxclocker-qt-wrapped ./.tuxclockerd-wrapped \
|
||||
./run.sh ./dev/dbusconf.conf ./nvidiaInstall.sh
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user