Intel对FB的显卡支持不够好,相比而言Nvidia有很多可以直接安装的显卡驱动。笔者的笔记本是联想V480C 型号20159基本配置如下:
CPU:i3-311M,2.4GHz,2核4线程
内存:4GB,DDR3,1600MHz
硬盘:西数WDCWD5000BPVT-08HXZT3 ada0 465GBATA
显卡:独立显卡NVIDIA GeForce GT630M
集成显卡Intel GMAHD4000
光驱:日立-LG
声卡:瑞昱ALC269@Intel Panther Point High Definition
网卡:瑞昱 RTL8168F PCI-E Gigabit Ethernet NIC
无线网卡:Intel Centrino Wireless-N 2230BGN
电池:SMP 45N1045-2079锂电池
主板:Intel IvyBridge-HMTT Express
操作系统安装的FreeBSD-9.2 Release版。上述硬件主要是显卡与无线网卡支持度不够好,其余的都可以正常使用。
本打算使用Nvidia的显卡,但是在BIOS配置的时候发现要么使用集成显卡要么操作系统自行切换。
下面描述配置过程:
1、 配置[FILE]/etc/make.conf[/FILE]:为了支持Intel显卡
WITH_NEW_XORG="YES"
WITH_KMS="YES"
2、 下载附件MesaLib-8.0.5.tar.bz2。
MesaLib-8.0.5.tar.bz2应用于第3步升级libGL和libGLU的时候。
3、 按照如下顺序Rebuild相应的Port,
a) 升级libdrm:portmaster libdrm
b) 升级libGL:portmaster libGL #通过安装完成的提示可以看出已经同事安装了libGLU
c) 升级libGLU:如果在上一步同时完成则不用操作,否则:portmaster libGLU
d) 升级dri:portmaster dri
e) 升级xf86-video-intel:portmaster xf86-video-intel #安装提示现实已升级了xorg-server
f) 升级xorg-server:如果上一步没有提示已升级则: portmaster xorg-server
注:不清楚什么原因,安装libGL的时候找不到文件MesaLib-8.0.5.tar.bz2,需要我们下载后放置到文件夹/usr/ports/distfiles中
4、Xorg -configure 生成xorg.conf.new文件,此时可能出现黑屏,不用担心用 ctrl+alt+del重启
5、 配置文件[FILE]/etc/X11/xorg.conf[/FILE]
如果是宽屏则要查看/var/log/Xorg.0.log以配置ModeLine,可阅读Xorg配置
6、 我的/etc/X11/xorg.conf下面这个样子,您可以参考,在本文末尾。
注:Modeline 通过查找/var/log/Xorg.0.log
读取的
7、从 Xorg 7.4 开始, 可以使用 HAL 自动检测键盘和鼠标。Ports sysutils/hal 和 devel/dbus 将被作为 x11/xorg 所依赖的包安装进系统。 并且需要在 /etc/rc.conf 文件中启用:
hald_enable="YES"
dbus_enable="YES"
8、GNOME 需要挂载 /proc
文件系统才能正常运作。添加如下
proc /proc procfs rw 0 0到
/etc/fstab
以便在系统启动时自动挂载
procfs
9、GNOME 也可以通过适当地配置名为 .xinitrc
的文件来启动。 如果已经有了自定义的.xinitrc
, 将启动当前窗口管理器的那一行改为启动/usr/local/bin/gnome-session 就可以了。 如果还没有, 那么只需简单地:
%
echo "exec gnome-session" > ~/.xinitrc
10、 Reboot后,通过startx或者gdm都可以进入X界面,如果你不够幸运那你的鼠标和键盘都不能使用,这时需要更新鼠键驱动,分别
portmaster xf86-input-mouse
portmaster xf86-input-keyboard
8、如果你足够幸运,此时X界面就可以正常运行了。
注:/etc/X11/xorg.confi内容:
Section "ServerLayout"
Identifier "X.org Configured"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection
Section "Files"
ModulePath "/usr/local/lib/xorg/modules"
FontPath "/usr/local/lib/X11/fonts/misc/"
FontPath "/usr/local/lib/X11/fonts/TTF/"
FontPath "/usr/local/lib/X11/fonts/OTF/"
FontPath "/usr/local/lib/X11/fonts/Type1/"
FontPath "/usr/local/lib/X11/fonts/100dpi/"
FontPath "/usr/local/lib/X11/fonts/75dpi/"
FontPath "/usr/local/lib/X11/fonts/wqy"
EndSection
Section "Module"
Load "dbe"
Load "dri"
Load "dri2"
Load "extmod"
Load "record"
Load "glx"
EndSection
Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
EndSection
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/sysmouse"
Option "ZAxisMapping" "4 5 6 7"
EndSection
Section "Monitor"
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
ModeLine "1366x768" 69.3 1366 1398 1430 1470 768 771 776 786
Option "DPMS"
EndSection
Section "Device"
### Available Driver options are:-
### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
### <percent>: "<f>%"
### [arg]: arg optional
#Option "NoAccel" # [<bool>]
#Option "AccelMethod" # <str>
#Option "Backlight" # <str>
#Option "DRI" # <str>
#Option "ColorKey" # <i>
#Option "VideoKey" # <i>
#Option "Tiling" # [<bool>]
#Option "LinearFramebuffer" # [<bool>]
#Option "SwapbuffersWait" # [<bool>]
#Option "TripleBuffer" # [<bool>]
#Option "XvPreferOverlay" # [<bool>]
#Option "HotPlug" # [<bool>]
#Option "ReprobeOutputs" # [<bool>]
#Option "XvMC" # [<bool>]
#Option "ZaphodHeads" # <str>
#Option "TearFree" # [<bool>]
#Option "PerCrtcPixmaps" # [<bool>]
#Option "FallbackDebug" # [<bool>]
#Option "DebugFlushBatches" # [<bool>]
#Option "DebugFlushCaches" # [<bool>]
#Option "DebugWait" # [<bool>]
#Option "BufferCache" # [<bool>]
Identifier "Card0"
Driver "intel"
BusID "PCI:0:2:0"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection
朋友们新年快乐!!