歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux綜合 >> Linux資訊 >> 更多Linux >> XWindow顯卡配置通用解決方法

XWindow顯卡配置通用解決方法

日期:2017/2/27 14:16:27   编辑:更多Linux
  許多新顯卡一時得不到 XFree86的支持,配置 XWindow一直是個難題。但 Linux 2.2.x的 frame buffer設備可通過 VESA VBE 2.0標准利用顯卡的 Super VGA特性,然後配合 XFree86的 frame buffer Server(XF86_FBDev) 就可讓你的 XWindow用高分辨率和高/真彩。現在市面上絕大部分新出的顯卡都支持VESA 2.0標准。在你的顯卡得不到支持之前,這不失為一個好的解決方法。 具體實現涉及四方面: 一個支持 VESA frame buffer的內核; 建立 frame buffer設備; 配置 lilo 的啟動選項,使內核啟動時能切換到指定的顯示模式; XFree86的 frame buffer Server(XF86_FBDev),以及在 XF86Config中為其配置一個Screen。 所需文件: Linux 2.2.x kernel source (2.2.x內核原代碼,如果要自行編譯內核); XFree86 Framebuffer Server: XF86_FBDev (Turbo Linux中文版,RedHat6.0 CD,FTP.xfree86.org 等地方都能找到); gcc 等編譯工具。 編譯一個支持 VESA frame buffer的內核 如果有現成的支持 VESA frame buffer的內核可跳過這一步。如 Madrake 6.0中就帶有支持 frame buffer的內核。 配置內核編譯選項 在/usr/src/linux中鍵入make xconfig(XWindow下),或make menUConfig(命令行下)。 與 frame buffer device有關的選項有(其余編譯選項請參考其它資料): Code maturity level opetions y Prompt for development and/or incomplete codes/drivers Console drivers y Video mode selection support ... y Support for frame buffer devices ... y VESA VGA graphics console ... y Advance low level driver options ... y 8 bpp packed pixels support y 16 bpp packed pixels support y 24 bpp packed pixels support 編譯安裝內核: 以 root身份登錄,鍵入以下命令: # cd /usr/src/linux # make bzImage # make modules # make modules_install 把編譯好的內核拷到 /boot目錄,文件名可自定,如  # cp /usr/src/linux/arch/i386/boot/bzImage /boot/vmlinuz-2.2.5-fb 建立 frame buffer設備 frame buffer設備的 major為 29,minor 為 0(fb0),32(fb1). . . 224(fb7)。 創建fb設備 # mknod /dev/fb0 c 29 0 .... 配置 lilo 的啟動選項 添加lilo啟動配置 下面是典型的lilo.conf文件(位於/etc目錄) boot = /dev/hda2 timeout = 500 prompt read-only image = /boot/vmlinuz-2.2.x label = linux root = /dev/hda2 other = /dev/hda1 label = dos 添加一新配置需添加 image,label,root及配合VESA frame buffer的 vga等四項: boot = /dev/hda2 timeout = 500 prompt read-only image = /boot/vmlinuz-2.2.x label = linux root = /dev/hda2 image = /boot/vmlinuz-2.2.5-fb (新編譯的內核) label = linuxfb (啟動標號,可自定) root = /dev/hda2 (著一句具體會有不同,照你自己的lilo.conf)


