歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Linux下設置VGA顯示模式方法

Linux下設置VGA顯示模式方法

日期:2017/2/28 16:09:30   编辑:Linux教程

默認kernel給的tty分辨率是非常有限的,解決的方法就是給kernel傳遞VGA參數。

1、lilo下設置方法

lilo:linux vga=318

將會啟動1024x768x24bpp模式。下面是常用分辨率+色彩所對應的編碼

色彩 640x400 640x480 800x600 1024x768 1280x1024 1600x1200 4bits ? ? 0x302 ? ? ? 8bits 0x300 0x301 0x303 0x305 0x307 0x31C 15bits ? 0x310 0x313 0x316 0x319 0x31D 16bits ? 0x311 0x314 0x317 0x31A 0x31E 24bits ? 0x312 0x315 0x318 0x31B 0x31F 32bits ? ? ? ? ? ?

如果要默認就設置為1024x768x24bpp模式,可以修改/etc/lilo.conf,加入一下語句:

vga=0x318

然後保存退出,重啟即可。

2、GRUB下設置方法

就是在grub.conf啟動列表的kernel最後添加vga參數,例如將tty分辨率設置為(800x600x65536)

cat /etc/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/sda3
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux AS (2.6.9-22.EL)
root (hd0,0)
kernel /vmlinuz-2.6.9-22.EL ro root=LABEL=/ vga=788
initrd /initrd-2.6.9-22.EL.img

以下是常用參數列表

linux video=vga16 (640x480x16) <---默認參數,支持最普通的硬件:)
vga=769 (640x480x256)
vga=771 (800x600x256)
vga=788 (800x600x65536)
vga=773 (1024x768x256)
vga=791 (1024x768x65536)

修改後配和zhcon或者cce更加完美。(大分辨率+中文顯示+中文輸入)

相關文件下載地址在Linux公社的1號FTP服務器裡,下載地址:

FTP地址:ftp://www.linuxidc.com

用戶名:www.linuxidc.com

密碼:www.muu.cc

在 2011年LinuxIDC.com\8月\Linux下設置VGA顯示模式方法

下載方法見這裡 http://www.linuxidc.net/thread-1187-1-1.html

下面是所有分辨率的列表:

# VESA framebuffer console @ 1024x768x64k vga = 791 
# Normal VGA console # vga = normal
# VESA framebuffer console @ 1024x768x64k
# vga=791 # VESA framebuffer console @ 1024x768x32k
# vga=790 # VESA framebuffer console @ 1024x768x256
# vga=773 # VESA framebuffer console @ 800x600x64k
# vga=788 # VESA framebuffer console @ 800x600x32k
# vga=787 # VESA framebuffer console @ 800x600x256
# vga=771 # VESA framebuffer console @ 640x480x64k
# vga=785 # VESA framebuffer console @ 640x480x32k
# vga=784 # VESA framebuffer console @ 640x480x256
# vga=769
Copyright © Linux教程網 All Rights Reserved