7

I have a monitor Samsung SyncMaster 943B (connected through DVI) which has a rotatable screen. Monitor Preferences shows "Monitor Unknown" and the correct Resolution but not the Refreshrate and won't allow me to change Rotation from Normal. The Monitor icon on the Panel says "Rotation not supported".

How can I configure the monitor to allow rotation.


Edit I have just discovered that including the following in config.txt achieves the desired rotation, but I would like a more convenient method which doesn't involve editing a file and rebooting. I want to use this to read portrait oriented documents.

display_rotate=3
6

I would like a more convenient method which doesn't involve editing a file and rebooting.

You can't. Well, that's not quite true; you could do it without rebooting but you would have to restart the GUI using a different configuration (see below).

Dynamic rotation in the GUI is normally handled by the Xorg server. Xorg uses a userland driver for the display stacked on top of the kernel one. This can be tailored to the hardware but in the case of the Raspberry Pi it currently is not (and perhaps there would be no advantage to doing so); a generic framebuffer driver, fbdev, is used.

As a consequence of this, you are subject to the limitations of the fbdev driver, which does not allow for dynamic rotation. It does, however, allow for static rotation as described here. This is a method distinct from using config.txt; I would guess that using config.txt would perform better because the rotation is performed in hardware, whereas with the Xorg methodology presumably it is not (but again, this is just a guess). However, as per that question some people have had issues with display_rotate=3; other people have hinted this may be an easily correctable firmware issue. In any case you are free to try either one (trying both would rotate the screen several times).

If you want to keep an alternate configuration, create one as per the linked answer and put it in a new directory in /etc/X11, e.g.alt_config, call it rotate.conf and:

startx -- -config alt_config/rotate.conf

See man startx and man xorg for an explanation of how that works.

  • I have tried rotate.conf, which works, but leaves a part of console on screen. I am still trying, but I guess the reboot is OK for now. – Milliways Nov 8 '15 at 1:03
0

I had implemented a kludge which worked, but it required continual updating a couple of files. I have written a script, which makes the change easier. It works on Raspbian and Ubuntu MATE.

If display_rotate is not already present you should edit /boot/config.txt to include display_rotate=3 and it can then be toggled with the following script.

#!/bin/bash
# script to rotate display
# 2017-02-18

# copy sed script to a temporary file
cat << EOF > /tmp/sedscr
/^.?display_rotate/{
    s/=0/=3/
    s/^(.)/#\1/
    s/^##//
}
EOF

# locate any display_rotate command and toggle its effect
sed -r -f /tmp/sedscr /boot/config.txt >/tmp/config.txt
# copy temporary file to /boot directory and reboot
sudo cp /tmp/config.txt /boot/config.txt
sudo reboot

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.