Ubuntu 13.10 Intel Graphics Killed by OpenCV

If you, like me, installed OpenCV from the Ubuntu package manager on a computer with an Intel graphics card, you might have been thinking you bricked your installation and would have to start from scratch. Thanks to some good work by a few other Ubuntu users, I as able to remedy this problem and get my desktop back. Moral of the story: don’t install OpenCV from the repos. Somebody in charge of the package dependencies made it depend in a round-about way on NVidia packages, which breaks the desktop for Intel graphics chips.

My symptoms are these: when I booted my Dell Inspiron laptop with an Intel graphics card, the boot process would make it all the way to the login screen. I would enter my credentials, log in, and be met by a blank black screen with my mouse cursor. I could move the pointer around, but without a window manager or file manager or anything, I couldn’t do anything graphically.

The Fix

This fix had two parts: first, I had to remove the offending packages. This was done by running the following command:

$ sudo apt-get install ocl-icd-libopencl1

…and then running:

$ sudo apt-get autoremove

…Which removes all the redundant packages that libopencv-dev brought in, leaving you with a generic version of libopencl1. This takes care of the nvidia package problems, but when you reboot, you still don’t get Unity back. What’s up with that?

Unity runs as a Compiz plugin in Ubuntu. In some cases, installing the wrong packages like those above will cause the settings in Compiz that start Unity to be unset. You will need to install the Compiz configuration tool:

sudo apt-get install compizconfig-settings-manager compiz-plugins-extra

Then, after reboot and login (to the graphical desktop that lacks Unity), type Ctrl+t to open a terminal and run:

$ ccsm

…to start the manager. Look for the Unity plugin when the manager comes up, click on it, and make sure it gets enabled.

…And that’s it! Your machine should be back up and running right without needing to re-install the desktop or unity and without having to re-install the OS. In the mean time, let’s hope that whoever made the mistake of making opencv-dev depend on all that stuff gets their act together and fixes it.

Adam Nickle

About Adam Nickle

I'm a total nerd, intellectual explorer, number theory enthusiast, and computer science nut. I'll write about anything from math and programming to religion and science fiction, all of which play central roles in my life.
This entry was posted in Ubuntu. Bookmark the permalink.

2 Responses to Ubuntu 13.10 Intel Graphics Killed by OpenCV

  1. Rohit says:

    I am new to ubuntu as well as openCV.
    Just like you did, even I installed openCV from Ubuntu package manager but contrary to your symptoms, my symptoms are: when I boot into my Lenovo z580 laptop which has both Intel graphics card and an Nvidia gt630m 2GB graphics card, I get Ubuntu gnome splash after choosing Ubuntu 13.10 from the grub menu and then it gets struck there. I am even unable to enter my credentials and login. So can you help me out how can I open the terminal and enter the commands suggested by you??

    • Adam Nickle Adam Nickle says:

      Grub 2 has an option in the list labeled “Advanced options for Ubunu”. If you select that instead of the regular Ubuntu option, you are presented with several more options; select the one with the highest version number that is also followed by “recovery”. For more specifics, see:
      Ask Ubuntu, where the process is explained in detail. You need to first enable networking so you can download stuff, then boot into a shell. To make things easier on you, make sure your computer has an Ethernet cable plugged directly into it. That process should work as long as you don’t enable graphics.

      I’m not sure what effect the Intel/Nvidia pairing would have, but there are ways of disabling the Intel graphics card. If you aren’t using it, that’s what I would suggest you do. Otherwise, my solution in this post should work.

Leave a Reply

Your email address will not be published. Required fields are marked *