http://forum.ubuntu.org.cn/viewtopic.php?t=269452
sudo apt-get install v86d hwinfo
(2)查看framebuffer
sudo hwinfo --framebuffer
sudo gedit /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`
#need to add this line####################################################
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset video=uvesafb:mode_option=1024x768-24,mtrr=3,scroll=ywrap"
#add end #############################################################
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=1280x800
# 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"
-------------------------------------------------------------------------------------------------------------------
(4)修改initramfs:
sudo gedit /etc/initramfs-tools/modules
-------------------------------------------------------------------------------------------------------------------
# List of modules that you want to include in your initramfs.
#
# Syntax: module_name [args ...]
#
# You must run update-initramfs(8) to effect this change.
#
# Examples:
#
# raid1
# sd_mod
##############################need to add this line###
uvesafb mode_option=1024x768-24 mtrr=3 scroll=ywrap
############################# add end##############
-------------------------------------------------------------------------------------------------------------------
(5)强制使用Framebuffer:
echo FRAMEBUFFER=y | sudo tee /etc/initramfs-tools/conf.d/splash
(6)更新grub和initramfs:
sudo update-grub2
sudo update-initramfs -u
(7)重启
当显示花屏时,主要是由于分辨率不正确,一般的frame buffer显示需要的分辨率为1024x768 24位的,所以可用以下方法修改成1024x768 24的分辨率。
sudo apt-get install v86d hwinfo
(2)查看framebuffer
sudo hwinfo --framebuffer
我的显示器分辨率是1344x768的,我需要的是:1024x768-24
如果已经有1024x768-24,则不需要按照下面的步骤修改了
sudo gedit /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`
#need to add this line####################################################
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset video=uvesafb:mode_option=1024x768-24,mtrr=3,scroll=ywrap"
#add end #############################################################
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=1280x800
# 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"
-------------------------------------------------------------------------------------------------------------------
(4)修改initramfs:
sudo gedit /etc/initramfs-tools/modules
-------------------------------------------------------------------------------------------------------------------
# List of modules that you want to include in your initramfs.
#
# Syntax: module_name [args ...]
#
# You must run update-initramfs(8) to effect this change.
#
# Examples:
#
# raid1
# sd_mod
##############################need to add this line###
uvesafb mode_option=1024x768-24 mtrr=3 scroll=ywrap
############################# add end##############
-------------------------------------------------------------------------------------------------------------------
(5)强制使用Framebuffer:
echo FRAMEBUFFER=y | sudo tee /etc/initramfs-tools/conf.d/splash
(6)更新grub和initramfs:
sudo update-grub2
sudo update-initramfs -u
(7)重启