Linux 2012. 11. 10. 17:24

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:

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)
My installation contains packages from the official backtrack repositories only.

1. Modifying /etc/default/grub:

Before attempting to load the i915 driver you need* to add some values to yourGRUB_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:

Code:
i915.i915_enable_rc6=1 i915.lvds_downclock=1 i915.i915_enable_fbc=1 pcie_aspm=force
Your GRUB_CMDLINE_LINUX_DEFAULT line should now look similar to this:

GRUB_CMDLINE_LINUX_DEFAULT="text 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.

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

/etc/modprobe.d/blacklist.conf
Add the following at the bottom of the file:

Code:
blacklist nouveau
Now run:

Code:
update-initramfs -u
This will generate a new initrd.img for the 3.2.6 kernel. If the output from the command says its updating the older 2.6.39.4 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:

Code:
video=i915:modeset=1
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"
Run update-grub:

Code:
update-grub
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

'Linux' 카테고리의 다른 글

yum으로 tomcat 인스톨후 초기화 방법  (0) 2012.11.13
ubuntu kde 에 한글입력 올리기  (0) 2012.11.11
리눅스 chrome root 로 실행  (0) 2012.11.10
백트랙 초기 비밀번호  (0) 2012.11.10
startx 명령시 black screen 현상  (0) 2012.11.10
//
Linux 2012. 11. 10. 16:04

로컬에 설치를 한 분들은 설정치도 않은 패스워드에 깜짝 놀란다.


root // toor


//
Linux 2012. 11. 10. 15:28

유에스비 또는 dvd 로 부팅하고 로컬로 설치시에 자주 발생하게 된다.

(intel 그래픽을 이용하는 분들~~)

그래픽 리소스를 필요로 하기 때문인 것 같다.

메뉴선택 화면에서 탭 키를 누른 후  

text splash vga=791 부분을  text splash vga=791 i915.modeset=1 로 

바꾸고 enter !

startx ! 해결!

//