Ubuntu 通过设置vga=nomodeset禁掉显示器的刷屏

当ubuntu出现刷屏时,这个时候我们可以设置grub启动参数,禁掉刷屏操作。

/etc/default/grub

在该文件中添加vga=nomodeset,然后update-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 **vga=nomodeset**"
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"

执行update-grub,然后重启即可。

root@weihanwu-OptiPlex-990:/etc/default# update-grub
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.4.0-21-generic
Found initrd image: /boot/initrd.img-4.4.0-21-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
done
root@weihanwu-OptiPlex-990:/etc/default#

reboot重启之后,电脑就不会再继续刷屏了。

  • 2
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
您好!很抱歉听到您在Ubuntu 20.04上遇到了连接显示器的问题。我可以为您提供一些可能的解决方案,请您尝试以下步骤: 1. 确保显示器和计算机之间的连接正常。检查显示器是否正确连接到计算机的视频输出端口,并确保线缆没有松动。 2. 确认显示器的电源是否打开,并且在正常工作状态下。可以尝试连接其他设备(如笔记本电脑或其他计算机)来验证显示器是否正常工作。 3. 检查计算机的图形驱动程序是否已正确安装。您可以尝试更新或重新安装图形驱动程序以解决可能的兼容性问题。 - 您可以通过打开“软件和更新”应用程序,切换到“附加驱动程序”选项卡来检查和更新图形驱动程序。 - 如果使用英特尔集成图形,您可以尝试更新“intel-microcode”软件包,以获得更好的兼容性和性能。 4. 尝试调整显示器的分辨率和新率。在Ubuntu桌面上,可以通过打开“设置”应用程序,然后选择“显示”选项来进行调整。 - 尝试降低分辨率和新率,然后逐步增加以找到适合您显示器的最佳设置。 5. 如果您使用的是离散显卡,可以尝试在启动时使用“nomodeset”选项来用显卡驱动程序的内核模式设置。 - 在启动时,按下Shift键或Esc键,然后选择进入“高级选项”或“恢复模式”。 - 在启动选项中选择您希望使用的内核版本,然后按下“e”键进行编辑。 - 在启动参数中找到以“quiet splash”结尾的行,在末尾添加“nomodeset”。 - 按下Ctrl + X或F10以启动计算机,并查看是否可以连接显示器。 如果您尝试了上述步骤但问题仍然存在,请提供更多详细信息,例如您使用的计算机型号、显示器型号以及任何错误消息,以便我们更好地帮助您解决问题。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值