Read Sean

Read me, read Sean.
posts - 508, comments - 655, trackbacks - 9, articles - 4

Ubuntu Karmic安装手记 - T400s

Posted on 2009-12-26 11:14 laogao 阅读(1206) 评论(2)  编辑  收藏 所属分类: Computer UsageOperating SystemsGNU/Linux

周二的时候拿到了新的T400s,安装Linux(64位Karmic)的过程比预想的要曲折,趁周末有时间,整理记录于此,希望对遇到同样问题的人有所帮助。

T400s送到之前,我先简单的在网上查了查基本的配置信息,同时也看到有很多网友十分顺利的安装了Linux,不论是Ubuntu Karmic还是Arch Linux,基本都是除了指纹都是out-of-box就可直接工作的,这也符合我的预期。于是,拿着amd64版的Karmic盘,开始在T400s上安装。

基本系统的安装很顺利,跟着提示一路走完,Karmic就能够boot并正常login了,so far so good。不过登录进去之后,无线网卡不工作,只有有线连接,这是怎么回事?用lspci一看:
  • 00:00.0 Host bridge: Intel Corporation Mobile 4 Series Chipset Memory Controller Hub (rev 07)
  • 00:02.0 VGA compatible controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07)
  • 00:02.1 Display controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07)
  • 00:03.0 Communication controller: Intel Corporation Mobile 4 Series Chipset MEI Controller (rev 07)
  • 00:03.3 Serial controller: Intel Corporation Mobile 4 Series Chipset AMT SOL Redirection (rev 07)
  • 00:19.0 Ethernet controller: Intel Corporation 82567LM Gigabit Network Connection (rev 03)
  • 00:1a.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #4 (rev 03)
  • 00:1a.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #5 (rev 03)
  • 00:1a.2 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #6 (rev 03)
  • 00:1a.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #2 (rev 03)
  • 00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 03)
  • 00:1c.0 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 1 (rev 03)
  • 00:1c.1 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 2 (rev 03)
  • 00:1c.2 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 3 (rev 03)
  • 00:1c.3 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 4 (rev 03)
  • 00:1d.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 (rev 03)
  • 00:1d.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 (rev 03)
  • 00:1d.2 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3 (rev 03)
  • 00:1d.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 (rev 03)
  • 00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 93)
  • 00:1f.0 ISA bridge: Intel Corporation ICH9M-E LPC Interface Controller (rev 03)
  • 00:1f.2 SATA controller: Intel Corporation ICH9M/M-E SATA AHCI Controller (rev 03)
  • 00:1f.3 SMBus: Intel Corporation 82801I (ICH9 Family) SMBus Controller (rev 03)
  • 03:00.0 Network controller: Realtek Semiconductor Co., Ltd. Device 8172 (rev 10)
  • 04:00.0 Memory controller: Intel Corporation Turbo Memory Controller (rev 11)
  • 05:00.0 SD Host controller: Ricoh Co Ltd Device e822 (rev 01)
  • 05:00.1 System peripheral: Ricoh Co Ltd Device e230 (rev 01)
注意03:00.0这一行,竟然是Realtek的8172,对应Windows下的型号是8192,Lenovo什么时候把T400s原本的无线芯片配置(Intel WiMAX/WiFi Link 5xxx)换成了Realtek 8172的?难怪没有无线,这块网卡的驱动还没有被Linux内核直接支持,需要手工安装。网上搜到很多方案,比如ndiswrapper+win版驱动等等,但这个Ubuntu LaunchPad上的方案[1]看上去最靠谱,还等什么,开工吧。
  • 首先下载驱动: http://launchpadlibrarian.net/34090404/rtl8192se_linux_2.6.0010.1012.2009_64bit.tar.gz
  • 解压后进入rtl8192se_linux_2.6.0010.1020.2009_64bit子目录,make
  • 成功后在HAL/rtl8192下能够找到r8192se_pci.ko文件,cp至/lib/modules/`uname -r`/kernel/drivers/net/wireless/
  • 然后将固件相关文件,即firmware/RTL8192SE目录,cp至/lib/firmware/`uname -r`/
  • 执行命令depmod -a重新扫描module依赖关系
  • 执行命令modprobe r8192se_pci加载该module,这一步完成以后NetworkManager就可以搜到无线网络并进行连接了
好了,到此最大的拦路虎已经消灭,开始装别的软件吧。就在这时,新的问题出现了,dmesg可以看到重复出现的如下报错/警告信息:
  • [ 483.431670] DMA: Out of SW-IOMMU space for 9100 bytes at device 0000:0e:00.0
  • [ 483.435783] DMA: Out of SW-IOMMU space for 9100 bytes at device 0000:0e:00.0
  • [ 483.439867] DMA: Out of SW-IOMMU space for 9100 bytes at device 0000:0e:00.0
  • ...
通常经过数分钟的积累,系统就死机了,只剩下CapsLock键上的小灯不停闪烁,典型的kernel panic? 根据网友提供的线索[2],由于Intel的64位实现虽是参考AMD64但细节有差异,所以在实际内存大于等于4G的环境下,某些未考虑到该特性的代码会leak memory,怎么办?增加内核启动参数mem=4G iommu=off,一方面限定内存范围,另一方面关闭IOMMU。

经过测试,这样的配置下系统和无线网络都能够持续稳定运行。系统安装到此,一个大的里程碑达成,唯一的缺憾是每次kernel升级,可能还需要手工做一些工作,且暂时不能既开无线又开4G以上内存,不过这样总好过没有无线,或者缴枪投降,不是吗?本想多骂几句Lenovo,好好的Intel芯片不用,要换Realtek,但转念一想,这已是既成事实,而且看到很多其他型号的ThinkPad,如R500、SL400等,也有不少用上了Realtek的这款无线芯片,让我们一起期待稳定可靠的驱动最终被Linux内核支持的那一天吧。

参考链接:
[1] https://bugs.launchpad.net/ubuntu/+source/linux/+bug/401126
[2] http://lwn.net/Articles/91870/


只有注册用户登录后才能发表评论。


网站导航: