Pages

Thursday, September 29, 2011

DisplayLink: Just something I wanted to share. The problem with current 'modern' laptops can be, that they don't provide a VGA port, which is often required to connect beamers (the reason why I needed one of those adapters).
One way to to solve this, is to use some DisplayLink adapter, which allows to connect display via USB.

Use dmesg to find out about the assigned framebuffer-device (fb).
Now the driver is available and the appropriate kernel module loaded but you still need to dump the following file into /etc/X11/xorg.conf.d/

vgaswitcheroo: Well, I didn't find out much more on the vgaswitcheroo side. I didn't find a way to determin if a monitor is connected to the discrete card, when this card is turned of (it seems that on some setups the integrated card get's "infos" about monitors connected to the discrete card, but not on mine). But I wont continue to poll for a monitor on the discrete card, so I'll just provide some trayicon (or how i's called in the shell slang), which enables the user to switch between the cards.

Wednesday, September 28, 2011

I got my hands on a Lenovo x121e (5051) - an AMD Fusion E-350 powered laptop. So how does Fedora 16 Alpha 15 on that device?

Reasons? Much new things to test: EFI, AMD Fusion E-350, HDMI + VGA. And a quite low price tag at about € 360.
Like Fedora somewhat on the bleeding edge.

What works? Everything I tested so far. Wireless (Atheros), Graphics (ATI Radeon), Harddrive, USB, ...
And all those shiny things worked out of the box (!). No manual intervention needed, so a silent a cautious A+.

What doesn't? I just noticed some graphics glitches in gnome-shell, but maybe those will get fixed until the final release.

EFI: I could boot into Fedora 16 Alpha Live Desktop using the legacy fallback. EFI seems to work, but there are currently issues booting Fedora 16 with EFI, so I went back and use Fedora 15 updates-testing booted via EFI and BTRFS partitions.

Monday, September 26, 2011

I always wondered but never really looked up how backing files can be used with qemu. I came back to this when stumbling across the curlbackend which brings http and ftp support to qemu and landed in fedora recently.
The idea is basically to use some master image accessed via http, e.g. residing in some objectstore, as a backing file for the actual image. This is a quite flexible setup. No need for iscsi or so.
Oh yes, the thing about a backing file is that all reads are happening on the backing file, until a block is written (also know as cow [copy on write]).

It turned out that the magic is happening while creating an image, not when running it:

Sadly we can't test this on stock Fedora, as curl is enabled but currently broken in qemu. Maybe this ain't a bug at all or the bug is already fixed upstream (there are some fresh changes to curl), so this can be tested at some near point in the future.
It is also to note, that backing files also integrates well with libvirt.

Friday, September 23, 2011

While working on gswitcheroo I needed a reliable way to determine if a monitor get's connected to the HDMI port of the discrete card.
But monitoring the HDMI port when the corresponding discrete card is powered off, doesn't seem to work.
A temporary solution is to power on the discrete card once and again, to see if a some monitor got connected.
airlied point out, that maybe the integrated card is able to detect connected monitors. But in the first trial it didn't really work.

What also didn't work, was monitoring status changes of the discrete (radeon) card using udev (using udevadm monitor). Time for more investigations.

Monday, September 19, 2011

Tonight I had a bit of time and got gswitcheroo in a usable state.
gswitcherd is launched by systemd and gswitcher is launched gnome-session-manager. All fine.

If gswitcherd detects a connected HDMI port on boot it tries to turn on the discrete card (effectively turning off the integrated). Sadly there is currently a bug (or so) in vgaswitcheroo which prevents the successful switching from one to another card between plymouth and gdm. Maybe this will be fixed at some point - or not be needed at all ...

Another problem is about looking up the HDMI status (to automagically detect what card to use). This is just possible if the discrete card is powered on, but this ain't the case when we are using the integrated card. The current solution is to power on the discrete card once and again, to determine the HDMI status.

Beside all problems gswitcher will notify you about a freshly connected monitor and will ask you to log out (and back in).

Monday, September 12, 2011

I'm working on a small library/daemo/client which wrap some functionallity of vgaswitcheroo, a small kernel feature to handle hybrid graphic setups found in some laptops.

The main intention is to allow the user to switch to the required card
Sometimes this switch is required, because just one of the cards is connected to the external output of the laptop - which can be used to connect a beamer.

Friday, September 9, 2011

To test out the EFI support of some distributions (especially Fedora), I tried to get qemu-kvm to use provide an EFI interface. This can be achieved by calling qemu with the -L switch, to use an alternate EFi bios file (like the one from tianocore: OVMF), instead of the default bios.

To get qemu-kvm up and running, try the following on a recent Fedora 15 setup:

Wednesday, September 7, 2011

GObject based libraries can be called - thanks GObject introspection - quite easy from javascript (as well as e.g. python).
As vala builds on gobject, all code generated by vala can be introspected - when compiled with a fine selection of compiler switches.
Let's pretend that we have got a small library written in vala and want to use it from gjs - maybe because the that library is wrapping another non-gobject library or doing some heavy calculations.

To build a introspectable library a good practice is, to just use valac to generate the appropriate c-code and handle the build manually - or by using some build system.
When invoking valac it is important to pass the two both of switches --library and --gir. It is also important to specify the GIR name (--gir) in the format NAME-VERSION.gir whereas the library (--library) name expects just NAME-VERSION.

Build
Up to now it's just theory. The following lines guide you trough this process, step by step (testShared.vala is taken from here):

Done. We managed to call a library function from gjs using GObject introspection. The creation of the (important) typelib should be included in you favorite build tools, one example using cmake can be found (again) here.

Oone final reminder: Not just vala code can be imported, but all gobject based libraries (e.g. libgtop2 for system informations, clutter for fancy UIs and more)

Elementary OS always caught or users attention because of it's design principles, which lead to a very aesthetic appearance (including the gtk elementary theme) and some very nice applications like postler.

Anyhow, this time it got my attention because it's favored programming language seems to be vala. Surprise :)

A part of this effort is also to improve the programming experience by providing an - in loose words - integrated development environment - an editor (scratch + vala plugin) and build system (cmake). Nice.