What is X-Bus?

It’s a personal project I’ve been working on (among other things) since I joined Canonical. It’s a daemon which handles input devices through the XInput protocol. In the future I hope to add support for outputs too.

What’s the purpose of X-Bus?

Its main purpose is to provide developers with a common (and simplified) way to access XInput from languages which have DBus bindings (Python, Ruby, C, C++, Java, Perl, etc.). It is not specific to any desktop environment, even though it uses C++ and QT4 (see below).

Wouldn’t it be nice if we could have KDE, Gnome, Xfce, etc. applications which make use of the same backend with different frontends (as opposed to having different backends and frontends)?

Current features:

  • Exposes XInput (listing/setting properties, catching signals, etc.) through Dbus with a simplified API.
  • Stores the (per-user) current inputs configuration in an XML file and applies it at startup or when requested.
  • Emits signals (through Dbus) when new devices are plugged in or unplugged (so that, for example your client application can refresh its UI to reflect the new situation).
  • Tracks keyboard activity so as to disable your touchpad when you’re typing.

It’s an attempt to combine the features in syndaemon and xinput (the command line tool), from both of which X-Bus borrows code.

3 examples of what X-Bus can be used for:

  • User interfaces to configure touchpads (which is the 1st thing I would like to work on).
  • User interfaces to configure touchscreens whose drivers support XInput (I still need to expose the calibration functions provided by XInput though).
  • Automatic rotation of your touchpad (figuratively speaking) when your screen is rotated (after this is implemented).

Why QT?

Because of its DBus and XML modules and because it’s a pleasure to work with QT in general.

Example: if you add the Q_SCRIPTABLE macro to the function in the header file, this function will be made available in your DBus interface. This applies to signals too. This makes maintenance a lot easier.

In my opinion it would be overkill to use the DBus low-level API and I don’t think the glib (DBus) bindings can offer what I described in the example (feel free to prove me wrong on this). Furthermore I would have to use an external xml module to perform validation and the things that I currently do with the xml file.

Doesn’t it duplicate efforts? Why don’t you work on $INSERT_DAEMON_HERE instead?

Yes, it does (partially) but my point is: can we use $INSERT_DAEMON_HERE on KDE, Gnome, Xfce, etc. ?

Furthermore, if you have a look at X-Bus’ API you’ll see that (currently) there’s very little duplication.

Where’s the code?

Source code (have a look at the examples which are written in Python)
Packages

NOTE: this is just a first release and users won’t benefit from it without a user interface (unless they want to edit the xml file manually).

Posted by admin | July 2, 2009 3:00 pm
Filed under: Planet,QT,Ubuntu
Comments (4) |


It’s been almost a month now since I started working for Canonical. I was hired as a “Sustaining Engineer (System)” in the Foundations team which, in turn, is part of the OEM Services team, whose offices are located in Lexington, Massachussets, USA (I work from home though).

I mainly do work on X.org related stuff (e.g. touchpads, graphics drivers, etc.) in order to solve problems such as the ones that Canonical’s customers report and to develop new things (I hope to be able to blog about my new projects).

I really like this job as it allows me to work on the things I’m passionate about in a very friendly and relaxed work environment. It means a lot to me.

I would like to thank all the people who made this possible, the ones who kept providing me with new challenges in Ubuntu which made me acquire experience that is proving extremely valuable in my job. I would also like to thank all the people who supported me and encouraged me to apply for this job at Canonical, my team mates and team manager(s) who helped me move my first steps at work and to feel at ease and deeply involved in the OEM team, and the impressive amount of people who congratulated me on IRC on my first day of work. It was a warm welcome that I’ll never forget.

It’s an honour to work with you and I hope we can all work together to fix bug #1.

I hope to see you at the next UDS in Barcelona in May.

Posted by admin | March 29, 2009 3:35 pm
Filed under: GNU/Linux,Planet,Ubuntu
Comments (17) |


If you don’t want to use a user interface to change the effect of Ctrl+Alt+Backspace in any flavour of Ubuntu you can follow these steps:

