From aabab6dd872fb7dc9d917b81011bc04e5fe2b185 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 28 Jul 2023 16:46:55 +0200 Subject: Move additional scripts to 'extra' directory --- 88-gsr-coolbits.conf | 5 ----- README.md | 4 ++-- extra/88-gsr-coolbits.conf | 5 +++++ extra/gsr-nvidia.conf | 1 + extra/install_coolbits.sh | 10 ++++++++++ extra/install_preserve_video_memory.sh | 8 ++++++++ gsr-nvidia.conf | 1 - install_coolbits.sh | 10 ---------- install_preserve_video_memory.sh | 8 -------- 9 files changed, 26 insertions(+), 26 deletions(-) delete mode 100644 88-gsr-coolbits.conf create mode 100644 extra/88-gsr-coolbits.conf create mode 100644 extra/gsr-nvidia.conf create mode 100755 extra/install_coolbits.sh create mode 100755 extra/install_preserve_video_memory.sh delete mode 100644 gsr-nvidia.conf delete mode 100755 install_coolbits.sh delete mode 100755 install_preserve_video_memory.sh diff --git a/88-gsr-coolbits.conf b/88-gsr-coolbits.conf deleted file mode 100644 index be665f1..0000000 --- a/88-gsr-coolbits.conf +++ /dev/null @@ -1,5 +0,0 @@ -Section "Device" - Identifier "Device0" - Driver "nvidia" - Option "Coolbits" "12" -EndSection diff --git a/README.md b/README.md index 43be0d9..55c888e 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ It is recommended to save the video to a SSD because of the large file size, whi Note that if you have a very powerful CPU and a not so powerful GPU and play a game that is bottlenecked by your GPU and barely uses your CPU then a CPU based screen recording (such as OBS with libx264 instead of nvenc) might perform slightly better than GPU Screen Recorder. At least on NVIDIA. ## Note about optimal performance on NVIDIA NVIDIA driver has a "feature" (read: bug) where it will downclock memory transfer rate when a program uses cuda (or nvenc, which uses cuda), such as GPU Screen Recorder. To work around this bug, GPU Screen Recorder can overclock your GPU memory transfer rate to it's normal optimal level.\ -To enable overclocking for optimal performance use the `-oc` option when running GPU Screen Recorder. You also need to have "Coolbits" NVIDIA X setting set to "12" to enable overclocking. You can automatically add this option if you run `sudo install_coolbits.sh` and then reboot your computer.\ +To enable overclocking for optimal performance use the `-oc` option when running GPU Screen Recorder. You also need to have "Coolbits" NVIDIA X setting set to "12" to enable overclocking. You can automatically add this option if you run `sudo extra/install_coolbits.sh` and then reboot your computer.\ Note that this only works when Xorg server is running as root, and using this option will only give you a performance boost if the game you are recording is bottlenecked by your GPU.\ Note! use at your own risk! ## Note about optimal performance on AMD/Intel @@ -74,7 +74,7 @@ You can use these scripts to start replay at system startup if you add `scripts/ ## Issues ### NVIDIA -Nvidia drivers have an issue where CUDA breaks if CUDA is running when suspend/hibernation happens, and it remains broken until you reload the nvidia driver. To fix this, either disable suspend or tell the NVIDIA driver to preserve video memory on suspend/hibernate by using the `NVreg_PreserveVideoMemoryAllocations=1` option. You can run `install_preserve_video_memory.sh` to automatically add that option to your system. +Nvidia drivers have an issue where CUDA breaks if CUDA is running when suspend/hibernation happens, and it remains broken until you reload the nvidia driver. To fix this, either disable suspend or tell the NVIDIA driver to preserve video memory on suspend/hibernate by using the `NVreg_PreserveVideoMemoryAllocations=1` option. You can run `sudo extra/install_preserve_video_memory.sh` to automatically add that option to your system. # Demo [![Click here to watch a demo video on youtube](https://img.youtube.com/vi/n5tm0g01n6A/0.jpg)](https://www.youtube.com/watch?v=n5tm0g01n6A) diff --git a/extra/88-gsr-coolbits.conf b/extra/88-gsr-coolbits.conf new file mode 100644 index 0000000..be665f1 --- /dev/null +++ b/extra/88-gsr-coolbits.conf @@ -0,0 +1,5 @@ +Section "Device" + Identifier "Device0" + Driver "nvidia" + Option "Coolbits" "12" +EndSection diff --git a/extra/gsr-nvidia.conf b/extra/gsr-nvidia.conf new file mode 100644 index 0000000..10cbf7d --- /dev/null +++ b/extra/gsr-nvidia.conf @@ -0,0 +1 @@ +options nvidia NVreg_PreserveVideoMemoryAllocations=1 diff --git a/extra/install_coolbits.sh b/extra/install_coolbits.sh new file mode 100755 index 0000000..053e8ab --- /dev/null +++ b/extra/install_coolbits.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +script_dir=$(dirname "$0") +cd "$script_dir" + +[ $(id -u) -ne 0 ] && echo "You need root privileges to run the install script" && exit 1 + +for xorg_conf_d in "/etc/X11/xorg.conf.d" "/usr/share/X11/xorg.conf.d" "/usr/lib/X11/xorg.conf.d"; do + [ -d "$xorg_conf_d" ] && install -Dm644 "88-gsr-coolbits.conf" "$xorg_conf_d/88-gsr-coolbits.conf" && exit 0 +done diff --git a/extra/install_preserve_video_memory.sh b/extra/install_preserve_video_memory.sh new file mode 100755 index 0000000..c5cf658 --- /dev/null +++ b/extra/install_preserve_video_memory.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +script_dir=$(dirname "$0") +cd "$script_dir" + +[ $(id -u) -ne 0 ] && echo "You need root privileges to run the install script" && exit 1 + +install -Dm644 gsr-nvidia.conf /etc/modprobe.d/gsr-nvidia.conf diff --git a/gsr-nvidia.conf b/gsr-nvidia.conf deleted file mode 100644 index 10cbf7d..0000000 --- a/gsr-nvidia.conf +++ /dev/null @@ -1 +0,0 @@ -options nvidia NVreg_PreserveVideoMemoryAllocations=1 diff --git a/install_coolbits.sh b/install_coolbits.sh deleted file mode 100755 index 053e8ab..0000000 --- a/install_coolbits.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -script_dir=$(dirname "$0") -cd "$script_dir" - -[ $(id -u) -ne 0 ] && echo "You need root privileges to run the install script" && exit 1 - -for xorg_conf_d in "/etc/X11/xorg.conf.d" "/usr/share/X11/xorg.conf.d" "/usr/lib/X11/xorg.conf.d"; do - [ -d "$xorg_conf_d" ] && install -Dm644 "88-gsr-coolbits.conf" "$xorg_conf_d/88-gsr-coolbits.conf" && exit 0 -done diff --git a/install_preserve_video_memory.sh b/install_preserve_video_memory.sh deleted file mode 100755 index c5cf658..0000000 --- a/install_preserve_video_memory.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -script_dir=$(dirname "$0") -cd "$script_dir" - -[ $(id -u) -ne 0 ] && echo "You need root privileges to run the install script" && exit 1 - -install -Dm644 gsr-nvidia.conf /etc/modprobe.d/gsr-nvidia.conf -- cgit v1.2.3