语境
我有一台安装了双启动(MS Windows 7 和 Ubuntu 18.04)的戴尔 Latitude E6410 笔记本电脑。我使用 grub v2.02 来选择要启动的操作系统。
问题
但是当我使用 VGA 连接外接屏幕(Dell 1909W)时,grub 会“出现”在笔记本电脑显示器上,但渲染完全模糊:
(我看到屏幕上有几条“一个像素宽”的水平线,中间用大黑线隔开。)
一旦启动操作系统(Win7 或 U18.04),一切都很好。问题与我之前安装的 Ubuntu 16.04 相同。
问题
当连接外接显示器时,如何使 grub 菜单显示“正常”?
/etc/default/grub
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'
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_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"
# 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=640x480
# 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_RECOVERY="true"
# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
答案1
我已经能够解决这个问题在 grub 设置中手动设置我的显示器分辨率(根据我的实际屏幕分辨率)
1/ 在 grub 设置中手动定义笔记本电脑的显示器分辨率
即取消注释(删除#
行首的)并以/etc/default/grub
超级用户身份自定义以下行中的最后一行($ sudo gedit /etc/default/grub
)。在本例中,我的显示器分辨率为 1280x800:
# 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=1280x800
2/ 更新你的 grub 配置根据新设置
,即 — 如/etc/default/grub
标题中所述 — 运行以下命令:
$ sudo update-grub