标签:
由于装了nvidia显卡驱动后开机一直处于循环登录界面,密码输入正确也是进不去,然后就决定卸载nvidia显卡驱动。
首先是在能使用tty1登录的情况下,使用
$ sudo apt-get autoremove --purge nvidia-*
$ sudo reboot
然后就发现开机能进去desktop了,很开心,结果就是切换到tty模式下是黑屏,其实不是黑屏,是由于卸载了nvidia驱动后,屏幕分辨率出现了这个问题。
使用了师兄办法,顺利解决了这个问题。方法如下:
$ sudo vi /etc/default/grub
grub文件里把GRUB_CMDLINE_LINUX=""加了个参数,改为GRUB_CMDLINE_LINUX="vga=792",792代表的是1024*768分辨率的十六进制0x0318代码。
$ sudo update-grub
对于找自己的屏幕VGA参数代码,感谢cybertan,http://blog.csdn.net/cybertan/article/details/6550085
Linux内核的VGA参数
在一般的Linux系统中如果不指定"vga="参数,系统将不会支持frameBuffer设备,
默认kernel给的tty分辨率是非常有限的,解决的方法就是给kernel传递VGA参数。
色彩
|
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
|
?
|
?
|
?
|
?
|
?
|
?
|
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(http://sourceforge.net/projects/zhcon )或者cce(http://sourceforge.net/projects/cce2k/ )更加完美。
下面是所有分辨率的列表:
# 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
版权声明:本文为博主原创文章,未经博主允许不得转载。
标签:
原文地址:http://blog.csdn.net/langb2014/article/details/46829617