Thinkpad P70

From Alteeve Wiki
Jump to navigation Jump to search

 AN!Wiki :: How To :: Thinkpad P70

Adventures in getting Linux supported on the Thinkpad P70 with the Nvidia M600M .

CentOS 7

Note: This is based on Dedoimedo's tutorial, except updated for UEFI and using proper systemd calls.

BIOS

Disable Secure Boot, enable UEFI booting and use discrete video.

Install the OS

  • Press e and add nomodeset i915.preliminary_hw_support=1, then press 'ctrl + x' to boot.
Note: XFS appears to hang when trying to sleep CentOS 7 on the EPEL 4.4.2 mainline kernel used here. For now, use 'ext4'.
Note: The Wireless NIC will not be available during the install.

Install CentOS 7 using the ext4 filesystem and install the "GNOME Desktop".

Preparing the OS

Update the OS and reboot.

yum -y update
reboot

Install ELRpo kernel-ml

The wireless card won't work on the stock kernel (yet), so we'll install the ELRepo mainline kernel.

rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
Retrieving http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
warning: /var/tmp/rpm-tmp.kgKlL5: Header V4 DSA/SHA1 Signature, key ID baadae52: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:elrepo-release-7.0-2.el7.elrepo  ################################# [100%]

Install the v4.4.2 mainline kernel.

yum -y --enablerepo=elrepo-kernel install kernel-ml kernel-ml-devel
<install output>

Make the mainline kernel the default kernel.

grub2-set-default 0
Note: Don't reboot yet.

Blacklist 'nouveau'

Note: We're going to black-list the nouveau drivers for the binary Nvidia driver install. We need to reboot now to load the new kernel, so we will blacklist the driver now.

Blacklist nouveau in grub.

cp /etc/default/grub /etc/default/grub.original
vim /etc/default/grub

Change the GRUB_CMDLINE_LINUX line to:

GRUB_CMDLINE_LINUX="rd.lvm.lv=darkmatter_vg1/root i915.preliminary_hw_support=1 rdblacklist=nouveau"

Verify the change:

diff -u /etc/default/grub.original /etc/default/grub
--- /etc/default/grub.original	2016-02-24 19:25:54.285926018 -0500
+++ /etc/default/grub	2016-02-24 19:26:27.880924027 -0500
@@ -3,5 +3,5 @@
 GRUB_DEFAULT=saved
 GRUB_DISABLE_SUBMENU=true
 GRUB_TERMINAL_OUTPUT="console"
-GRUB_CMDLINE_LINUX="rd.lvm.lv=centos/root nomodeset rhgb quiet"
+GRUB_CMDLINE_LINUX="rd.lvm.lv=centos/root i915.preliminary_hw_support=1 rdblacklist=nouveau"
 GRUB_DISABLE_RECOVERY="true"

Tegenerate the grub.cfg:

Warning: This assumes you are using UEFI! If you are using standard BIOS, use -o /boot/grub2/grub.cfg.
grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.4.2-1.el7.elrepo.x86_64
Found initrd image: /boot/initramfs-4.4.2-1.el7.elrepo.x86_64.img
Found linux image: /boot/vmlinuz-3.10.0-327.10.1.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-327.10.1.el7.x86_64.img
Found linux image: /boot/vmlinuz-3.10.0-327.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-327.el7.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-61682632bdc143ad90596fa03a80f1a4
Found initrd image: /boot/initramfs-0-rescue-61682632bdc143ad90596fa03a80f1a4.img
done

Create (or append) /etc/modprobe.d/blacklist.conf:

echo "blacklist nouveau" >> /etc/modprobe.d/blacklist.conf
cat /etc/modprobe.d/blacklist.conf
blacklist nouveau

Reboot:

reboot

Verify that nouveau isn't loaded anymore.

lsmod |grep nouveau
# no output

Install the Nvidia Binary Drivers

Verify that only the Nvidia GPU is installed.

lspci |grep VGA
01:00.0 VGA compatible controller: NVIDIA Corporation GM107GLM [Quadro M600M] (rev a2)

If you see a second Intel entry, you're still in 'Hybrid' mode.

Install Dependencies

Make sure dependencies are installed:

yum install gcc make

Make Sure the Running Kernel and the Kernel Source Match

Verify that the active kernel matches the kernel source:

uname -r
4.4.2-1.el7.elrepo.x86_64
rpm -q kernel-ml-devel
kernel-ml-devel-4.4.2-1.el7.elrepo.x86_64

Here, the version is 4.4.2-1 for both, so we're ready. If not, fix it before proceeding.

Download the Latest Nvidia Driver

Warning: The binary driver will only work on the kernel it was compiled against! If you update the kernel, you will need to repeat the following steps to get your GUI back.

Download the latest Nvidia drivers for the Quadro M600M:

Product Type: Quadro
Product Series: Quadro Series (Notebooks)
Product: Quadro M600M
Operating System: Linux 64-bit
Download Type: Linux Long Lived Drivers
Language: English US

Save the file (NVIDIA-Linux-x86_64-361.28.run in this example) and make sure it is executable.

chown 755 NVIDIA-Linux-x86_64-361.28.run 
ls -lah NVIDIA-Linux-x86_64-361.28.run
-rwxr-xr-x. 1 755 digimer 84M Feb 17 20:47 NVIDIA-Linux-x86_64-361.28.run

