Europython Blogging

June 30th, 2009

And here I am at Europython 2009 in rainy but inhumanly hot Birmingham. I made it for 8am but I am all on my own thanks to a possible hamthrax infected absence.

Interesting stuff from the main introduction. There are over 440 delegates. There are some raffles including the coins designed by Stani using free software. Also they’re looking for venues for 2011/2012 but it sounds like a hell of a lot of work.

Right, on to my first talk about PyPy.

Share:
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • description
  • Reddit
  • Slashdot
  • StumbleUpon

Garry Bodsworth ,

EuroPython 2009

June 23rd, 2009

The EuroPython 2009 conference is less than a week away, I have no idea where June went. It should be a great time in sunny Birmingham. I am going to the conference days Tuesday through Thursday.

There are loads of talks so my brain should be crammed after three days of that. I might also try out doing a lightning talk whilst I am there. although I would have to put some thought into what I’d talk about.

You can register here with the three conference days costing £190.

Share:
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • description
  • Reddit
  • Slashdot
  • StumbleUpon

Garry Bodsworth

“Boot Error” when booting from USB

June 23rd, 2009

Some BIOS have problems booting from USB pen drives. This lead to to what I consider an insane discovery, USB flash drives have heads, cylinders, and sectors/tracks, but they are entirely virtual.

What your normally end up with is a prompt saying “Boot Error” and nothing else of use. This is because some BIOS are limited to 1024 cylinders so you need to change the geometry of the flash drive.

You can do this in Linux with the following commandline (where sdX is the device which is the usb flash storage):

mkdiskimage -4 /dev/sdX 0 63 62

The numbers depend on the size of the USB key as they need to be chosen to get a total number of cylinders less than 1024.

A 1GB stick would be:

mkdiskimage -4 /dev/sdX 0 64 32

A 1GB-2GB stick would be:

mkdiskimage -4 /dev/sdX 0 128 32

A 2GB-8GB stick would be:

mkdiskimage -4 /dev/sdX 0 255 63

Once your geometry is set up you can go ahead and partition your device and use it.

Share:
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • description
  • Reddit
  • Slashdot
  • StumbleUpon

Garry Bodsworth

Installing The Latest Intel Drivers – The Kernel

June 21st, 2009

So installing the drivers, latest X-server, mesa and so on is only part of the puzzle to use the latest Intel graphics drivers. You also need to update your kernel for more features like better kernel memory management, kernel mode switching, and other basic things. The driver can work (for differing levels of working) for older kernels, but the bugfixes tend to be on the latest version. I have tried this on an Intel 945GM.

So this is how you update your kernel for Jaunty (and other Ubuntus would probably work). A really handy repository of kernels is maintained by Ubuntu called Mainline PPA where you can download pretty much any version of the kernel.

So for kernel 2.6.30 you need to download the following file : linux-image-2.6.30-020630-generic_2.6.30-020630_i386.deb
You need to install this by calling:

sudo dpkg -i linux-image-2.6.30-020630-generic_2.6.30-020630_i386.deb

As part of the install it should have run update-grub. If not run sudo update-grub

To get kernel modesetting working as well as fixing a couple of minor issues you need to edit the file /boot/grub/menu.lst for some extra parameters. You need to edit the line that looks like:

kernel      /vmlinuz-2.6.30-020630-generic root=/dev/sda7 ro

And add the following between “generic” and “root”:

nopat enable_mtrr_cleanup i915.modeset=1

The first two sort out some hardware bugs on the Intel 945 depending on the hardware platform which can vary. Acer Aspire Ones don’t necessarily have the same mtrr bugs as MSI Winds and so on. The modeset parameter switches on kernel modesetting which you will hopefully not notice many changes with.

I did find kernel modesetting played a lot better running X without any monitor connected and dealt with a lot of odd mode issues.

Share:
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • description
  • Reddit
  • Slashdot
  • StumbleUpon

Garry Bodsworth

How to install the latest Intel drivers on Ubuntu

June 20th, 2009

This is a fairly painless process to get the latest and greatest drivers for Intel integrated graphics (like the 945GM). Since it is on the more or less bleeding edge of development there can be some issues, but personally I tend to see more issues with outdated drivers than running the latest.

There reason that this process is so simple on Ubuntu is that some nice and clever people have packaged it all up on xorg-edgers. The instructions here are for Ubuntu Jaunty 9.04.

There are some commandline incantations to make and some text files to edit.

Create a file /etc/apt/sources.list.d/xorg-edgers.list that contains the following text:

deb http://ppa.launchpad.net/xorg-edgers/ppa/ubuntu jaunty main
deb-src http://ppa.launchpad.net/xorg-edgers/ppa/ubuntu jaunty main

Now execute the following commands:

sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0x165d673674a995b3e64bf0cf4f191a5a8844c542
sudo apt-get update
sudo apt-get upgrade

Now you should have pulled in the latest Intel drivers and related dependencies. You might have also updated other packages on your system if you are not fully up to date with your software – don’t worry this should be fine. If you reboot now your system should use these latest drivers with some spiffing UXA acceleration…. but that is not all.

There are some stability issues if you are using a 945 based card, so you need some minor configuration changes. Run the following commandline:

dpkg-reconfigure xserver-xorg

