Tuesday, October 05, 2010

Many Roads Lead to Rome, Not All Will Truly Take You There

Ubuntu Lucid, which uses Gnome 2.30, has several ways to set display rotation, all (?) invokes RandR. Two of them have been making me confused for several weeks. Let's start with monitor icon on gnome panel.


If you left-click that icon, depends on how many displays were detected by system, it will give you a pulldown menu with choices to rotate display: Normal, Left, Right, or Upside Down. At the bottom, there is another menu item named "Configure Display Settings ...", which will open a much more complete dialog to set display properties.

This dialog also has a very similar pulldown menu to set rotation: Normal, Left, Right, or Upside Down. Naturally we think that those two pulldown menus points to the same function/code, since both were accessed from the same icon. Wrong! Those two menus are from different packages: gnome-settings-daemon and gnome-control-center. More importantly, setting rotation from this dialog works, while from initial pulldown menu doesn't.

There is another surprise: after clicking Apply, there is another confirmation dialog, which you won't find anywhere in gnome-control-center, because it is also in gnome-settings-daemon. All these part splitting has given me much headache while trying to investigate this bug, and when I tried to complete translation.

But now I'm happy because I can complete translation on both packages. What about the bug? I think this is a challenge I will try to dig deeper by comparing gcc's rotation handling code with gsd's one (I'm still looking for proper section to review).

Update (20101005-20:00): on fresh boot, both rotation control works. weird!