diff --git a/src/systeminfo/linux/qsysteminfo_linux.cpp b/src/systeminfo/linux/qsysteminfo_linux.cpp
index f3bcf4b..0933089 100644
--- a/src/systeminfo/linux/qsysteminfo_linux.cpp
+++ b/src/systeminfo/linux/qsysteminfo_linux.cpp
@@ -404,41 +404,6 @@ QSystemDisplayInfoPrivate::~QSystemDisplayInfoPrivate()
 {
 }
 
-QSystemDisplayInfo::DisplayOrientation QSystemDisplayInfoPrivate::orientation(int screen)
-{
-    QSystemDisplayInfo::DisplayOrientation orientation = QSystemDisplayInfo::Unknown;
-#if defined(Q_WS_X11)
-    XRRScreenConfiguration *sc;
-    Rotation cur_rotation;
-    sc = XRRGetScreenInfo(QX11Info::display(), RootWindow(QX11Info::display(), screen));
-    if (!sc) {
-        return orientation;
-    }
-    XRRConfigRotations(sc, &cur_rotation);
-
-    if(screen < 16 && screen > -1) {
-        switch(cur_rotation) {
-        case RR_Rotate_0:
-            orientation = QSystemDisplayInfo::Landscape;
-            break;
-        case RR_Rotate_90:
-            orientation = QSystemDisplayInfo::Portrait;
-            break;
-        case RR_Rotate_180:
-            orientation = QSystemDisplayInfo::InvertedLandscape;
-            break;
-        case RR_Rotate_270:
-            orientation = QSystemDisplayInfo::InvertedPortrait;
-            break;
-        };
-    }
-#else
-Q_UNUSED(screen)
-#endif
-    return orientation;
-}
-
-
 float QSystemDisplayInfoPrivate::contrast(int screen)
 {
     Q_UNUSED(screen);
diff --git a/src/systeminfo/linux/qsysteminfo_linux_common.cpp b/src/systeminfo/linux/qsysteminfo_linux_common.cpp
index 9e5f6e9..ebb6953 100644
--- a/src/systeminfo/linux/qsysteminfo_linux_common.cpp
+++ b/src/systeminfo/linux/qsysteminfo_linux_common.cpp
@@ -70,13 +70,11 @@
 #include <mntent.h>
 #include <sys/stat.h>
 
-#if !defined(Q_WS_MAEMO_6) && !defined(Q_WS_MEEGO)
 #ifdef Q_WS_X11
 #include <QX11Info>
 #include <X11/Xlib.h>
 #include <X11/extensions/Xrandr.h>
 #endif
-#endif
 
 #if defined(BLKID_SUPPORTED)
 #include <blkid/blkid.h>
@@ -1807,6 +1805,40 @@ QSystemDisplayInfo::BacklightState  QSystemDisplayInfoLinuxCommonPrivate::backli
     return QSystemDisplayInfo::BacklightStateUnknown;
 }
 
+QSystemDisplayInfo::DisplayOrientation QSystemDisplayInfoLinuxCommonPrivate::orientation(int screen)
+{
+    QSystemDisplayInfo::DisplayOrientation orientation = QSystemDisplayInfo::Unknown;
+#if defined(Q_WS_X11)
+    XRRScreenConfiguration *sc;
+    Rotation cur_rotation;
+    sc = XRRGetScreenInfo(QX11Info::display(), RootWindow(QX11Info::display(), screen));
+    if (!sc) {
+        return orientation;
+    }
+    XRRConfigRotations(sc, &cur_rotation);
+
+    if(screen < 16 && screen > -1) {
+        switch(cur_rotation) {
+        case RR_Rotate_0:
+            orientation = QSystemDisplayInfo::Landscape;
+            break;
+        case RR_Rotate_90:
+            orientation = QSystemDisplayInfo::Portrait;
+            break;
+        case RR_Rotate_180:
+            orientation = QSystemDisplayInfo::InvertedLandscape;
+            break;
+        case RR_Rotate_270:
+            orientation = QSystemDisplayInfo::InvertedPortrait;
+            break;
+        };
+    }
+#else
+Q_UNUSED(screen)
+#endif
+    return orientation;
+}
+
 int QSystemDisplayInfoLinuxCommonPrivate::physicalHeight(int screen)
 {
     QString frameBufferDevicePath = QString("/dev/fb%1").arg(screen);
diff --git a/src/systeminfo/linux/qsysteminfo_linux_common_p.h b/src/systeminfo/linux/qsysteminfo_linux_common_p.h
index 3a9b44b..67a4a3f 100644
--- a/src/systeminfo/linux/qsysteminfo_linux_common_p.h
+++ b/src/systeminfo/linux/qsysteminfo_linux_common_p.h
@@ -223,8 +223,7 @@ public:
     int displayBrightness(int screen);
     int colorDepth(int screen);
 
-
-    QSystemDisplayInfo::DisplayOrientation getOrientation(int /*screen*/) {return QSystemDisplayInfo::Unknown;};
+    QSystemDisplayInfo::DisplayOrientation orientation(int screen);
     float contrast(int /*screen*/) {return 0.0;};
     int getDPIWidth(int /*screen*/){return 0;};
     int getDPIHeight(int /*screen*/){return 0;};
diff --git a/src/systeminfo/linux/qsysteminfo_linux_p.h b/src/systeminfo/linux/qsysteminfo_linux_p.h
index 847ffbc..9d5aaf4 100644
--- a/src/systeminfo/linux/qsysteminfo_linux_p.h
+++ b/src/systeminfo/linux/qsysteminfo_linux_p.h
@@ -147,7 +147,6 @@ class QSystemDisplayInfoPrivate : public QSystemDisplayInfoLinuxCommonPrivate
     Q_OBJECT
 
 public:
-    QSystemDisplayInfo::DisplayOrientation orientation(int screen);
     float contrast(int screen);
     int getDPIWidth(int screen);
     int getDPIHeight(int screen);
diff --git a/src/systeminfo/qsysteminfo_maemo.cpp b/src/systeminfo/qsysteminfo_maemo.cpp
index f423469..6831dec 100644
--- a/src/systeminfo/qsysteminfo_maemo.cpp
+++ b/src/systeminfo/qsysteminfo_maemo.cpp
@@ -1008,37 +1008,6 @@ int QSystemDisplayInfoPrivate::displayBrightness(int screen)
     return -1;
 }
 