Install the Driver

Note: The next steps are much easier to do over SSH.

Switch to the command-line only (what used to be init 3):

systemctl isolate multi-user.target
PolicyKit daemon disconnected from the bus.
We are no longer a registered authentication agent.

Run the script to install the Nvidia drivers.

./NVIDIA-Linux-x86_64-361.28.run
Verifying archive integrity... OK
Uncompressing NVIDIA Accelerated Graphics Driver for Linux-x86_64 361.28...............................
.......................................................................................................
.......................................................................................................
.......................................................................................................
.......................................................................................................
.........

Prompts:

  • Please read the following LICENSE and then select either "Accept" to accept the license and continue with the installation, or select "Do Not Accept" to abort the installation.
    • ACCEPT
  • Install NVIDIA's 32-bit compatibility libraries?
    • No
  • Would you like to run the nvidia-xconfig utility to automatically update your X configuration file so that the NVIDIA X driver will be used when you restart X? Any pre-existing X configuration file will be backed up.
  • Yes
Note: Simply re-enabling the GUI didn't work for me (systemctl isolate graphical.target).

When it exits, assuming there were no errors, reboot.

reboot

When the system comes back up, you should have working video!

Help! I got a black Screen!

For reasons not yet solved, some conditions (booting, etc) will leave you with a black screen.

To recover, press <ctrl> + <alt> + <F2>, wait a few seconds, then <ctrl> + <alt> + <F1>.

This switches to the command line and then back to the graphical interface, which seems to kick things back to working.

Intel Wireless 8260

Currently, there is a problem with the v4.4.2 kernel where the wireless comes up, but it takes a while. You can see this in dmesg;

dmesg |grep iwlwifi
[    4.118979] iwlwifi 0000:04:00.0: enabling device (0000 -> 0002)
[    4.162774] iwlwifi 0000:04:00.0: Direct firmware load for iwlwifi-8000C-19.ucode failed with error -2
[    4.163293] iwlwifi 0000:04:00.0: Falling back to user helper

After a couple minutes and a few more failed attempts to load the driver, it does finally work.

dmesg |grep iwlwifi
[    4.118979] iwlwifi 0000:04:00.0: enabling device (0000 -> 0002)
[    4.162774] iwlwifi 0000:04:00.0: Direct firmware load for iwlwifi-8000C-19.ucode failed with error -2
[    4.163293] iwlwifi 0000:04:00.0: Falling back to user helper
[   64.165301] iwlwifi 0000:04:00.0: Direct firmware load for iwlwifi-8000C-18.ucode failed with error -2
[   64.165310] iwlwifi 0000:04:00.0: Falling back to user helper
[  124.167550] iwlwifi 0000:04:00.0: Direct firmware load for iwlwifi-8000C-17.ucode failed with error -2
[  124.167559] iwlwifi 0000:04:00.0: Falling back to user helper
[  184.170193] iwlwifi 0000:04:00.0: Direct firmware load for iwlwifi-8000C-16.ucode failed with error -2
[  184.170202] iwlwifi 0000:04:00.0: Falling back to user helper
[  244.172399] iwlwifi 0000:04:00.0: Direct firmware load for iwlwifi-8000C-15.ucode failed with error -2
[  244.172408] iwlwifi 0000:04:00.0: Falling back to user helper
[  304.174645] iwlwifi 0000:04:00.0: Direct firmware load for iwlwifi-8000C-14.ucode failed with error -2
[  304.174654] iwlwifi 0000:04:00.0: Falling back to user helper
[  364.188100] iwlwifi 0000:04:00.0: loaded firmware version 25.30.13.0 op_mode iwlmvm
[  364.205260] iwlwifi 0000:04:00.0: Detected Intel(R) Dual Band Wireless AC 8260, REV=0x208
[  364.205532] iwlwifi 0000:04:00.0: L1 Enabled - LTR Enabled
[  364.206462] iwlwifi 0000:04:00.0: L1 Enabled - LTR Enabled
[  364.207571] iwlwifi 0000:04:00.0: can't access the RSA semaphore it is write protected
[  364.372230] iwlwifi 0000:04:00.0 wlp4s0: renamed from wlan0
[  364.389184] iwlwifi 0000:04:00.0: L1 Enabled - LTR Enabled
[  364.389568] iwlwifi 0000:04:00.0: L1 Enabled - LTR Enabled
[  364.390442] iwlwifi 0000:04:00.0: can't access the RSA semaphore it is write protected
[  364.534253] iwlwifi 0000:04:00.0: L1 Enabled - LTR Enabled
[  364.534770] iwlwifi 0000:04:00.0: L1 Enabled - LTR Enabled
[  364.536200] iwlwifi 0000:04:00.0: can't access the RSA semaphore it is write protected

Note that it took six minutes (trying each decrementing driver version until it hit '13'). At this point, the wireless adapter should show up in the graphical network management tools.

 

Any questions, feedback, advice, complaints or meanderings are welcome.
Alteeve's Niche! Enterprise Support:
Alteeve Support
Community Support
© Alteeve's Niche! Inc. 1997-2024   Anvil! "Intelligent Availability®" Platform
legal stuff: All info is provided "As-Is". Do not use anything here unless you are willing and able to take responsibility for your own actions.