求教:Ubuntu 12.04-server如何修改屏幕分辨率

启动讨论 grub/grub2/syslinux/grub4dos/Lilo
回复
keemma
帖子: 3
注册时间: 2015-01-20 9:13
系统: ubuntu 12.04

求教:Ubuntu 12.04-server如何修改屏幕分辨率

#1

帖子 keemma » 2015-01-20 9:25

我用的是Ubuntu 12.04-server版的操作系统,内核为linux 3.2.58。
用的是800×600分辨率的显示器,但是开机后默认分辨率偏大,导致字体很小,看不清楚。
如何才能把分辨率固定成800×600?
我试过网上说的,修改GRUB_CMDLINE_LINUX_DEFAULT="quiet splash vga=788"没有效果,
修改为GRUB_CMDLINE_LINUX_DEFAULT="quiet nomodeset",会导致开后黑屏,连恢复模式也无法进入。
求各位大神支招!
CoderDream
帖子: 2
注册时间: 2015-01-20 12:39
系统: Ubuntu-14.10

Re: 求教:Ubuntu 12.04-server如何修改屏幕分辨率

#2

帖子 CoderDream » 2015-01-20 13:17

VMware中的Ubuntu Server的控制台窗口有点儿小,使用起来不太方便,要调整控制台的窗口大小,需要修改屏幕的分辨率,修改方法如下:(参见Reference)
1. 打开grub文件($vim /etc/default/grub), 修改参数GRUB_CMDLINE_LINUX的值,
GRUB_CMDLINE_LINUX="vga=0x317", 参数值参考下图:
| 640x480 800x600 1024x768 1280x1024
----|--------------------------------------
256 | 0x301 0x303 0x305 0x307
32k | 0x310 0x313 0x316 0x319
64k | 0x311 0x314 0x317 0x31A
16M | 0x312 0x315 0x318 0x31B
2. $sudo update-grub
3. $sudo reboot

http://www.server110.com/linux/201404/8991.html
keemma
帖子: 3
注册时间: 2015-01-20 9:13
系统: ubuntu 12.04

Re: 求教:Ubuntu 12.04-server如何修改屏幕分辨率

#3

帖子 keemma » 2015-01-20 15:59

已经试过了,不好用。我的系统不是在虚拟机上实现的。
keemma
帖子: 3
注册时间: 2015-01-20 9:13
系统: ubuntu 12.04

Re: 求教:Ubuntu 12.04-server如何修改屏幕分辨率

#4

帖子 keemma » 2015-01-21 9:34

补充:
修改为GRUB_CMDLINE_LINUX_DEFAULT="quiet nomodeset vga=788"
在内核为linux 3.2.58下系统黑屏,但是同样针对内核为linux3.5.0就可以达到修改分辨率的效果,请问这种现象该怎么考虑?
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 求教:Ubuntu 12.04-server如何修改屏幕分辨率

#5

帖子 poloshiao » 2015-01-21 14:41

如何才能把分辨率固定成800×600
我用的是Ubuntu 12.04-server版的操作系统
我试过网上说的,修改GRUB_CMDLINE_LINUX_DEFAULT="quiet splash vga=788"没有效果,
1. 這個 splash 選項 比較適合 有載入圖形的桌面版

2. vga 方法 現在少用了 因為許多 顯卡/Monitor 支援 EDID 自動辨識 分辨率
http://en.wikipedia.org/wiki/Extended_d ... ation_data
儘量直接指定合適的分辨率給 GRUB_GFXMODE 參考 3-1

3. 以下是我的 12.04 Server 版的幾個選項設定 供 12.04 Server 版 參考
其它版本 也許有些需要微調

3-1. /etc/default/grub
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.

GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX=""

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE=800x600
GRUB_GFXPAYLOAD_LINUX=text

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_LINUX_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"

3-2. sudo update-grub
產生最新的開機選單
/boot/grub/grub.cfg

3-3. sudo update-initramfs -u -k all
更新所有 kernel 版本的開機檔案

3-4. sudo reboot

4. 以上參數 詳細參見
http://www.gnu.org/software/grub/manual ... figuration
回复