Son O' Tip O' The Day: X rotation

If you followed yesterday's tip o' the day, you'll have your console and your GNOME session rotated...but there's still a piece of the puzzle missing! X doesn't have rotation set, so GDM is sideways. Cue more neck twisting and mouse fumbling. Fret not, though: even this can be solved! It's a moderately-known fact that anything you can do with xrandr, you can do statically in xorg.conf: you have to figure out the syntax, though. I find this page an invaluable crutch in figuring out post-RandR 1.2 xorg.conf syntax, though a few notes on there are a bit out of date now.

Referring to that and man xorg.conf, I came up with this for my system. xorg.conf has been modularized on Fedora and probably other distros in recent releases, so I saved it as /etc/X11/xorg.conf.d/99-screens.conf . I don't think it counts as a full xorg.conf, so it may not work if saved as /etc/X11/xorg.conf.

Section "Device" Identifier "nouveau" Driver "nouveau" Option "Monitor-DVI-I-1" "Right Monitor" Option "Monitor-DVI-I-2" "Left Monitor" EndSection

Section "Monitor" Identifier "Left Monitor" Option "Primary" "True" Option "Rotate" "left" EndSection

Section "Monitor" Identifier "Right Monitor" Option "RightOf" "Left Monitor" Option "Rotate" "left" EndSection

Notes on the above:

The "Identifier" lines are arbitrary - it's just a convenient name you can use to refer to the device in question elsewhere in the config. You can make them whatever you like.

Now, for the "Device" section...

"Driver" is not arbitrary - it specifies the X driver to use for this graphics card. Obviously, enter whatever driver you actually use here. (I haven't tested if X will auto-detect it if you leave this line out, or just throw a wobbly.)

"Right Monitor" and "Left Monitor", in the Option lines in the Device section, reflect the names we specify for the two monitors lower down, in the "Monitor" sections' Identifier lines. The "Monitor" sections define monitor configurations. These two Option lines tell X "use these particular monitor configurations for these two physical card outputs".

Monitor-DVI-I-1 and Monitor-DVI-I-2 identify the specific physical card outputs on my computer. You may have to change these for yours. You can figure out what your outputs are named by just running 'xrandr' and looking at the output. You'll see lines like this (depending on how many monitors you have):

DVI-I-2 connected 1080x1920+0+0 left (normal left inverted right x axis y axis) 475mm x 267mm DVI-I-1 connected 1080x1920+1080+0 left (normal left inverted right x axis y axis) 475mm x 267mm

They tell you the names of your outputs - for me, DVI-I-1 and DVI-I-2. Prefix Monitor- to these, for use in xorg.conf. So I wind up with Monitor-DVI-I-1 and Monitor-DVI-I-2.

So, with this "Device" section, we tell X what driver to use, and to use the monitor definitions we call "Left Monitor" and "Right Monitor" for two specific physical outputs.

The two "Monitor" sections specify the actual configuration for these two monitors. As discussed above, the Identifier lines give a name to these configurations, and must match with the Option lines in the Display section.

The only Option line that's actually necessary for rotation is:

Option "Rotate" "left"

So if all you care about is the rotation, you could just have a section like this:

Section "Monitor" Identifier "Left Monitor" Option "Rotate" "left" EndSection

and it'd work fine. The extra lines in my config specify which monitor is primary (GDM will display on that monitor, and if you don't override it within the desktop configuration, it'll be the primary monitor for whatever desktop you're using, so the panel will probably appear on it), and specify the layout of the monitors.

Like the numeric value for fbcon, the keyword in the Option "Rotate" lines depends on which way you rotated your monitors. Try both "left" and "right" and see which one's correct for you.

So now the output is rotated consistently throughout startup (once fbcon module is loaded, anyway), GDM, and GNOME for me. Yay. I haven't figured out if it's possible to rotate the bootloader menu and/or BIOS screens yet.

Tip o' the day: console rotation

So, you see the light and set up your dual monitors in portrait orientation, rather than landscape. Then GNOME explodes, and you're stuck at a console trying to fix it with your neck rotated 90 degrees...

Never fear! fbcon to the rescue. fbcon is compiled into Fedora kernels, and happily, one of fbcon's abilities is that it can rotate consoles. So, add this to the kernel parameters in /etc/grub.conf:


or possibly:


it depends on which way you rotated your displays. Reboot, and rejoice as you no longer have to perform contortions to read your consoles.

You can adjust the setting on the fly by echoing the desired number to /sys/class/graphics/fbcon/rotate_all : this is a good way to test whether you need 1 or 3.