1) Install the “dontzap” package
sudo apt-get install dontzap

2) Open Terminal or Konsole and type:
sudo dontzap --enable
or
sudo dontzap --disable

Where “disable” means that Ctrl+Alt+Backspace restarts the xserver while “enable” means that it won’t.

I’ll post something on the GTK UI when it’s ready.

Posted by admin | January 22, 2009 6:37 pm
Filed under: Planet,Ubuntu,UDS
Comments (26) |


As you might have noticed already, X.org no longer ships with the DontZap option set to False by default i.e. pressing Ctrl+Alt+Backspace won’t restart the xserver any longer. At the UDS we discussed on how to deal with this change and we came to the conclusion that Ubuntu and Kubuntu would deal with this change in different ways. I worked on both the implementations.

This blog post is about the Kubuntu implementation. Click on the thumbnails to see the screenshots in their full size.

1) Install the “dontzap” package (hopefully this step can be skipped in the future):
sudo apt-get install dontzap

2) Launch “systemsettings”
Kde's menu

3) select the “Display” module
Settings panel

4) click on the checkbox which says “Ctrl+Alt+Backspace restarts the xserver” and press the apply button:
Display Module

5) insert your password
Password dialog

And that’s it.

I’ll blog more about the way you can do it in Ubuntu and from the command line.

Posted by admin | 5:39 pm
Filed under: Planet,Ubuntu,UDS
Comments (5) |


After spending a week in Sunnyvale I’m back from the UDS. It was a long trip and I can definitely say out loud that it was a fantastic experience, very hard to put into words, part of which you’ll be able to see in the video-recorded sessions (available soon?).

I gave speeches on 3 projects of mine: Xorg Options Editor, Tablet configuration tool (the project doesn’t have a name yet), Display configuration tool (no name yet). I’ll blog about these projects as soon as I clean up the relevant specs and the wiki pages. It’s been an extremely productive UDS and (in addition to these 3 projects) I think I have already work for Jaunty+1 (and maybe Jaunty+2 too). The feedback I received was really great.

The Silicon Valley is exactly as I expected (if you played GTA San Andreas you know what I mean) and I really liked the place, which is very different from the European towns I visited.

The UDS is all about people (apart from serious development) and I met a lot Ubuntu enthusiasts. I met some old friends and made a lot of new acquaintances. Actually the term “acquaintances” doesn’t do justice to these extremely nice people which therefore I’ll promote to “friends”:

mv acquaintances friends ;)

Having studied Spanish (together with English) at the university, I had a great chance to practice my Spanish with Ara, María and Luis and I also bugged them with some notions of Spanish Linguistics that I learnt. Do you see the irony? An Italian guy who talks to native Spanish speakers about some peculiarities of their own language ;)

I also received a lot of hugs and ended up in the Ubuntu Hall of Fame. I really didn’t expect to see myself on that page, therefore I was very surprised when Bryce showed my picture and the article on his laptop. A lot of people congratulated me on this achievement but all I have to say is simply that it’s the Ubuntu Community that really rocks. I have yet to find another community which makes you feel not only at ease but perfectly integrated, as in a very big family. It’s definitely something you have to experience (at least) once in your life.

I won’t list the names of all the people I met since I really wouldn’t like to flood Ubuntu planet but I would really like to thank them all for being so nice to me and for making this UDS even better than the one in Prague (which I deemed impossible).

A special thanks to Google for hosting the event at the Googleplex (Mountain View). It’s a really cool place and I met Guido Van Rossum (yes, the creator of Python) there. I told him that I started learning programming thanks to Python and he joked about it by replying that he was sorry that his language made me enter the programming world. A very cool guy.

A big thanks to Canonical for sponsoring my travel and to all the people who made this possible.

Posted by admin | December 15, 2008 7:51 pm
Filed under: Planet,Python,Ubuntu,UDS
Comments (4) |


