Nvidia Optimus on Ubuntu 12.04

Nvidia Optimus is a neat solution to the problem of power consumption vs. 3D performance in notebook computers – the computer comes with two graphics chips, an “integrated graphics package” – the Intel GMA embedded graphics and a “discrete graphics package” – the Nvidia chip. The setup works by running your normal windowing UI on the integrated graphics, only powering on the discrete graphics when you want to play a 3D game or something like that.

Recently I had the fortune to work on a Lenovo T420 laptop1 that has this setup, and it works very well on MS-Windows with the Nvidia Optimus driver – you get battry life around 10 hours with the 9 cell battery.

Unfortunately I spend most of my day in Linux and because Nvidia does not support Optimus on Linux, you have the poor choice of either running everything on the Nvidia chip – decreasing battery life to around 4 hours if you’re careful, or disabling the Nvidia chip completely.

The solution comes from the Bumblebee project – a software suite to handle the switching between the Nvidia discrete graphics and the embedded Intel chip.

The setup is pretty simple to understand (though I suspect under the hood there are many problems to be solved): A service runs and waits for users to ask for 3D accelerated graphics. When a user starts a program using the special command optirun, the service loads the Nvidia driver, starts an X server using the discrete graphics (with the display disconnected from the actual screen) and runs the specified program on that “background” X server. Then it copies the visuals from the program that is rendered using the discrete graphics to a window on the main X server. When the program terminates, the service closes the secondary X server, removes the driver and powers down the graphics card – putting us back into the ~10 hours battery life.

The Bumblebee software had some problems in the past, but the current version – 3.0 – looks very good. There are a few seconds of delay when you launch the application (setting up the driver and X takes some time), but performance is about what you’d expect when running directly on the hardware. All this without any configuration – that is if you are running on the stable Ubuntu version.

As I can’t leave well enough alone, and whenever someone says “alpha”, I say – “I wants”, I’m running the current Ubuntu 12.04 alpha (which is not so bad – due to be released in a couple of months, it works very well). And of course Bumblebee doesn’t work properly here.

So this is what I had to do to get it running:

(more…)

  1. with an amazing 1600×900 screen, what they call “HD+”. Truly a work of art []

דבר חשוב מאד שלא שמתי לב אליו בכלל

זה שהמשחק של Penny Arcade יצא בגרסת לינוקס כמו גם גרסת מק (ובאותו יום כמו גרסת החלונות, לפחות כך מספרים לי).

(more…)

Another gaming post – Wii head tracking

There’s a lot of Wii hacks going around (mostly by this guy) – which I’ve mostly managed to ignore, but this last one is so cool. You wouldn’t think so just reading the title, but watch the video:

This is definitely cool, and as Johnny Lee says – if any Nintendo Wii developer is watching this: bring on the games!

(I’m not buying a Wii just yet, but if a game that uses this technique comes out, I’d be hard pressed not to buy one).

כבר לא vaporware ?

לא ראיתי את אח שלי כותב על זה, אז אני צריך:

האם יתכן ש-Duke Nukem Forever אכן ישוחרר מתישהו ?

לא האמנתי שהפרוייקט הזה עדיין בפיתוח אבל הנה:

עדכון – 9.5.2009

נראה שאזלו הסיכויים לראות את דיוק חוזר לסיבוב רביעי: 3D Realms סוגרים את הבסטה באופן סופי מוחלט ואולי חוזר (אחרי ש-Apogee חזרו לסיבוב נוסף, מי יודע? (שזה ממש מצחיק כי 3D Realms הם בעצם Apogee) ).