vga = 0x314 (顯示模式,參照下表) other = /dev/hda1 label = dos Linux_kernel_mode_number = VESA_mode_number + 0x200   640x480 800x600 1024x768 1280x1024 256 0x301 0x303 0x305 0x307 32k 0x310 0x313 0x316 0x319 64k 0x311 0x314 0x317 0x31A 16M 0x312 0x315 0x318 0x31B 更新啟動程序 運行lilo 重啟,出現 lilo: 時鍵入linuxfb (或自定的標號)。 這時如果linux切換成圖形模式,並有一小企鵝logo出現,那就大功告成一半。 配置frame buffer Server 為 frame buffer Server配置Screen 參照 XF86Config (位於/etc/X11、/usr/X11R6/lib)中 vga16的配置。 例如: Section "Screen" Driver "vga16" Device "My Video Card" Monitor "MAG XJ500T" Subsection "Display" Modes "640x480" "800x600" ViewPort 0 0 EndSubsection EndSection 改動Driver, Modes, Depth三項,其余照抄 Section "Screen" Driver "fbdev" Device "My Video Card" Monitor "MAG XJ500T" Subsection "Display" Depth 16 (色彩深度,必須與前面所選的顯示模式的色彩深度一致,必須!) Modes "default" ViewPort 0 0 EndSubsection EndSection 讓X 指向 XF86_FBDev 把 XF86_FBDev文件拷到 /usr/X11R6/bin目錄。 在 /usr/X11R6/bin和 /etc/X11裡都有一個文件名為 X 的文件,它其實是一個類似Windows的快捷方式的東西,它指向一個實際的 X Server文件,如XF86_VGA16。startx 腳本調用 X 啟動 Server而不管具體是哪個 Server。因此,一定要把上面兩個目錄中的 X 都指向 XF86_FBDev,不同版本可能調用其中任意一個。 具體方法是改名(或刪除)原來的 X, cd /etc/X11 mv X X.bat 然後把 XWindow顯卡配置通用解決方法 許多新顯卡一時得不到 XFree86的支持,配置 XWindow一直是個難題。但 Linux 2.2.x的 frame buffer設備可通過 VESA VBE 2.0標准利用顯卡的 Super VGA特性,然後配合 XFree86的 frame buffer Server(XF86_FBDev) 就可讓你的 XWindow用高分辨率和高/真彩。現在市面上絕大部分新出的顯卡都支持VESA 2.0標准。在你的顯卡得不到支持之前,這不失為一個好的解決方法。 具體實現涉及四方面: 一個支持 VESA frame buffer的內核; 建立 frame buffer設備; 配置 lilo 的啟動選項,使內核啟動時能切換到指定的顯示模式; XFree86的 frame buffer Server(XF86_FBDev),以及在 XF86Config中為其配置一個Screen。 所需文件: Linux 2.2.x kernel source (2.2.x內核原代碼,如果要自行編譯內核); XFree86 Framebuffer Server: XF86_FBDev (Turbo Linux中文版,RedHat6.0 CD,ftp.xfree86.org 等地方都能找到); gcc 等編譯工具。 編譯一個支持 VESA frame buffer的內核 如果有現成的支持 VESA frame buffer的內核可跳過這一步。如 Madrake 6.0中就帶有支持 frame buffer的內核。 配置內核編譯選項 在/usr/src/linux中鍵入make xconfig(XWindow下),或make menuconfig(命令行下)。 與 frame buffer device有關的選項有(其余編譯選項請參考其它資料): Code maturity level opetions y Prompt for development and/or incomplete codes/drivers Console drivers y Video mode selection support ... y Support for frame buffer devices ... y VESA VGA graphics console

... y Advance low level driver options ... y 8 bpp packed pixels support y 16 bpp packed pixels support y 24 bpp packed pixels support 編譯安裝內核: 以 root身份登錄,鍵入以下命令: # cd /usr/src/linux # make bzImage # make modules # make modules_install 把編譯好的內核拷到 /boot目錄,文件名可自定,如  # cp /usr/src/linux/arch/i386/boot/bzImage /boot/vmlinuz-2.2.5-fb 建立 frame buffer設備 frame buffer設備的 major為 29,minor 為 0(fb0),32(fb1). . . 224(fb7)。 創建fb設備 # mknod /dev/fb0 c 29 0 .... 配置 lilo 的啟動選項 添加lilo啟動配置 下面是典型的lilo.conf文件(位於/etc目錄) boot = /dev/hda2 timeout = 500 prompt read-only image = /boot/vmlinuz-2.2.x label = linux root = /dev/hda2 other = /dev/hda1 label = dos 添加一新配置需添加 image,label,root及配合VESA frame buffer的 vga等四項: boot = /dev/hda2 timeout = 500 prompt read-only image = /boot/vmlinuz-2.2.x label = linux root = /dev/hda2 image = /boot/vmlinuz-2.2.5-fb (新編譯的內核) label = linuxfb (啟動標號,可自定) root = /dev/hda2 (著一句具體會有不同,照你自己的lilo.conf) vga = 0x314 (顯示模式,參照下表) other = /dev/hda1 label = dos Linux_kernel_mode_num



Linux_kernel_mode_num



Copyright © Linux教程網 All Rights Reserved