歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux綜合 >> Linux資訊 >> 更多Linux >> X-windows顯示配置通用解決方案

X-windows顯示配置通用解決方案

日期:2017/2/27 14:16:26   编辑:更多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



Copyright © Linux教程網 All Rights Reserved