Thinkpad T440p安装Linux的种种问题(by quqi99)

作者:张华  发表于:2014-05-08
版权声明:可以任意转载,转载时请务必以超链接形式标明文章原始出处和作者信息及本版权声明

(http://blog.csdn.net/quqi99 )

Thinkpad T440p里使用了一些最新的硬件,这些硬件厂商对Linux高度不兼容, 下面是安装ubuntu 14.04与win8双系统时遇到的一些问题。
1, 要在BIOS(F1键)里disable掉UEFI Security Boot特性, 之前按F12选usb进行安装。
   UEFI是下一代的BIOS,它内操置了一些操作系统的公钥,操作系统要用私钥签名,UEFI硬件用公钥检测操作系统的完整性,可信才加载系统。
本来是一个很好的技术,但是被微软给滥用了。微软先强制将它自己的公钥加到UEFI DB中,然后再要求厂商预安装Win8之后强制厂商将UEFI Security Boot特性打开,这样就无法安装其他没有公钥的操作系统了,然后强制其它厂商向微软申请公钥,也不允许用户自定义公钥文件。对于一些支持win8的移动硬件,微软甚至都强制不提供disable UEFI Security Boot的开关界面。
2, Thinkpad T440p使用了Realtek公司的rtl8192ee 10ec:818b网卡,
   root@laptop:/home/hua# lspci -nn |grep Wireless
   04:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8192EE PCIe Wireless Network Adapter [10ec:818b]
   Realtek公司却没有提供相应的Linux驱动(附录一是一个极不稳定的驱动,基本没法用),也就是目前:
   有固件:/lib/firmware/rtlwifi/rtl8192eefw.bin
   但无驱动:/lib/modules/3.13.0-24-generic/kernel/drivers/net/wireless/rtlwifi/rtl8192ee/rtl8192ee.ko
   Realtec公司的rtl8192ee驱动将出现在linux 3.16版本的内核里,3.16内核目前还没有出,实在没办法解决,只好先又买了个TL-WN725N USB无线网卡对付着用。
3, Thinkpad T440p除了主板里的集成显卡以外,还有一个nvidia的显卡,默认使用的是开源的bumblebee驱动,我遇到的会造成这两种问题:
   一是例如执行lspci命令之后都会造成所有的usb设备都无法用,如usb网卡,如usb数标。
   二是由于acpi call失败造成无法正常关机,且每次造成磁盘数据损坏导致在开机时需要修复

   三是合上电脑再打开桌面消失

   四是发热厉害

   五是不安装它可能启动ubuntu不成功,需要在grub中临时将quiet splash改成nomodeset即可,将nvidea驱动安装后就不需要了。
   网上有人遇到了和我一样的问题,见:https://github.com/Bumblebee-Project/bbswitch/issues/78,但它的办法是在仍然用bumblebee驱动的前提下寻求解决(见附录二),我是直接安装nvidia linux驱动(值得一提的是,nvidia也是一个起初对linux极不友好的一家公司,linux之父在公开场合还曾经骂地这家公司,见:http://www.ithome.com/html/it/19249.htm,但是现在居然有nvidia linux驱动了,赞一个)。
  sudo apt-get purge bumblebee*
  sudo apt-get purge libvdpau-va-gl12  sudo apt-get install nvidia-319 nvidia-settings-319 nvidia-prime

20140709更新:

安装nvidia驱动后在移动电脑时桌面lightadm很容易死,可进控制台(ctrl + alt + f1)后通过apport-cli命令收集日志,或者查看/var/crash的相关日志发现是lightadm crash了,现在的做法是禁用掉nvidia的一切驱动,切换到intel的集成显卡,在/etc/default/grub中更新下列一行,然后更新grub

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash rdblacklist=nouveau i965.modeset=1 nouveau.modeset"

另外我也更新了kernel到3.14.1-031401-generic




附录一,目前极不稳定的一个rtl8192ee linux驱动
参考:http://ubuntuforums.org/showthread.php?t=2198221
wget http://netbook-remix.archive.canonical.com/updates/pool/public/o/oem-wireless-rtl-92ce-92se-92de-8723ae-88ee-8723be-92ee-dkms/oem-wireless-rtl-92ce-92se-92de-8723ae-88ee-8723be-92ee-dkms_0017.1016.2013~sutton1.tar.gz
sudo modprobe rtl8192ee
sudo modprobe -rv rtl8192ee
sudo modprobe -v rtl8192ee swenc=1 fwlps=0 ips=0


附录二,仍使用开源的nvidia驱动nouveau的前提下解决acpi问题
git clone https://github.com/mkottman/acpi_call
cd acpi_call
make
sudo cp acpi_call.ko /lib/modules/`uname -r`/kernel/drivers/acpi
sudo depmod -a
sudo modprobe acpi_call
Create a script with the following in it (e.g. at /usr/local/bin/disable_nvidia.sh, remember chmod +x it):
#!/bin/sh
echo "\_SB.PCI0.PEG.VID._DSM {0xF8,0xD8,0x86,0xA4,0xDA,0x0B,0x1B,0x47,0x60,0x42,0xA6,0xB5,0xBE,0xE0} 0x100 0x1A {0x1,0x0,0x0,0x3}" >/proc/acpi/call
echo "\_SB.PCI0.PEG.VID.GPOF" >/proc/acpi/call
exit 0
Call the script from /etc/rc.local
Add rdblacklist=nouveau i965.modeset=1 nouveau.modeset to the GRUB_CMDLINE_LINUX_DEFAULT flags in /etc/default/grub, also for full KVM support (e.g. better brightness control etc.) I've found adding acpi_osi=\"!Windows 2012\" helps too.
run sudo update-grub


2014-06-21更新:

解决办法已经出来了,见

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1239578


2014-07-29更新

有些型号的机器即使像上面disable UEFI Security Boot特性也是安装不了的,那是因为遇到了一个UEFI的bug,原因如下:

Some EFI-based computers, including some HPs, have broken EFIs that
don't accept anything but the fallback boot loader
(EFI/boot/bootx64.efi on the EFI System Partition) or the Windows boot
loader (EFI/Microsoft/boot/bootmgfw.efi on the ESP). If yours suffers
from this defect, you'll need to copy EFI/ubuntu/grubx64.efi (or
EFI/ubuntu/shimx64.efi, if Secure Boot is active) to one or both of
those names. (If Secure Boot is active, also copy
EFI/ubuntu/grubx64.efi to the same directory where you copy GRUB, but
keep its filename as grubx64.efi).

