#!/bin/bash # Rename this script to i915.sh and make it executable ( chmod +x i915.sh ) # # This script will load the i915 driver in the 3.2.6 kernel # for Backtrack 5 R2 without adding unsupported PPA's. # Adding unsupported PPAs to any Backtrack Distro is considered # an unacceptable practice that could compromise the stability and # more importantly, security of your operating system. # Script Author: Landon Mayo # E-Mail landon.mayo[at]OWASP[dot]org # License: GNU General Public Ver. 2 (the ``GPL``). # Version 1.1 # A big thanks goes to James2k for his guide on this: # Guide URL: backtrack-linux.org/forums/showthread.php?t=48904 # This should get your startx up and running, but you must read his guide # to ensure everything is running properly. #***Make sure X Server is not running. Execute in console only***# #rename the xorg.conf to xorg.conf.bak so X no longer will use the config mv /etc/X11/xorg.conf /etc/X11/xorg.conf.bak echo ">> Don't worry if this throws an error" echo "" echo ">> blacklisting nouveau to keep it from loading permanently" echo "blacklist nouveau" >> /etc/modprobe.d/blacklist.conf echo ">> done" echo ">> Updating the initramfs of the newest kernel:" update-initramfs -u echo ">> done" # changing to grub's directory cd /etc/default echo ">> backing up orginal grub to grub.bak" cp grub grub.bak echo ">> done" # Replacing: Orginal String: GRUB_CMDLINE_LINUX_DEFAULT="text splash vga=791" # With: GRUB_CMDLINE_LINUX_DEFAULT="text video=i915:modeset=1 i915.i915_enable_rc6=1 i915.lvds_downclock=1 i915.i915_enable_fbc=1 pcie_aspm=force" echo ">> Now editing grub" sed -i -e 's/"text splash vga=791"/"text video=i915:modeset=1 i915.i915_enable_rc6=1 i915.lvds_downclock=1 i915.i915_enable_fbc=1 pcie_aspm=force"/g' `find . -iname 'grub'` # This will do the same as above but only if you ran version 1.0 of this script. sed -i -e 's/"text i915.i915_enable_rc6=1 i915.lvds_downclock=1 i915.i915_enable_fbc=1 pcie_aspm=force"/"text video=i915:modeset=1 i915.i915_enable_rc6=1 i915.lvds_downclock=1 i915.i915_enable_fbc=1 pcie_aspm=force"/g' `find . -iname 'grub'` # running update-grub to finalize our change echo ">> invoking "update-grub"" update-grub echo ">> done" echo ">> rebooting... startx should now work." echo ">> If you run into any issues visit http://www.backtrack-linux.org/forums/showthread.php?t=48904" shutdown -r now