Loading the i915 driver in the 3.2.6 kernel without adding unsupported PPA's

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 2.6.39.4 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.

Machine specs

All of this was tested on my Dell XPS 15z laptop, the important specs are below:

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.

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:

Code:

update-grub

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:

Code:

modprobe -r nouveau
modprobe i915 modeset=1

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.

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

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:

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:

Just want to thank you so much for figuring this out... you don't know how much I searched for this when r2 new kernel came out. Well after following all these steps it seem to work but once I reboot at the very end I would still go to my old setting. I double checked this and thriple checked it. Nothing still the same but I notice you had said not to edit the /boot/grub/grub.cf file because once you do and update it will wipe it out. Well for fun I just added the the code text video=i915:modeset=1 i915.i915_enable_rc6=1 i915.lvds_downclock=1 i915.i915_enable_fbc=1 pcie_aspm=force and it worked perfect. I think i'm going to leave it like this. I just have to remember when I update it to make sure I make a copy of that. LOL...

Other thing I notice is when I made the change now once it gets the prompte for root username i have to press the F2 on my keyboard to make it bright... I guess I could live with that since my true video display is what I wanted..

I also went into the "/var/log/Xorg.0.log" and saw some more errors that the following files don't exist.

/usr/share/fonts/X11/cryllic
" "100dpi
" "75dpi'

And also that the ACPI failed (/var/run/acpid/socket)(no such file or directory)

This is all on a HP G62 - Core i3 - 4G RAM - some shitty Integrated Graphics card. But in BT5 R1 the resolution was running 1920 X 1080 just fine.

Okay well thanks in advance for the help, I don't even know where to start otherwise I'd try figuring it out myself, and I haven't tried the other guide by snafu777 yet but I will if you don't think this will work for me.

Try removing the vga=791 from your GRUB_CMDLINE_LINUX_DEFAULT line re-run the update-grub command and then reboot. The vga command can get in the way of the i915 module, in this case it looks like the VESA module continues to be loaded when you attempted to startx so the i915 module couldn't take over responsibly of the display, which your Xorg error log seems to report is the case.

If that doesn't work for you it might be worth removing your xorg.conf completely as there could be conflicting modules or settings set within it. You can back the file up by using the mv command which will also rename the file:

Code:

mv /etc/X11/xorg.conf /etc/X11/xorg.conf.bak

This will make your /etc/X11/xorg.conf file become xorg.conf.bak. Now you can startx to see if your xorg.conf is causing problems. If you still can't startx you can then run the following mv command to undo any of the changes:

Try removing the vga=791 from your GRUB_CMDLINE_LINUX_DEFAULT line re-run the update-grub command and then reboot. The vga command can get in the way of the i915 module, in this case it looks like the VESA module continues to be loaded when you attempted to startx so the i915 module couldn't take over responsibly of the display, which your Xorg error log seems to report is the case.

If that doesn't work for you it might be worth removing your xorg.conf completely as there could be conflicting modules or settings set within it. You can back the file up by using the mv command which will also rename the file:

Code:

mv /etc/X11/xorg.conf /etc/X11/xorg.conf.bak

This will make your /etc/X11/xorg.conf file become xorg.conf.bak. Now you can startx to see if your xorg.conf is causing problems. If you still can't startx you can then run the following mv command to undo any of the changes:

@porter08 Great glad its working! I will add some notes in the original thread about the possibility the xorg.conf conflicting with the i915 module. Its absolutely fine to leave the xorg.conf.bak file, it is no longer in use and can be left for legacy purposes.

@landon That's awesome! Thanks for the mention in the script, I'll add a link in the original thread.

@porter08 Great glad its working! I will add some notes in the original thread about the possibility the xorg.conf conflicting with the i915 module. Its absolutely fine to leave the xorg.conf.bak file, it is no longer in use and can be left for legacy purposes.

@landon That's awesome! Thanks for the mention in the script, I'll add a link in the original thread.

No problem. Let me know if anything needs adjusting. I created another version that performs steps 3&4 instead of using a start-up script to unload the nouveau driver. In addition, I made compatible for anyone who ran the first one.
The script also executes fix-splash however, script or not, it's not working for me.
If the script gets any bigger I will re-write it in python. Have a look http://techauthority.net/backtrack/i915-2.sh.txt

No problem. Let me know if anything needs adjusting. I created another version that performs steps 3&4 instead of using a start-up script to unload the nouveau driver. In addition, I made compatible for anyone who ran the first one.
The script also executes fix-splash however, script or not, it's not working for me.
If the script gets any bigger I will re-write it in python. Have a look http://techauthority.net/backtrack/i915-2.sh.txt

Great I'll update the wget line in the original thread! Regarding boot splash I believe the vga parameter needs to be set on the GRUB_CMDLINE_LINUX_DEFAULT line (e.g. vga=791) for it to work, however the vga parameter will conflict with the i915 module in this instance. Not everyone likes boot splash so it might be advisable to not make the script automatically run it (I personally don't use it due to my encryption setup), it should be a user preference I think.

I just want to say you guys are awesome, running like a clock now. I executed the script that Landon made based on James2k's fix, it worked flawlessly. Graphics are top of the line now........................thanks again fellas!