Now you need to edit your /etc/X11/xorg.conf and edit the device section so it looks a bit like this:

Section "Device"
    Identifier "Configured Video Device"
    Driver "intel"
    Option "Tiling" "false"
    Option "FramebufferCompression" "False"
EndSection

The most important part is to get those two lines containing “Option” which fixes the problems.

If you are using stock Jaunty then you will not have Kernel Mode Setting which provides better mode detection and switching for Linux. This requires a new kernel, but I will blog about that tomorrow.

Share:
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • description
  • Reddit
  • Slashdot
  • StumbleUpon

Garry Bodsworth

Clutter 0.9.4 Released

June 20th, 2009

A new developer snapshot version of Clutter has been released which is part of the journey towards Clutter 1.0. The project is an OpenGL renderer for user interfaces which uses the gobject base system.

The reason I post this though is that I have contributed (terribly minor) patches to this release. Plus also as part of the progress to 1.0 there are some very substantial changes under the hood. There is now a master clock for rendering which should improve rendering quality and smoothness. Also, beware, all units have been removed and it uses floating point values in the API now. There is some cool debugging features in the OpenGL wrapper part of Clutter so performance work can be done more easily.

You can see full release notes here. The snapshot is available from git here.

Now I need to build a deb so I can test this out a little more….

Share:
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • description
  • Reddit
  • Slashdot
  • StumbleUpon

Garry Bodsworth

The Platform Is The Hard Part

June 18th, 2009

Ubuntu is essentially a layer of abstraction on Debian providing additional stability and usability (niceties I would probably call them) in order to make a public release. Even with this additional layer of checking and development work it is targeted at a specific market and platform. It should work on all computers in a manner of speaking, and it is almost impossible to check all hardware combinations, let alone software packages.

Then you use this already abstracted layer as the basis for an even more specific “distribution”…. When you can limit your hardware targets, you then have to make sure the software is really performant and solid on it.

As the problems become smaller in the grand scheme of things, progress fixing them takes longer, seeming to almost grind to a halt. It also depends on the software you use which uncover bugs in seemingly unrelated libraries, drivers and processes. I’ve been encountering a lot of these, but this is the wonder of open-source. Solving all of these problems was possible with enough graft because all of the elements were available. This means identifying and communicating with the right communities, and then if you have any fixes getting your changes upstream into their repositories. The problem is though you still have to maintain your own patches because of the trickle down between distributions can take a very long time, and good changes rarely make it into already released software because of the big-bang big-release mentatility. As I have played more I find myself wishing for a rolling release distro…

But once you have your shiny platform all in place – how do you keep it up to date. You always find in the pursuit of getting it functioning you have to update manually….

Share:
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • description
  • Reddit
  • Slashdot
  • StumbleUpon

Garry Bodsworth

EFL Webkit 0.1 Released

June 17th, 2009

The first version of Webkit for EFL has been released. I’ve been tracking the project for quite a while and it’ll be good to try it out again.

It has support for all the usual features for webkit and also now has plugin support for Flash. There is also a prototype browser called EVE. Internally it uses Cairo for the rendering and libcurl for the networking.

One of the things I really wanted to get round to ding at some point is trying out binding enlightenment (more specifically EFL) to a 3D surface in Clutter, because EFL is really good at 2D (and has plenty of backends) and Clutter is really good at 3D.

Share:
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • description
  • Reddit
  • Slashdot
  • StumbleUpon

Garry Bodsworth

XBMC + MythTV

June 14th, 2009

If you want to watch TV from your XBMC you can use mythbox to use your XBMC installation as a frontend for MythTV.

What this does is allows you to watch live and time-shifted television as well as schedule recordings. MythTV is a bit of a pain to set up but once the backend is fully configured then you shouldn’t need to touch it. The best part for me was the web interface for scheduling recordings because it can show much more information than a TV interface would normally allow.

The quality of the XBMC frontend is much better than the default one that comes with MythTV (which I found counter-intuitive and lacking). The UI for mythbox integrates perfectly and formats everything professionally. The screenshots are pretty representative of what you get. There have been a few more beta releases since the one I used but even for pre-release software I found it good enough to use every day.

I used this combination for a while, and the only thing lacking for me was the hardware. Otherwise the experience was extremely good. Also don’t forget if you have nVidia graphics then you get VDPAU acceleration which meant my CPU was not really going much higher than 20%.

Share:
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • description
  • Reddit
  • Slashdot
  • StumbleUpon

Garry Bodsworth

Cluttered Mind

June 13th, 2009

Finally, I have contributed something back to an open-source project.

The memory leak in Clutter I mentioned in a previous post has been fixed. I submitted the patches last week, and they got pushed onto master in time for Clutter 1.0.

I’ve been playing around with Clutter a bit more now and it is well inside the GTK+ comfort zone. I am really pleased I can contribute something useful to a project of this size because I am so used to using libraries but not actually fixing them. It’s the glory of open-source.

I’ve been playing around a little with Clutter 1.0 and its master clock based animation and it looks really interesting. Just be careful that some parameters are floats instead of ints now and this caused me to segfault.

Share:
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • description
  • Reddit
  • Slashdot
  • StumbleUpon

Garry Bodsworth