歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Unix知識 >> BSD >> 我與FreeBSD的故事

我與FreeBSD的故事

日期:2017/2/28 11:25:42   编辑:BSD


作者:fantix
7月28日 - 初識FreeBSD
那是在很久很久以前,帶我的老師有個項目要用到unix,然後故事就開始了……上網查了不少資料,最後選擇了FreeBSD作為我,接觸的第一個unix操作系統。
下iso,刻盤,裝vm,終於,一套龌龊的系統被我磕磕碰碰的裝進了虛擬機裡。我本來就是從dos時代過來的(說的跟真的似的),所以看著這黑底白字的提示符,倒是有幾分親切。隨著接觸的越來越多,FreeBSD的什麼package啊,ports啊,內核啊什麼的也慢慢變得眼熟了。上真實環境吧,vm算什麼英雄好漢,我想。輕車熟路,三下五除二,最小化安裝的bsd終於站到了與windows server 2003並列的位置上來了。但總那麼一條命令一條命令的打,也不是個事啊,總得給我個借口徹底卸載MS打頭的東西吧--於是,開始裝gui,kde的安裝過程也很順利。到了配置x的時候了,由於缺乏經驗,在加上兩台機器協作(我的機器工作,另一台專門查資料~~嘿嘿),這個步驟費了不少勁。在幾經周折之後,終於進到了桌面環境下。
後來發生了什麼呢?各種各樣的package/port/配置被裝到了ibm 10G的slice裡,輸入法、漢化包、eva、jdk、idea、聲音、視頻,等等等等。終於,FreeBSD已經成為一個足夠完美的借口,讓任何人卸載MS打頭的程序了。但是這時,一個問題出現了。
i915、drm模塊:
# kldstat
....
12 1 0xc38b2000 5000 i915.ko
13 1 0xc38b7000 e000 drm.ko
支持agp模仿的顯卡,動態顯存:
# dmesg | grep agp
agp0: port 0x1800-0x1807 mem 0xe0000000-0xe7ffffff,0xd0000000-0xd007ffff irq 11 at device 2.0 on pci0
agp0: detected 8060k stolen memory
agp0: aperture size is 128M
drm:
# dmesg | grep drm
drmsub1: mem 0xe8000000-0xefffffff,0xd0080000-0xd00fffff at device 2.1 on pci0
info: [drm] AGP at 0xe0000000 128MB
info: [drm] Initialized i915 1.2.0 20041217
沒有啟動3D加速:
# glxinfo | grep direct
direct rendering: No
OpenGL renderer string: Mesa GLX Indirect
Xorg配置:
...
Section "Module"
...
Load "dri"
...
EndSection
...
Section "Device"
Identifier "Card0"
Driver "i810"
VendorName "Intel Corporation"
BoardName "82852/855GM Integrated Graphics Device"
BusID "PCI:0:2:0"
# VideoRam 8060
EndSection
Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
DefaultDepth 16
...
SubSection "Display"
Viewport 0 0
Depth 16
Modes "1024x768" "800x600"
EndSubSection
EndSection
Section "DRI"
Group 0
Mode 0666
Endsection
xorg啟動日志裡有錯誤:
# cat /var/log/Xorg.0.log
....
(WW) I810(0): xf86AllocateGARTMemory: allocation of 4 pages failed
(Cannot allocate memory)
(EE) I810(0): Failed to allocate HW (ARGB) cursor space.
(II) I810(0): Allocated 4 kB for Overlay registers at 0x7ffe000 (0x0869a000).
(II) I810(0): Allocated 64 kB for the scratch buffer at 0x7fee000
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is -1, (No such file or directory)
drmOpenDevice: open result is -1, (No such file or directory)
drmOpenDevice: Open failed
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is -1, (No such file or directory)
drmOpenDevice: open result is -1, (No such file or directory)
drmOpenDevice: Open failed
[drm] failed to load kernel module "i915"
(II) I810(0): [drm] drmOpen failed
(EE) I810(0): [dri] DRIScreenInit failed. Disabling DRI.
....
就是說,原本支持3D加速的顯示卡,intel的破集成顯卡,愣是沒法起3D加速作用!
8月20日 - 再次修改內核,終於有變化了
感謝cu的同仁們,給了很多有益的建議。終於,在內核中加入了drm、i915drm後,有了變化。
# cat SYSKNL
....
device agp
....
device drm
device i915drm
....
編譯、安裝、重啟,發現設備裡出了點問題:
# dmesg | grep drm
drmsub0: port 0x1800-0x1807 mem 0xe0000000-0xe7ffffff,0xd0000000-0xd007ffff irq 11 at device 2.0 on pci0
error: [drm:pid0:drm_load] *ERROR* Card isn't AGP, or couldn't initialize AGP.
device_attach: drmsub0 attach returned 12
drmsub1: mem 0xe8000000-0xefffffff,0xd0080000-0xd00fffff at device 2.1 on pci0
error: [drm:pid0:drm_load] *ERROR* Card isn't AGP, or couldn't initialize AGP.
device_attach: drmsub1 attach returned 12
# dmesg | grep agp
# ...別看了,沒agp了
X自然也是這麼講了:
# cat /var/log/Xorg.0.log | grep \(EE
(EE) GARTInit: Unable to open /dev/agpgart (No such file or directory)
# cat /var/log/Xorg.0.log | grep \(WW
(WW) I810(0): Bad V_BIOS checksum
(WW) I810(0): /dev/agpgart is either not available, or no memory is available
(WW) I810(0): Bad V_BIOS checksum
(WW) I810(0): Extended BIOS function 0x5f05 failed.
莫非又是因為動態顯存的問題,搞的這玩意兒人不像人,鬼不像鬼的。IBM打死是改不了動態顯存的大小了,人家IBM工程師很自豪的說,我們的顯存不需要手動設置的,如果須要,它會自動劃分更多空間……
Copyright © Linux教程網 All Rights Reserved