Skip to content

Commit d6f637e

Browse files
committed
Add ENABLE_PM flag
1 parent 2df692e commit d6f637e

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

Diff for: config/nvidia-xrun

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# When enabled, nvidia-xrun will turn the card on before attempting to load the
2+
# modules and running the command, and turn it off after the commands exits and
3+
# the modules gets unloaded. If order for this to work, CONTROLLER_BUS_ID and
4+
# DEVICE_BUS_ID must be set correctly. IDs can be found by by inspecting the
5+
# output of lshw.
6+
ENABLE_PM=1
7+
18
# Bus ID of the PCI express controller
29
CONTROLLER_BUS_ID=0000:00:01.0
310

Diff for: nvidia-xrun

+6-2
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,9 @@ EXECL="/etc/X11/xinit/nvidia-xinitrc \"$EXECL\""
120120
COMMAND="xinit $EXECL -- $NEWDISP vt$LVT -nolisten tcp -br -config nvidia-xorg.conf -configdir nvidia-xorg.conf.d"
121121

122122
# --------- TURNING ON GPU -----------
123-
turn_on_gpu
123+
if [[ "$ENABLE_PM" == '1' ]]; then
124+
turn_on_gpu
125+
fi
124126

125127
# ---------- LOADING MODULES ----------
126128
load_modules
@@ -132,4 +134,6 @@ execute ${COMMAND}
132134
unload_modules
133135

134136
# --------- TURNING OFF GPU ----------
135-
turn_off_gpu
137+
if [[ "$ENABLE_PM" == '1' ]]; then
138+
turn_off_gpu
139+
fi

0 commit comments

Comments
 (0)