You could try the rotation using X instead of setting it in
config.txt. I don't promise it will fix your issue, but it seems to work fine here for me (I did not compare it to the
config.txt method, however). I believe these are two pretty distinct mechanisms.
The Xorg server on the Pi uses a generic framebuffer driver,
fbdev. Note that this was not written specifically for it and should be available in any GNU/Linux ARM distro.1
A limitation of that driver is that it cannot do a dynamic rotation; normally something like
xrandr --output default --rotate left could be used to rotate the screen with the server running, but this will fail on the Pi because the fbdev driver can't do that.
However, you can configure a static rotation. I created the following as
/etc/X11/conf.d/rpi.conf (this directory does not exist by default on Raspbian, but you can create it, and the file, as root):
Option "rotate" "CCW" # As in, counter clockwise
This is pretty minimal and derived from a hint here and my reading of
man xorg.conf. You don't have to use it exactly as is, the key part is the
Option "rotate" line in
Section "Device". The possibilities are:
- "CCW", Counter clockwise aka. left
- "CW", Clockwise, aka. right
- "UD", Upside down.
If it does not work, shut X down and have a look at
/var/log/Xorg.0/log. If you left the
Identifiers the same there should be a bit in there like:
[158797.529] (==) ServerLayout "slayo1"
[158797.529] (**) |-->Screen "screen1" (0)
[158797.529] (**) | |-->Monitor "generic"
[158797.532] (**) | |-->Device "RpiFB"
Using config directory: "/etc/X11/xorg.conf.d". If that's not there, the problem is your configuration wasn't read (but there's no reason it shouldn't be on a stock system, see
man xorg.conf again). If it is, keep reading down the log -- Xorg should report your typos/errors.
1. The driver does identify the hardware (
BCM2708 FB (video memory: 600kB), or
4050kB on the Pi 2) but it will do this on, e.g., a general purpose Fedora ARM distro that includes no pi specific software. I'm mentioning this to make it clear there is nothing special about the Raspbian Xorg driver and any documentation you find around for the
fbdev driver, pi oriented or not, should be applicable; witness "the hint" I found about the rotate option was from a blog about DisplayLink devices.