Permalink
Browse files

Added CUDA Support.. thanks to spitzbubchen..

  • Loading branch information...
1 parent 6cb0110 commit 4fe0f04ff68298422ba5eae313b5116dc748386e @MrMEEE committed Sep 3, 2011
Showing with 44 additions and 3 deletions.
  1. +2 −2 files/ironhide-configuration
  2. +42 −1 files/ironhide-settings
@@ -89,10 +89,10 @@ if [ -f /usr/local/bin/bumblebee-enablecard ] || [ -f /usr/local/bin/bumblebee-d
/usr/local/bin/bumblebee-enablecard
fi
x="question --height $HEIGHT --width $WIDTH"
- ${x} "Old remains of a Bumblebee installation was found, do you want to rename those files??.\n"\
+ ${x} "Old remains of a Bumblebee installation was found, do you want to remove those files??.\n"\
"This is HIGHLY recommend, as they will probably interfere with Ironhide.."
answer="${?}"
- if [ ${answer} -eq 1 ]; then
+ if [ ${answer} -eq 0 ]; then
if [ -f /etc/pm/power.d/bumblebee-disablecard-on-powerup ]; then
rm -rf /etc/pm/power.d/bumblebee-disablecard-on-powerup
fi
@@ -36,8 +36,20 @@ else
ECO_MODE=YES
fi
+if [[ $IRONHIDE_ACPI_MODE == "0" ]]; then
+ IRONHIDE_ACPI_MODE=NO
+else
+ IRONHIDE_ACPI_MODE=YES
+fi
+
+if [ -f /usr/lib/libcuda.so ] && [ -f /usr/lib/libGL.so ] && [ -f /usr/lib/libcuda.so.1 ]; then
+ IRONHIDE_CUDA_STATUS="Created"
+else
+ IRONHIDE_CUDA_STATUS="Not Created"
+fi
+
x="menu -w $WIDTH -h $HEIGHT"
-${x} "Automatic Shutdown of nVidia Card: $STOP_SERVICE_ON_EXIT" "Virtual Terminal: $VGL_DISPLAY" "Image Transport: $VGL_COMPRESS" "Read Back Mode: $VGL_READBACK" "Log File for VirtualGL: $VGL_LOG" "Powersave/Economic Mode: $ECO_MODE" "Always enable the nVidia card before disabling: $IRONHIDE_ACPI_MODE" "nVidia settings" "Done"
+${x} "Automatic Shutdown of nVidia Card: $STOP_SERVICE_ON_EXIT" "Virtual Terminal: $VGL_DISPLAY" "Image Transport: $VGL_COMPRESS" "Read Back Mode: $VGL_READBACK" "Log File for VirtualGL: $VGL_LOG" "Powersave/Economic Mode: $ECO_MODE" "Always enable the nVidia card before disabling: $IRONHIDE_ACPI_MODE" "Create Symlinks for CUDA Development: $IRONHIDE_CUDA_STATUS" "nVidia settings" "Done"
choice="$(0< "${dir_tmp}/${file_tmp}" )"
@@ -213,6 +225,35 @@ case "$choice" in
sed -i 's/IRONHIDE_ACPI_MODE.*/IRONHIDE_ACPI_MODE='$IRONHIDE_ACPI_MODE'/' $CONFIGURATIONFILE
;;
+ "Create Symlinks for CUDA Development"*)
+ x="question --width $WIDTH --height $HEIGHT"
+ ${x} "Do you want to create symlinks needed for CUDA developmen.\n"\
+ "If not, any existing symlinks will be removed."
+ answer="${?}"
+
+ if [ ${answer} -eq 0 ]; then
+ if [ ! -f /usr/lib/libcuda.so ]; then
+ ln -s /usr/lib/nvidia-current/libcuda.so /usr/lib/libcuda.so
@Lekensteyn
Lekensteyn Sep 3, 2011 Contributor

CUDA developers should set LD_LIBRARY_PATH to include /usr/lib/nvidia-current (and /usr/lib32/nvidia-current for 32-bit applications). As an alternative, a file can be put in /etc/ld.so.conf.d/ containing the nvidia-current directory. Be sure to name it like zzznvidia to give other library paths a higher priority. (ldconfig must be ran to update the cache afterwards)

+ fi
+ if [ ! -f /usr/lib/libGL.so ]; then
+ ln -s /usr/lib/nvidia-current/libGL.so /usr/lib/libGL.so
+ fi
+ if [ ! -f /usr/lib/libcuda.so.1 ]; then
+ ln -s /usr/lib/nvidia-current/libcuda.so.1 /usr/lib/libcuda.so.1
+ fi
+ else
+ if [ -f /usr/lib/libcuda.so ]; then
+ rm -rf "/usr/lib/libcuda.so"
+ fi
+ if [ -f /usr/lib/libGL.so ]; then
+ rm -rf "/usr/lib/libGL.so"
+ fi
+ if [ -f /usr/lib/libcuda.so.1 ]; then
+ rm -rf "/usr/lib/libcuda.so.1"
+ fi
+ fi
+
+ ;;
"nVidia settings"*)
optirun nvidia-settings -c $VGL_DISPLAY

0 comments on commit 4fe0f04

Please sign in to comment.