XPS 13 “Developer Edition” Microphone Fix

It seems the microphone doesn’t work out of the box on the XPS 13 “Developer Edition”. Worse, you’ll actually need to re-compile your kernel to make it work… at least the patches are easy to find thanks to Dell’s “Project Sputnik” leader Barton George:

I used those on the Linux 4.0.2 (stable) kernel, recompiled, installed… and voilà! The microphone works!

Hopefully those fixes will soon be in the kernel main line…

XPS13 “Developer Edition”: Updating the graphics driver

Update: I previously indicated to use the “xorg-edgers” PPA. But it’s far too brutal since it will update a lot of other things (such as the X server) and it might just break. I now recommend using the Oibaf PPA to update only the drivers.

Following my article about a few “out of the box” fixes for the XPS 13 “Developer Edition”, I wanted to upgrade the Intel graphics driver and Mesa. Indeed, I noticed some issues with 3D apps:

  • most games were incredibly slow, or at least a lot slower than what ohter got with the same hardware on Windows (and OpenGL performance are supposed to be on-par or close – if not better – on Linux now);
  • WebGL was not available neither on Chromium nor Firefox, even through their latest stable version.

The pre-installed version of Mesa (10.1.3) is pretty old (May 2014). You can upgrade it to the latest version along with the latest Intel drivers using the “xorg-edgers” PPA the Oibaf “Updated and Optimized Open Graphics Drivers” PPA.

Updating the i915 drivers and Mesa should give you a very important performance boost on 3D apps. I noticed “Counter Strike: Global Offensive” went from barely playable to completely smooth. I also noticed WebGL is now properly available on both Firefox and Chrome.

XPS13 Developer Edition Fixes

I recently bought a brand new XPS 13 “Developer Edition” that I want to use as my main machine for development. I’m very happy to see Dell building machines fit for Linux. The Dell XPS 13 has many very very good reviews. And it’s even better when it comes with Ubuntu pre-installed with all the good drivers (or close…).

dell xps13

It’s too soon to draw any conclusions yet: I’ve been using the computer for only 1 day. Still, I must say it works overall very good and I’m satisfied so far (except for the one or two quirks listed below). Especially by the gorgeous incredible “infinity display”, which packs a 3200×1800 touchscreen in a 13′” screen that fits in 11″ case. The XPS 13 “Developer Edition” comes with Ubuntu pre-installed, and it also comes with a “factory reset” feature you come to expect from a brand such as Dell. So if you brick your Ubuntu install, you can easily reset it without much hassle.

The only problem I encountered is some trackpad freezes that happen to be very annoying. It gives you the feeling the rig is not responsive when it’s actually pretty fast. To fix this, I applied this kernel patch:

You can safely apply this patch to the 3.13 Linux kernel that comes with the XPS 13/Ubuntu 14.04 mint install. But as I had to re-compile the kernel, I wanted to try the recently released stable Linux 4.0.2 kernel.

If you do so, you’ll also need to patch the Broadcom drivers. And because they’re not compatible with Linux 4.0 kernels, you’ll have to apply a little patch: bcmwl driver fixed for Linux 4.0 kernel.

After upgrading to Linux 4.0, I noticed the overall computer feels a lot faster and responsive. I don’t know why but it just does. It might be related to the fact the old 3.13 kernel was not using the new Intel P-state CPU governor.

Last, I also encountered kernel panic issues at three occasions:

  1. When changing access-points or simply disconnecting the Wi-Fi. This fix seams to do the trick: fix for the bcmwl kernel panic/crash.
  2. When suspending, but I guess it’s related to the Wi-Fi issue.
  3. When running a VirtualBox VM. I had to use VirtualBox 5.0 beta and patch Vagrant to support it.

Update: You can get more out of the XPS13 battery using the following script:

3D Matrices Update Optimization

4×4 matrices are the heart of any 3D engine as far as math is concerned. And in any engine, how those matrices are computed and made available through the API are two critical points regarding both performances and ease of development. Minko was quite generous regarding the second point, making it easy and simple to access and watch local to world (and world to local) matrices on any scene node. Yet, the update strategy of those matrices was.. naïve, to say the least.


There is a new 3D transforms API available in the dev branch that provides a 50000% 25000% boost on scene nodes’ matrices update in the best cases, making it possible to display 50x 25x more animated objects. You can read more about the changes on Answers.

Continue reading “3D Matrices Update Optimization”

Optimized AABB-Ray Intersection

As I am working on ray casting for Minko 2, I need to test the intersection between an axis aligned bounding box (AABB) and a ray. In order to do this, I implemented the slab method. Here is how it looks in AS3:

You can find this method in the latest version of the BoundingBox class on github. If you have questions/suggestions, you can post in the comments or on Aerys Answers.

Minko 1.2: Easier Post-Processing Effects

I’ve just pushed an update on Minko’s GitHub repository. It is tagged as version 1.3 1.2. This new version introduces new helper classes to make it easier to write post-processing effects.

The New Simplified Post-Processing API

Writing a single pass post-processing effect has never been easier, here is how to write a simple greyscale post-processing shader (go to the end of the post to see it in action):

And here is another example to create a “vignettage” effect (it darkens the corners of the viewport):

And then, where you initialize the Viewport:

As you can see, writing a single pass post-processing shader is really simple:

  1. Extend the PostProcessingActionScriptShader class.
  2. Override the getFinalColor() method to implement your shader.
  3. Set the Viewport.postProcessingEffect property to a new SinglePassPostProcessingEffect using your shader.

Multipass Post-Processing

If you need to write multipass post-processing effects, it’s just as simple as when you work with a rendering effect: implement the IEffect interface and create an IEffectPass class for each pass or reuse the provided SinglePassEffect class (because a single pass effect is… a single pass).

In Blacksun, we use this technique to create the HDR Bloom effect that uses 5 passes:

Live demo right after the jump…

How to: handle C++ exceptions with Adobe Alchemy

Alchemy is a great project that enables C++ code to be transformed to ActionScript 3.0 bytecode. But some of the C++ features are not available. Exceptions handling is one of them. It is a big issue because any decent C++ project uses exceptions.

Exception objects are actually properly created and raised. But try/catch blocks have no effect. As far as synchronous Alchemy functions are concerned, this causes an uncatchable exception to be raised when the C++ methods or any sub-routine raises an exception. Even the new global error handler can not catch those exceptions. When using asynchronous Alchemy functions, it is even worse: the main thread crashes and your application exits immediatly.

Sample code right after the jump…