Archive

Posts Tagged ‘nvidia’

Ubuntu, nvidia, projector, screen cloning, 1024×768 resolution

February 14, 2014 Leave a comment

Problem
I have a laptop that I use for teaching. It is connected to a projector. Everything was fine until today. The next semester starts next Monday, so today I checked if the laptop still works well with some projectors. Nope. Of course not! I tried three classrooms. One projector was OK, but two others didn’t recognize my laptop (“no connection”).

In order to avoid problems with the nvidia driver, I used to keep an old driver on my machine that worked well. When the packages were updated, I always left out the nvidia packages. But something happened since December… So I decided to upgrade all the Nvidia packages too. By the way, I have Ubuntu 12.04 LTS on this laptop. The result almost made me cry: after the upgrade I couldn’t change the resolution on my laptop anymore. If I want to use a projector in clone mode, switching to resolution 1024×768 is mandatory. Damn!

Solution
This article saved my ass. It explains how to update your Nvidia driver with the newest one directly from Nvidia. The new driver, which came out in January 2014, works well. I can change the resolution and cloning works too. Phew…

Steps
Here I sum up the steps from the aforementioned article:

(1) Download the latest driver for your card from http://www.nvidia.com/Download/index.aspx .

(2) Blacklist the nouveau driver. “sudo vi /etc/modprobe.d/blacklist.conf” and add this line to the end:

blacklist nouveau

(3) Switch to the virtual terminal (Ctrl+Alt+F1) and execute these steps:

$ sudo apt-get remove --purge nvidia*
$ sudo service lightdm stop
# locate the downloaded driver and run it
# your version probably will be newer
$ sudo sh ./NVIDIA-Linux-x86_64-295.33.run
$ sudo reboot

If something went wrong and you encounter some problems during the reboot, here is how to revert the changes. Switch to the virtual terminal (Ctrl+Alt+F1) and execute these steps:

$ sudo sh ./NVIDIA-Linux-x86_64-295.33.run --uninstall
$ sudo apt-get install nvidia-current
$ sudo service lightdm restart

Downgrade your Nvidia driver

April 28, 2013 Leave a comment

Problem
I have an older laptop that I use to watch movies on my TV. It is connected to the TV and I use the TV as a “projector”. The resolution of our HD-ready TV is 1152×864. I also set this resolution on the laptop and the screen was cloned on the TV. It can be set with nvidia-settings easily. Everything worked fine for years when suddenly…

…I clicked on the “Update” button. And it updated the Nvidia driver. And from then on I couldn’t change the resolution. Aaaarrrrrghhhhh!

The nvidia driver offered one resolution only: the highest one, which is 1900×1200. It would be fine for my laptop but I want to clone the screen on the TV which doesn’t support such high resolution. Damn!

Solution
I tried everything. For hours. And finally I found the solution: I managed to downgrade the nvidia driver from 304.88 to 295.33.

nvidia graphics drivers: here

nvidia-settings: here

Note that the version of nvidia-settings must match the version of nvidia graphics driver!

So I downloaded the following files:

nvidia-current_295.33-0ubuntu1_i386.deb
nvidia-current-dev_295.33-0ubuntu1_i386.deb
nvidia-settings_295.33-0ubuntu1_i386.deb

I removed the current nvidia packages and then installed the 3 packages above. Here I suppose that the 3 files above are saved in a folder and you entered that folder.

sudo apt-get purge nvidia-*
sudo dpkg -i *

After restarting the machine it worked fine. On this laptop I will never ever update the nvidia driver, that’s sure as hell.

Links
The downgrade tip is from here.

Ubuntu 13.04

April 26, 2013 4 comments

So far I’ve upgraded two machines. I like the new Ubuntu (though it looks and feels like 12.10 :)) but the upgrade was not as smooth as before.

First, on my workplace machine the upgrade process stopped at 30% and the machine simply froze down. I could move the mouse but nothing else worked. Even the clock in the top right corner stopped. I gave it a try, restarted the machine and to my greatest surprise it came back alive and I even had a graphical interface. Wow! With my good_shape_safe.sh script (it’s the second one) I could continue the upgrade process and it finished in order. After a reboot I had a fully functional Ubuntu 13.04.

