Enabling Bumblebee on an XMG P304

Note that this article is more accurate & useful. Read that instead.

Optimus uses the integrated graphics controller to render to a surface when the discrete graphics card is not in operation. When discrete graphics is in operation, it renders to the surface hosted by integrated graphics.

There’s a good and detailed explanation of this here.

To find the integrated graphics on the PCI bus:

To find the discrete graphics on the PCI bus:

This is needed for the next step.

Install Bumblebee

Note that when the bumblebee installer runs, it only finds the discrete graphics card, not the VGA integrated graphics:

Update & upgrade afterwards.

Install a recent Proprietary Nvidia Driver

Tell Bumblebee where the integrated graphics is

As mentioned above, Bumblebee needs to know where the integrated VGA card is as well as the discrete 3D card.

Distressingly, it needs to know this information in the correct order. VGA must be specified first, then 3D:

After a reboot, you should be able to use optirun to run using discrete graphics. You’ll know it’s running discrete graphics because it’ll run at crazy fps, and the fan will sound like a vacuum cleaner!

To try out your new blitzbox, you can try this:

This should produce something like:

You could then turn on the graphics card to run this test again on faster hardware by doing:

On my box, glmark2 is actually showing a lower performance for the Nvidia card:

I probably need a more up to date driver, but at least the correct hardware is in use!

The above was wrong because the GPU bridge wasn’t in operation

Install the VirtualGL bridge.

Enable vsync

Some tearing while using the intel graphics can be fixed using information from this page: https://wiki.archlinux.org/index.php/Intel_graphics#Tear-free_video.

New Toy


Last week I received a new laptop. I purchased a pretty tricked out custom-built P304 from these charming people, or these people, for those who like their sites in English.

There was a problem with the SSD; I seem to have fallen afoul of the bathtub curve, and after installing half an OS, it failed, and would no longer announce its existence to the motherboard.

Bad luck

I spoke to the guys at Schenker, who were friendly and knowledgeable, and generally behaved like competent human beings who didn’t spend their days getting bombarded with basic questions – a fate that seems to befall a lot of poor front line tech support people.

So, given verbal & email assurances that opening the back of my machine wouldn’t invalidate my warranty, I moved the SSD, tried various power cycle combinations that hinted more at desperation-driven voodoo than diagnostic driven behaviour. Once I’d described this to the Schenker folks, they were quite happy to send out a new SSD.

In the meantime, I put another SSD in this machine, and it is a thing of beauty.

Lovely organisation

I can’t recommend Schenker (or XMG, as their gaming PC branding has it) enough. They provided me with an efficient and competent service at a competitive rate, and the end product, based on a Clevo W230SS, is a gaming laptop that weighs 2kg and has a battery life of ~5 hours.

I ended up installing Windows 8.1 on the SSD I put in. Once the mSATA SSD from Schenker shows up, I’ll put a Linux distro on that.


When I installed Windows (from a W8 DVD), I accidentally used the legacy BIOS setting and not UEFI. To avoid tediously reinstalling, re-updating and re-upgrading to Windows 8.1, I used this excellent guide to rewrite the MBR boot partition into a GPT partition.

I also switched the clock time format so as not to conflict with *nix runs using information from this page.

If I had any gripe, it would be that the only explicit driver support is for Windows. Recent Debian-based distros, like Linux Mint 17.1 seem right at home on this box, because the hardware is all pretty standard.

The P304 comes with an Nvidia GTX 860 as well as onboard Intel graphics. I haven’t yet got over the Bumblebee hurdle to get the graphics card recognized by the Linux OS.

I’ll post again when I figure that out.