This guide offers an alternative method of loading the i915 driver in the 3.2.6 kernel without adding unsupported PPA's or using packages which are not from the official BackTrack repositories.
Recently I've been trying to get the i915 graphic driver loaded in the new 3.2.6 kernel. After upgrading from R1 > R2 I noticed that the new kernel does not seem to load the i915 driver on boot where as the older 220.127.116.11 kernel loaded it automatically. The new kernel remains functional however in my case my Dell XPS 15z laptop graphic session was stuck at 1280 x 1024, which for a screen that has 1920 x 1080 native resolution, looks quite ugly and bad.
A couple of community members have been posting how to get the driver loaded, but every guide I've seen involves using unsupported PPA's or packages that are not from the official backtrack repositories. With no disrespect to their work, myself being a bit of a perfectionist (or maybe a purist) I tend to not go down the unsupported PPA route if I can avoid it. This guide should hopefully help you get the i915 driver loaded, without the need to mess with any software sources or PPA's, keeping your BackTrack installation pure.
All of this was tested on my Dell XPS 15z laptop, the important specs are below:
My installation contains packages from the official backtrack repositories only.
Dell XPS 15z i5 2.40 Ghz Dual Core
Intel GPU (Onboard) & Dedicated NVIDIA 2GB GeForce 525M (Optimus)
BackTrack 5 R2 KDE 64-bit (Upgraded from R1 following the official guide)
Installed on a 32 GB USB Stick with Encryption. (LVM)
1. Modifying /etc/default/grub:
Before attempting to load the i915 driver you need* to add some values to your GRUB_CMDLINE_LINUX_DEFAULT line in your /etc/default/grub config.
*Without doing this, I found the i915 driver did not work correctly and often hung or crashed my machine with the CPU at full throttle when attempting to startx.
Append these values to your GRUB_CMDLINE_LINUX_DEFAULT line:
Your GRUB_CMDLINE_LINUX_DEFAULT line should now look similar to this:
i915.i915_enable_rc6=1 i915.lvds_downclock=1 i915.i915_enable_fbc=1 pcie_aspm=force
NOTE: Don't add these on your boot/grub/grub.cfg. These changes will get wiped whenever either a certain package runs the upgrade-grub script or when you run update-grub manually.
GRUB_CMDLINE_LINUX_DEFAULT="text i915.i915_enable_rc6=1 i915.lvds_downclock=1 i915.i915_enable_fbc=1 pcie_aspm=force"
Here text mode is used rather than text splash (which is the default) as I have encryption set on my root partition and its more convenient for me see the console information (i.e. Enter password prompt) rather than having to press F8 to get to console. Having text mode set is not a necessary part of getting the i915 driver working. Though I personally would choose to have it enabled anyway as it can provide useful information regarding modules during boot.
You may also be wondering what all these commands are actually for. Mainly they are to help power saving (i.e. prevent battery drain) and to keep things running smoothly, as without them my laptop seems to run much hotter in the newer kernel than the older kernel.
Once you've modified the GRUB_CMDLINE_LINUX_DEFAULT line run the update-grub command for the changes to be applied on next boot:
IMPORTANT: Reboot your machine before continuing.
This is required so the new commands on the GRUB_CMDLINE_LINUX_DEFAULT line become effective.
2. Manually modprobe the i915 module
Now you should be back at console asking you to login. Now your going to attempt to load the i915 module. Before that however for machines with NVIDIA GPU's you may want to remove the nouveua driver as its not required and its just going to get in the way:
The first command removes the nouveau driver as its not capable of giving me my true screen resolution (In my case 1920 x 1080) and generally I don't need it. (Note: nouveau will only be present on a system with an NVIDIA GPU). The second command loads the i915 driver.
modprobe -r nouveau
modprobe i915 modeset=1
WARNING: Do not modprobe the i915 module while in an X Session, do it in console.
Observations: At first glance at the situation I first thought the i915 driver was completely missing from the 3.2.6 kernel, however this is not the case as modprobe is able to load it. You can also confirm the presence of the i915 driver by using a bit of grep magic modprobe -l | grep i915.
After you modprobe the i915 module, your screen should go blank for a second or so and should return with the screen resolution changed to your native resolution in console.
You can now proceed to startx and hopefully you will be greeted with BackTrack 5 R2 with the 3.2.6 kernel using the i915 driver. If everything worked out you can proceed to stop the nouveau driver loading at boot permanently, as well as getting the i915 module loaded automatically at boot.
Starting X Error: If you got an error when attempting to start X, you may already have an xorg.conf present which is conflicting with the loading of the i915 module. To remove it you can following the steps outlined in the troubleshooting section towards the bottom of this guide.
3. Stop nouveau from loading during boot permanently (If applicable)
A more convenient way of stopping the nouveau driver loading at boot without running modprobe is to apply it permanently to the blacklist.conf
Add the following at the bottom of the file:
This will generate a new initrd.img for the 3.2.6 kernel. If the output from the command says its updating the older 18.104.22.168 kernel you need to follow the steps in this guide to correct this behaviour.
Any subsequent boots after this will stop the driver from loading completly, you will be able to confirm this by checking your console output and looking for any lines with nouveau mentioned, you can also run lsmod and check nouveau is not listed anywhere.
4. Loading the i915 module automatically:
(Probably the moment you've been waiting for!)
If you have confirmed that manually loading the i915 module via modprobe works, you can startx with no problems and you get the desired screen resolution, you can make the module load during boot like its supposed to just like the older kernel. To do this you need to append this to your GRUB_CMDLINE_LINUX_DEFAULT line:
Here's what your grub line should look like with this change:
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"
Now you can reboot to see if the i915 module will load automatically.
On your next boot you should get the i915 module loaded automatically! What should happen during the boot process is your screen resolution will start off being set to a low generic resolution such as 1024 x 768 and then should automatically adjust to your native resolution as the i915 module kicks in. This is because during the boot process the VESA module is loaded by default first as its a generic graphics driver which will work on any machine, then as the i915 module is loaded responsibility for the display is transferred over and the VESA module is deactivated.
Please let me know if this guide works for you. If you are having problems try the troubleshooting section at the bottom of this guide, if you still can't get everything working, feel free reply to the thread
5. Using a script to perform the steps in this guide (Optional):
Thanks to landon he has prepared a small script that will perform all of the steps in the guide for you. This is very useful if want to perform these steps on multiple machines. You can find it below:
All of the required information on how to use this script is written in the comments within the script itself, but for convenience here's a quick way of running the script:
Rename the script, omitting the .txt extension and making the filename more friendly:
CHMOD the script so its executable:
mv i915-2.sh.txt i915.sh
Now you can run the script. I would recommend you read over the guide (if you haven't already) before running the script to make sure you know what exactly is going to change (system wise).
If you are having problems after following the steps in the guide hopefully this section will help you get the i915 module working for you.
Starting X throws an error:
It is likely that you have an xorg.conf (located at /etc/X11/xorg.conf) which is causing a conflict with the loading of the i915 module. To fix this you can run:
This will rename the xorg.conf to xorg.conf.bak and will prevent X from using the configuration file. Now try starting X again by running startx and it should work.
mv /etc/X11/xorg.conf /etc/X11/xorg.conf.bak