If you’re running Ubuntu Maverick with Nvidia Official drivers, and your screen messed up at starting up and shutting down the system. You can try following method to fix the problem.

Step 1: First, open up a terminal window from Applications -> Accessories menu. Run this command to install preparing tools:

sudo apt-get install v86d hwinfo

Then, use following command to get a list of supported screen resolution modes (800×600 16bits, 1280×1024 24bits 1024×768 16bits, etc…).

sudo hwinfo --framebuffer

Step 2: Now, let’s start editing the /etc/default/grub file:

sudo gedit /etc/default/grub

Find following section and change it looks like this:

GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash nomodeset video=uvesafb:mode_option=1280×1024-24,mtrr=3,scroll=ywrap”

# 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’

Here, change 1280×1024-24 (1280*1024 24bits) to yours screen resolution and it must be listed in the output of sudo hwinfo --framebuffer

Step 3: Run this command:

sudo gedit /etc/initramfs-tools/modules

Add following line into the end and save it.

uvesafb mode_option=1280×1024-24 mtrr=3 scroll=ywrap

remember to replace 1280×1024-24

Step 4:Finally, execute following commands and then restart your machine.

echo FRAMEBUFFER=y | sudo tee /etc/initramfs-tools/conf.d/splash
sudo update-grub2
sudo update-initramfs -u