As promised, NVIDIA drivers 71.86.07 and 96.43.09 are now available for testing in Intrepid’s proposed repositories. If you don’t know how to use these repositories you can read the instructions.

Please give feedback here (say something like “driver 96 works for me”, etc.).

There is also a small fix which will solve a problem with diversions for drivers 177 and 173.
Please give feedback here

I have also fixed a bug in nvidia-settings (i.e. NVIDIA’s control panel) which made it segfault when no ServerLayout section is available in the xorg.conf.

Please test the package and give feedback here.

The sooner you test these packages, the sooner they will enter Intrepid’s stable repositories.

Posted by admin | November 3, 2008 12:11 pm
Filed under: Planet,Ubuntu
Comments (40) |


First of all, happy release to you all.

I have noticed that NVIDIA released two beta drivers which work with Intrepid’s X.org and I will make new packages available in the -proposed archives ASAP. In the meantime you might want to see why I recommend you to wait for these packages. Keep an eye this bug report so as to know when these packages are available for testing.

As regards Hardy, I need a plan to backport driver 177 from Intrepid without breaking dist-upgrades and/or the available drivers. I should also update the fglrx driver in my lrm-envy.

Stay tuned.

Posted by admin | October 30, 2008 6:34 pm
Filed under: Planet,Ubuntu
Comments (9) |


EnvyNG:
I have updated envyng-core (2.0) and envyng-qt (2.0) in Intrepid. The GTK interface doesn’t work and even if I managed to solve the problems with GTK and threading I couldn’t upload it since we’re in feature freeze.

The new textual interface and the QT4 interface now rely on python-apt and python-xkit. Thanks to the work I did on the drivers I won’t have to keep the compatibility list updated since it will rely on the same system which we are using for Jockey.

By testing EnvyNG you will (indirectly) help Jockey too since you will test X-Kit and some other features I have worked on for Jockey.

NOTE: if you have this problem please have a look at the suggested solution in the same bug report.

NVIDIA and kernel 2.6.27:
Currently only driver 177.68 seems to work with 2.6.27. I have written a patch for driver 173 too, however I’m experiencing a rather nasty problem.
EDIT: the driver works well with a new patch now

URandR:
as you can see on Bryce’s blog I am now contributing to GNOME’s Monitor Resolution Settings panel. There is still some work to do (in C) and I’m having a lot of fun with it. I find it a great program and I’m focusing on it instead of completing the rewrite of URandR. I’m not saying that URandR is dead but it’s development has stalled.

Stay tuned

Posted by admin | August 28, 2008 2:16 pm
Filed under: Envy,Planet,Ubuntu
Comments (23) |


I have updated the NVIDIA driver 177.67 (still a beta) in Intrepid (a special thanks to Timo Aaltonen who sponsored the upload).

If you still have 2D performance issues, you can have a look at this post (a special thanks to nullack for suggesting this link).

NOTE: this driver won’t be available on Hardy until a final release of the driver is available.

Posted by admin | August 20, 2008 3:27 pm
Filed under: Planet,Ubuntu
Comments (6) |


If you experienced problems with the NVIDIA driver 173.14.09 you might want to give version 173.14.12 a try.

The driver is available on Hardy in the hardy-proposed repository (you will have to install it through EnvyNG, if you haven’t already done so) and should now work with Xen kernels too (thanks to a little trick which I backported from Intrepid).

The name of the package for Intrepid is nvidia-glx-173.

Release Highlights:
Added support for GeForce 8600 GS.
Fixed a problem with missing rendering in OpenGL Workstation Overlays.
Fixed a problem with running some SDL applications and virtual terminal switching.
Fixed a potential crash in nvidia-settings when saving to the X configuration file.
Improved error recovery paths in the case of corruption of the commands sent to the GPU.

Please test the driver (for Hardy) and report your experience with the driver in this bugreport.

NOTE: the driver has been uploaded today but should be available tomorrow.

Posted by admin | August 4, 2008 6:36 pm
Filed under: Envy,Planet,Ubuntu,Uncategorized
Comments (18) |