Friday 24 February 2012

Use Bumblebee/optirun to launch program from Codeblocks


The Intel integrated graphics driver is wonderfully stable, it's does not, however, play particularly well with certain opengl calls, and rendering apis.

The solution if you have an optimus laptop is to install bumblebee and run the program with the optirun command. This ensures that it is rendered with the Nvidia chip, and using the Nvidia proprietary blob. Making this happen by default when you launch a program from your IDE is therefore desirable.

Thankfully, for Codeblocks it's fairly simple; You just need to add "optirun" to the terminal launch option in Environment -> General.



This only works if you have your program set to launch as a console application, however, when working in the IDE this is usually the case. The program can be launched externally with optirun for release builds set as to compile as gui applications.

If anyone has a better solution that would ensure all application type settings automatically utilise optirun, i'd love to hear them!

Intel integrated graphics tearing in Gnome 3/Shell


I recently purchased a new laptop that has an Intel integrated graphics chip as part of its graphics arsenal, and found it was tearing slightly in Gnome 3/Cinnamon.

The solution, happily turns out to be very simple.

sudo nano /etc/environment
Append the following the the end of the file
CLUTTER_PAINT=disable-clipped-redraws:disable-culling
ctrl+x to quit and save

Log out or reboot. Done!