Neat Firefox 5 feature

My favourite Firefox 5 feature so far: the handling of tab resizing when you're closing tabs. It doesn't resize the remaining tabs until you move the mouse out of the tab bar - so if you're just closing a bunch of tabs sequentially, the X doesn't move out from under your cursor when the tabs resize, unless you signal that you're done by moving the mouse away. Awesome!

Excitement time again

Yup, it's that time again: I updated my system to Rawhide today. F15's just too boring and stable!

When I first tried to do the upgrade there were significant dependency issues with totem-pl-parser and gjs, so I fixed those up - they both turned out to be simply changes and rebuilds that had been done on the Fedora 15 branch but not in Rawhide, so they were easy to fix. After that the upgrade went pretty flawlessly, but the upgraded system was pretty busted: gdm didn't work, and if I bypassed it, neither did GNOME. And there seemed to be some odd bug causing the whole system to fall over.

A morning's poking later and I've mostly fixed things up. GDM is broken, but LXDM works for now. I found that GNOME fallback mode worked, but gnome-settings-daemon wasn't running. I managed to fix Shell by rebuilding it with the latest fixes from the Fedora 15 branch, same as gjs. I figured out the gnome-settings-daemon problem was down to bad SELinux labels on files in ~/.local/share/icc - use restorecon to fix them if you have the same problem. And I figured out the mysterious whole-system-crashy problem, or at least figured out exactly what the problem is, though I can't fix it: trying to mount the CIFS share from my NAS box immediately makes the system fall over. So if I can just get that one fixed, Rawhide will be in decent shape for me.

Hubba hubba - N9 / N950

So, boy, was I right - Nokia just announced the N9 and the N950 (as a developer-only device). Holy crap, at last. I'll take one of each!

The processor isn't anything special - the current crop of dual-cores from NVIDIA, Qualcomm and Samsung kick it into a cocked hat, really - but the rest of the specs, especially on the N9, are great - that camera looks amazing. But the N950 has the keyboard. I've applied for an N950, I really hope Nokia give me one...

N900 successor announced Tuesday?

Just a heads-up for anyone desperately clinging on to their N900 but looking at all these whizzy dual-core, super screened new Android phones coming out lately with envy...there's a reasonably solid rumor that Nokia is finally going to announce the 'N950' (or whatever the N900-successor-and-sole-Nokia-Meego-phone turns out to be called) on Tuesday. Then at least we'd have some solid ground from which to decide whether to wait for it or just throw in the towel and let Google borg us...

(inside tips from Nokians welcome, c'mon, we're dying out here.)

I hate routers

Oh boy, do I.

Was having stupid problems this morning sshing between systems and decided to blame my router (Linksys WRT-310N) and its firmware (a scarily new dd-wrt build for all the recent IPv6 faffing). So I thought, sod it, I'm buying another - the 310N has always been a bit flaky anyway, and it's always given me very poor wireless speeds, nowhere near 802.11n levels.

So, out I go and pick up a D-Link DIR-825. I make a first attempt at setting it up and find that its DHCP reserved lease feature doesn't accept that there can possibly be MAC addresses that don't start with 00 - d'oh. I find an updated firmware that fixes this, set that up, and this time all seems fine and worky. I test the wireless connection - glorious! Over 2.4GHz I get 6-7MB/sec (byte, not bit) and over 5GHz I get over 10MB/sec. With the old router and firmware I couldn't get past 2MB/sec.

So I'm happy as a lamb until I notice my mail isn't working. Then I try browsing to my own site - this one - and it fails. But it works from my phone. Oh, crap: this means NAT loopback isn't working, and this is a major problem for me: I need to set my laptop (and other mobile devices) to use addresses for all mail and web stuff so that they will work when I'm outside my local network. If the router can't do NAT loopback, this means I can't use addresses from inside the local network. Crap.

So...back to good old dd-wrt, which does have NAT loopback. (Except there's a bug if you're using pretty recent dd-wrt builds: see for the workaround). I flash to dd-wrt, reset everything again (which takes a while - 12 static DHCP leases, and another dozen port redirects...), and it all works...test the wireless speed, and I'm back down to 2MB/sec.

Le sigh. So, I get either working NAT redirection or decent wireless performance. Both is apparently out of the question. Plus the dd-wrt page for the DIR-825 says that a sudden decrease in WAN performance after the router's been up for some time is a commonly encountered issue, so I've got that to look forward to!

mjg59, can we line the router engineers and firmware authors up behind the BIOS and EFI people in the lists of people to be put up against a wall come the revolution?