Second, my home desktop was upgraded without any freeze :) I brought home the update packages and thus the upgrade process finished in an hour. However, after reboot the X started in low resolution. When I launched “nvidia-settings“, it said that my Nvidia card was not enabled and I should re-generate the xorg.conf file. It told me how to do that so I copied/pasted that line to a terminal. After that I reinstalled the nvidia packages:

sudo apt-get --purge remove nvidia-*
sudo apt-get install nvidia-current nvidia-settings

After restarting the X (“sudo service lightdm restart“) the resolution was fine.

However, the torture was not over yet. The graphical interface (Unity) got messed up: the launcher didn’t appear; the Super key (Windows button) didn’t bring up the Dash; the top panel was covered by a Gnome2-ish panel, etc. Fortunately, I found a script that could reset my Unity: https://github.com/phanimahesh/unity-revamp. It worked perfectly and my Unity became usable again. With “ubuntu-tweak” I could fine-tune my new Ubuntu and now it looks like my 12.10 :)

Links

  • I read about the unity-reset script here
  • you can install ubuntu-tweak easily with my jabbatron installer script

Update (20130428)
This morning my Ubuntu got f* up completely. I was at the point that I reinstall the whole s* from scratch. Strangely, after some restarts it started to work OK. So, here is what happened.

First, after restart I got a blank screen. No X, nothing. I couldn’t even switch to console with Ctrl+Alt+F1. After a reset I got the graphical interface. But after a restart no X again. It was alternating… I edited the file “/etc/default/grub” and changed this line:

GRUB_CMDLINE_LINUX_DEFAULT="splash"

Now at least I could follow the bootup sequence and noticed that the boot stopped after mounting the swap partition. Following this post I could fix the swap partition. I am not 100% sure that it was the problem since I also installed a newer version of the nvidia driver.

Fixing the swap partition:

# run "sudo gparted" and figure out the partition of the swap
# for me it was /dev/sda2
sudo swapoff /dev/sda2
sudo mkswap /dev/sda2
sudo swapon /dev/sda2
sudo update-initramfs -u

Update the nvidia driver:

# previous version: 304.88
sudo apt-get --purge remove nvidia-*
sudo apt-get install nvidia-313 nvidia-settings-313

Now the blank screen problem was solved. However, I couldn’t stop the machine. It displayed “* Will now restart” but nothing happened. Again, I had to poke the “/etc/default/grub” file:

GRUB_CMDLINE_LINUX="reboot=b"

More info here. Now it seems OK. Damn, if I had known that I’d have so many problems, I wouldn’t have upgraded to 13.04…

Appendix
My “/etc/default/grub” file looks like this:

# 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_DEFAULT="Windows 7 (loader) (on /dev/sda1)"
#GRUB_HIDDEN_TIMEOUT=0
#GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=7
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
#GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX_DEFAULT="splash"
GRUB_CMDLINE_LINUX="reboot=b"

# 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
GRUB_GFXMODE=1024x768

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

When you edit this config file, run the following command:

sudo update-grub2

Update (20130503)
My upgraded Ubuntu 13.04 continued to behave strangely. I got fed up with that and today I reinstalled it from scratch. Now it works correctly. Something must have happened to it during the upgrade…

Update your Nvidia driver to 310.19

November 20, 2012 Leave a comment

Here is how to do that.

In short:

sudo add-apt-repository ppa:xorg-edgers/ppa 
sudo apt-get update 
sudo apt-get install nvidia-current nvidia-settings

Then restart.

Categories: ubuntu Tags: , , ,

Moments when the heart stops beating

April 8, 2011 Leave a comment

It’s Friday (at last) and this week was quite good, so here is some fun:


- … concluding my study of using GPUs for protein analysis.
– nVidia just released a toolkit doing that exact thing!
– ???

Ref.: reddit.

Categories: fun Tags: , , , , ,
Follow

Get every new post delivered to your Inbox.

Join 61 other followers