The Great Display Power Saving Debacle
We are supposed to be concerned with our power consumption. After all California has enshrined in law restrictions on the power usage of televisions.
Working for a digital signage company I have to deal with a lot of displays. The initial hardware platform only had VGA output, great, power saving worked using DPMS. The VESA Display Power Management Signaling standard version 1.0 was released in 1993, even since moving from CRTs to the flat screen world we live in nowadays (making some of hsync and vsync options surplus to requirements on new flat screens, but it simply maps to "off"). The monitors people used behaved themselves. The next platform we used briefly had DVI and VGA output and monitors that supported those inputs all adhered to the teenage standard.
But this is where problems now creep in. DVI can be plugged into an HDMI port very easily. The current hardware platform has native HDMI so it is fairly obvious to suggest that customers use this rather than the VGA output that is also available.
This is where I stepped through the looking glass. Apparently because HDMI and DVI are electrically equivalent then there is nothing to stop the manufacturer having DPMS support. I was developing thinking that HDMI would be great for users since they would also get audio transport built into the single cable. I kind of assumed DPMS was still working.
I have yet to find a single display that does respect DPMS. Of course most people want to use cheap consumer televisions so they don't stand a chance of this support.
The most worrying thing I have found about those cheap consumer displays is that they do supply VGA ports that don't even support DPMS. A lot of these displays also have a "feature" to power off after a ten minute (or so) period of inactivity and the only way to power it on is to physically press the power button or the remote, it doesn't even notice when a signal starts again(!)
There are two possible solutions. One is HDMI-CEC, which is Consumer Electronic Control. One or two of the pins (depending on the HDMI version) is essentially a serial port, and this provides the standard for communication on this. This would be good but you need extra chips built into your HDMI output which only one computer has (a Toshiba laptop - and it only works on Windows...). Also the even larger problem is that every manufacturer seems to have their own standard, RegzaLink, SIMPLink, VIERAlink, BRAVIAsync, and a myriad of others. If you buy all your equipment from the same manufacturer you will end up with some benefit.
The other solution at least in the digital signage use is to use the RS232 service port for controlling the display. Each monitor tends to have its own way of doing it and can even vary between model numbers. Also it has been heard from the manufacturers that they will be phasing this out and most new TVs don't even have it.
In summary? Display power saving used to work for most people, now it doesn't. So, it is all well and good reducing the power consumption of the devices but there is a way of removing a lot of power from the equation by switching off the panel when it isn't being used. This was a solved problem that has been unsolved by engineering madness. Because some TVs are unable to wake from their power saving state over any connection I ended up having to add a "power saving" option that doesn't actually save any power....
Europython Blogging
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.
EuroPython 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.
“Boot Error” when booting from USB
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.
Installing The Latest Intel Drivers – The Kernel
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.
How to install the latest Intel drivers on Ubuntu
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.
Clutter 0.9.4 Released
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....
The Platform Is The Hard Part
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....
EFL Webkit 0.1 Released
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.
XBMC + MythTV
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%.