Tuesday, 23 July 2013

The Optimus mess

Yeah, that's right. The Optimus mess. NO! This, is neither a critical writing of the character Optimus Prime, nor is this is a new episode, or fan-fiction of Transformers. In fact, this is not even remotely related to the Transformers franchise in any way (except for the naming scheme). This post, is about the new (not-so-new now) hybrid graphics technology by Nvidia.

Sometime in early 2010, I bought a laptop from Asus; Asus U41SV. This laptop comes with a 'standard voltage' i5 processor (2 cores/4 threads, 2.3GHz, 35 Watts), 4GiB of ram (which I upgraded to 8GiB), 650GiB HDD (which I replaced with a 1TiB HDD), and an 8-cell battery (which, I think is quite big). It also comes with a hybrid dual graphics solution called Nvidia Optimus. This solution consists of an Intel HD graphics chip, paired with an Nvidia GT540M 1GiB ram (which is kind of okay for games, but mostly average). This laptop also came preinstalled with Win7, and was advertised to have a battery life of 8-10 hours.

With Optimus, what actually happens during usage is that, during regular non-graphics intensive  tasks, such as web browsing, watching movies, and doing office apps, the power-hungry Nvidia chip is switched off, and only the intel graphic chip is used. This allows much power-saving during regular tasks. However, when launching graphics intensive apps such as 3d games, the Nvidia chip is turned on to render the complex graphics. This allows the laptop to use the high performance Nvidia chip to run graphics-demanding apps smoothly, but only when necessary. The trade-off is of course that running 3d games consumes more power.

My experience with the laptop on Win7 is that at lowest screen brightness, the laptop may idle for about 8 hours. At regular use of internet browsing, it may last up to 5-6 hours. This is not as much as the advertised battery life, but to me, it is still pretty great. When running some 3D games, the laptop may only last up to 1-2 hours. This does not matter much since "I don't always run games on my laptop but when I do, I plugged it to a power source" (I should make a meme of this, but meh).

However, when I installed Ubuntu 10.10, things don't work so well. At any time at all, the Nvidia chip is always turned on, but never used. The laptop only runs using the Intel chip for graphic processing, even though the Nvidia chip is using power. This results in a large power consumption in the laptop, unnecessary overheating, but none of the performance benefits of the Nvidia card. If I tried installing the non-free Nvidia driver, suddenly I get no graphics on my laptop.

Why is this happening you say? Nvidia did not provide support for Optimus on Linux, it's as simple as that. This caused much rage in the Linux community. There was, however an attempt to provide a solution to this problem by the community, by a software called Bumblebee and an ACPI call kernel module (I don't really understand all this, so don't take my word on this). What happens is that, at boot time, Bumblebee is started as a service/daemon, and will immediately send a signal through the acpi call module, to turn off the Nvidia card. If we need to run a software using the Nvidia card, for example, a game called xonotic, we use the command 'optirun'.

optirun xonotic

What this does is that it will tell Bumblebee to turn on the Nvidia card (acpi-call), load the Nvidia drivers, and use that to render graphics. So, you could still have the features of Optimus, on Linux. The problem was that around 2010/2011, this was still a bit patchy. Installation of Bumblebee was a hassle, not so noob-friendly, requiring you build the software from source. You also needed to manually configure the proper acpi-call. Whenever you need to use the Nvidia card, you need to use 'optirun' to tell Bumblebee to use Nvidia card, which feels inconvenient compared to how this is automatic in Win7.

However, things are better now. Distros now include Bumblebee in their repos, and detailed guides in their wikis. the acpi-call has been replaced with bbswitch, which does not need much to configure. At times however, I still get some difficulties when installing a Linux distro on my Optimus laptop, but most of the time, things work out in the end.

My experience with the laptop on Ubuntu is that at lowest screen brightness, the laptop may idle for about 2 hours without Bumblebee/bbswitch. With Bumblebee/bbswitch properly configured, idle time improves to 10 hours, which is just plain awesome! At regular use of internet browsing, it may last up to 6-7 hours.

In the end, I hardly do any 3d gaming at all that warrants me buying a laptop with the Nvidia card. I kind of regretted buying this laptop, but I did not even know about this Optimus thing until after I tried installing Linux. Since I mostly do regular office work, mostly using Linux, I could have bought a cheaper i3/i5, 'standard/ultra-low voltage' laptop with Intel graphics, and never had to worry about configuring Optimus. I find that the Nvidia chip is not necessary for my use. If I opted for an ultra-low voltage Intel cpu, I could find a lightweight laptop, with slightly smaller battery, maybe one of those 'ultrabooks'. But, this laptop has served me well these past years, ran quite well, and is quite responsive.

I am also very glad that people built the Bumblebee/bbswitch, which helped my laptop to run for hours on battery, and keeping it cool. KUDOS to the Bumblebee Project team, and the Ironhide developer!!!

But Nvidia Optimus, man, what a mess!!!

No comments:

Post a Comment