Friday, September 30, 2016

Install video card on Lubuntu with NVIDIA chipset

Install video card on Lubuntu with NVIDIA chipset



I bought a new video card the other day from Zotac and I figured I would install the drivers via their website or the NVIDIA website (a downloadable file named NVIDIA-Linux-x86_64-###.##.run).  WRONG!


The best way to install NVIDIA drivers is through the official Ubuntu repositories:

sudo nvidia-installer --uninstall
sudo apt-get remove nvidia* --purge
sudo update-initramfs -u
sudo apt-get install nvidia-current


For most people, that should be sufficient -- reboot and verify.  If the resolution still looks off, read on...


It turns out I had black bars at the top and bottom of my screen and everything was fuzzy.  It turns out the NVIDIA auto-configuration didnt detect my old monitor (SyncMaster 920nw) and its weird 1440x900 aspect ratio so I needed to do some additional tweaking.

I ran this command to generate my /etc/X11/xorg.conf file (bypassing automatic monitor detection):

sudo nvidia-xconfig --no-use-edid-dpi


I then edited the /etc/X11/xorg.conf file and added the following line to the Monitor section:

Option "DPI" "96 x 96"


I also had to change the HorizSync and VertRefresh values to (check your monitor manufacturer page to find the right values for your monitor):

HorizSync       28.0 - 80.0
VertRefresh     48.0 - 75.0


Then, in the Screen section, I had to add:

Option "IgnoreEDID" "true"


After saving the file, I rebooted and loaded the NVIDIA config tool (Start > System Tools > NVIDIA X Server Settings).  In the X Server Display Configuration screen, I clicked the Resolution dropdown and chose 1440x900.  Once the resolution updated and looked good, I clicked the Save to X Configuration File button.

After rebooting to verify the change persisted, I had to update my /etc/default/grub file with these lines to improve my splash screen and grub list resolution:

GRUB_GFXMODE=1024x768
GRUB_GFXPAYLOAD_LINUX=keep

(note: my BIOS video driver doesnt support 1440x900 so I just went with a decent alternative for my needs.  Feel free to run sudo hwinfo --framebuffer to check your options)


In addition, I needed to create/update the /etc/initramfs-tools/conf.d/splash file to add this line:

echo FRAMEBUFFER=y


Finally, I ran these commands to apply the changes:

sudo update-initramfs -u
sudo update-grub2


I rebooted once more to verify the grub list and Lubuntu splash screen at startup looked moderately better.



...Hope this helps anyone else with an unusual setup like mine!



_______________

References:

  • http://ubuntuforums.org/showthread.php?t=1537225&p=9627153#post9627153
  • http://www.techytalk.info/lubuntu-change-fonts-dpi-when-using-proprietary-nvidia-driver/
  • http://www.binarytides.com/ubuntu-fix-nvidia-graphics/

Available link for download