-QSystemDisplayInfo::DisplayOrientation QSystemDisplayInfoPrivate::getOrientation(int screen)
-{
-    Q_UNUSED(screen)
-    QSystemDisplayInfo::DisplayOrientation orientation = QSystemDisplayInfo::Unknown;
-
-#if !defined(QT_NO_DBUS)
-    QDBusMessage reply = QDBusConnection::systemBus().call(
-                             QDBusMessage::createMethodCall("com.nokia.SensorService", "/org/maemo/contextkit/Screen/TopEdge",
-                                                            "org.maemo.contextkit.Property", "Get"));
-    if (reply.type() != QDBusMessage::ErrorMessage) {
-        QList<QVariant> args;
-        qvariant_cast<QDBusArgument>(reply.arguments().at(0)) >> args;
-        if (args.count() == 0) {
-            return orientation;
-        }
-        QString nativeOrientation = args.at(0).toString();
-        if (nativeOrientation == "top") {
-            orientation = QSystemDisplayInfo::Landscape;
-        } else if (nativeOrientation == "left") {
-            orientation = QSystemDisplayInfo::Portrait;
-        } else if (nativeOrientation == "bottom") {
-            orientation = QSystemDisplayInfo::InvertedLandscape;
-        } else if (nativeOrientation == "right") {
-            orientation = QSystemDisplayInfo::InvertedPortrait;
-        }
-    }
-#endif
-    return orientation;
-}
-
-
 float QSystemDisplayInfoPrivate::contrast(int screen)
 {
     Q_UNUSED(screen);
diff --git a/src/systeminfo/qsysteminfo_maemo_p.h b/src/systeminfo/qsysteminfo_maemo_p.h
index f1ba4d7..9b367ae 100644
--- a/src/systeminfo/qsysteminfo_maemo_p.h
+++ b/src/systeminfo/qsysteminfo_maemo_p.h
@@ -212,7 +212,6 @@ public:
 
     QSystemDisplayInfoPrivate(QSystemDisplayInfoLinuxCommonPrivate *parent = 0);
     virtual ~QSystemDisplayInfoPrivate();
-    QSystemDisplayInfo::DisplayOrientation orientation(int screen);
     float contrast(int screen);
     int getDPIWidth(int screen);
     int getDPIHeight(int screen);
diff --git a/src/systeminfo/systeminfo.pro b/src/systeminfo/systeminfo.pro
index d48cff7..8eedec9 100644
--- a/src/systeminfo/systeminfo.pro
+++ b/src/systeminfo/systeminfo.pro
@@ -76,10 +76,11 @@ unix:!simulator {
             DEFINES += BLKID_SUPPORTED
             LIBS += -lblkid
         }
+
+        LIBS +=  -lX11 -lXrandr
     }
 
     !maemo5:!maemo6:linux-*: {
-            LIBS +=  -lX11 -lXrandr
             SOURCES += linux/qsysteminfo_linux.cpp
             HEADERS += linux/qsysteminfo_linux_p.h
             contains(QT_CONFIG,dbus): {