Adventures in IPv6

So I've been trying to crowbar myself into the 1990s (yes, IPv6 is that old) today, using a tunnelbroker tunnel. I spent most of this morning flashing different dd-wrt firmware images to my router, till I found one which both worked with my router (WRT-310N) and had IPv6 support. It seems like you need an Eko std build, and the 310N can't do wireless with a 2.6 kernel build, so I'm on this one. Using the guide on the dd-wrt site with a few tweaks to the script recommended for Tunnelbroker - like actually writing a radvd.conf before trying to access it, and using /tmp instead of /jffs because I don't enable jffs, and changing vlan1 to vlan2 as seems to be correct for my router - it seems to sort of work: at least, the systems on my local network get IPv6 addresses in the range provided by tunnelbroker, marked as Scope:Global, which can ping each other. I couldn't get out to, but I think that's because my ISP's DNS server doesn't do IPv6; I'll try it with OpenDNS later.

All the router rebootin' has knocked over my irc proxy, I think, so I'm not on IRC right now (it could actually be the firewall on that machine, which I turned back on in preparation for IPv6iness, now I come to think of it). I'll be back later. Remember, the IPv6 Test Day is in #fedora-test-day on Freenode!

There is a Canadian ISP which is actually offering native IPv6, experimentally - TekSavvy. This is very cool, and they seem like a cool ISP all around, with clued-up Ts&Cs (like not restricting server use, and I bet they don't block port 25). I'd love to switch to them, but sadly they're a bit slow - 5Mb/s isn't much these days, with Shaw I get 20Mb/s. Still might consider it, especially if Shaw start getting on my ass about bandwidth limits. Either way, I'll try and make IPv6 accessible once I get my head fully around the whole thing, I believe I can set up an IPv6 DNS record with no-ip.

IPv6 Test Day tomorrow (World IPv6 Day)

Sorry for the late notice, but it's been crazy around here lately. We're holding a special, out-of-cycle Test Day tomorrow for World IPv6 Day, focusing on testing Fedora's IPv6 readiness - both in the distribution and on our project sites. You can test with Fedora 15, there's no need to use Rawhide, and there's full test instructions on the Test Day page.

We probably don't need to emphasize the importance of getting ready for IPv6, and that applies to Fedora as much as anyone else, so please come along and help us test! I know IPv6 is a scary topic - it scares me too - but view this as an opportunity to contribute to Fedora while learning about IPv6 in real time from smart cookies who actually know what they're talking about. I know that's what I'm gonna do. See you all tomorrow in #fedora-test-day on Freenode IRC!

System upgrade

As my last post may have hinted, I've made a few changes to my system lately. Just before a very busy weekend, with impeccable timing, the hard disk in my desktop gave out. I've been eyeing an upgrade for it for a while, and was hoping to hold out until the wider range of new-gen Intel CPUs comes out later this year, but this was too good a sign to ignore. So, I went out and spent a bit of money:

Asus P8P67 Deluxe motherboard G.SKILL Ripjaws-X F3-12800CL9D-8GBXL x2 = 16GB RAM Intel Core i7 2600K CPU Crucial RealSSD C300 128GB SSD Noctua NH-U12P SE2 heatsink/fan

I originally got a Corsair Force 3 SSD, but there's an ongoing issue with SandForce 2200-based SSDs with recent firmware and Intel P58 motherboards that made it unusable (don't buy the Corsair or OCZ third-gen SSDs for a new P58-based system!), so I went to the Crucial. Crucial actually has a C400 line as well, but they seem to have lower random read speeds than the C300 series, which I didn't like.

The graphics card is still a Geforce 9600 (there's no real need to change this, since I don't play any games on it) and the case and PSU are also unchanged, they're both Antecs, Sonata III and EarthWatts 500W. There's a 500GB hard disk in there in case I need it, and a DVD+-RW drive. Keyboard and mice are my old standbys, a 1990-vintage IBM Model M and a Logitech MX510 respectively.

Today, I replaced my mismatched Acer 20" 1680x1050 displays with two Dell U2211H 22" 1920x1080 IPS displays. I'm running the CPU overclocked to around 4.4GHz via the automatic OC tool in the Asus BIOS. Very very happy with the upgraded system: it's ridiculously fast (boots in 8 seconds and does a complete kernel RPM build in 29 minutes), and the new monitors are fantastic. I still wish someone made desktop displays with a higher pixel density, but no-one really does (there's some very niche ones from years ago, but they're practically impossible to buy). These are the best option you can really get at present.