Note that I'm assuming you're doing an Ubuntu-only installation. If
you want to dual-boot with Windows, you've got to copy ITS boot loader
to another name and tweak GRUB to find Windows there. This starts to
get complex, so the Boot Repair tool
(https://help.ubuntu.com/community/Boot-Repair) may be helpful. It's
got an option to do all this on its Advanced page.

Alternatively, you could install  rEFInd
(http://www.rodsbooks.com/refind) to one of those "magic" locations --
but the installation script won't install there by default, so you'll
need to do it manually or juggle filenames afterwards. (The
mvrefind.sh script can help with that.)


2014-12-01更新:

现在ubuntu 14.10默认的内核版本里已经有该网卡的驱动了,我已经用上了,挺好使的。见: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1239578



2015-03-02更新, 解决一crash问题

之前一直感觉系统容易忽然死机,可能一周一次,没去管它。但今天居然邪门到一个小时内死机6次,不得不深度介入了。根据观察,感觉是Chrome的时候容易死,使用“watch sensors” (需安装sudo dpkg -l |grep sensors 软件包)查看cpu温度在打开chrome之非常容易从56度升到八十几度。于是,不启动chrome,观察两小时,ok,不死机。于是google关键字"ubuntu 14.10 chrome crash", 非常幸运,找到一个bug (https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/1377220 ),原来是chrome新增加了一个根据gpu加速的新特性,针对intel gpu加速不了,退到软加速了,从而导致全局crash的问题。解决办法:修改文件/usr/share/applications/google-chrome.desktop, 将"Exec=/usr/bin/google-chrome-stable"修改成” Exec=env LIBGL_DRI3_DISABLE=1 /usr/bin/google-chrome-stable"即可。

2015-03-03, 像上面那样修改之后,使用htop命令还能看到chrome时不时有gpu字眼的进程蹦出来,这时候温度会上升,于是升级了内核为3.40版本,http://kernel.ubuntu.com/~kernel-ppa/mainline/daily/current/ 


你可能感兴趣的:(Thinkpad T440p安装Linux的种种问题(by quqi99))