guysoft / MagicMirrorOS

MagicMirrorOS out-of-the-box distro
GNU General Public License v3.0
236 stars 27 forks source link

Screen Rotation #16

Open nighthawk156 opened 4 years ago

nighthawk156 commented 4 years ago

Hello,

Been running MagicMirror for some time now. Just reinstalled it on my Pi with the MagicMirrorOS option this time. How can I rotate the display?

guysoft commented 4 years ago

How did you rotate it up until now? (Not a user but help @khassel maintain, that info might help)

nighthawk156 commented 4 years ago

In the past i have used the the /boot/config.txt method. I have tried both method in the link below with this version. I didnt know if i needed to do something in Docker.

https://github.com/MichMich/MagicMirror/wiki/Configuring-the-Raspberry-Pi

khassel commented 4 years ago

I think this has nothing todo with docker. Can reproduce this, if I set display_hdmi_rotate=1 or display_rotate=1 no rotation.

I disabled the docker stuff and the login screen of X11 is also not rotated. So I think this is related to the OS stuff @guysoft .

nighthawk156 commented 4 years ago

Well I am glad to hear it is not just me. Let me know if you need anything from me or want me to test something.

nighthawk156 commented 4 years ago

Any further updates?

macskay commented 4 years ago

Having the same problems. There is a rotate.sh but I can't seem to run it, since I can't get into a bash directly only via ssh but then of course the $DISPLAY is not set.

macskay commented 4 years ago

Got it working! I checked out the .xsession-errorlogs and it tried to execute bash ./rotate.sh which it can't find since the rotate.sh is placed inside the scripts directory. What I did is the following to rotate my screen:

  1. SSH onto pi that has the screen attached to it
    pi@magicmirroros:~ $ export DISPLAY=:0
    pi@magicmirroros:~ $ xrandr
    Screen 0: minimum 320 x 200, current 1680 x 1050, maximum 2048 x 2048
    HDMI-1 connected primary 1680x1050+0+0 (normal left inverted right x axis y axis) 473mm x 296mm
    1680x1050     59.95*+
    1920x1080     60.00    59.94
    1280x1024     75.02    60.02
    1440x900      59.90
    1280x960      60.00
    1152x864      75.00
    1280x720      60.00    59.94
    1024x768      75.03    70.07    60.00
    832x624       74.55
    800x600       72.19    75.00    60.32    56.25
    720x480       60.00    59.94    59.94
    640x480       75.00    72.81    66.67    60.00    59.94
    720x400       70.08
    Composite-1 unknown connection (normal left inverted right x axis y axis)
    720x480       62.69
    pi@magicmirroros:~ $ bash scripts/rotate.sh left
    scripts/rotate.sh: line 18: xinput: command not found

    I printed the xrandr output to make sure the ssh session finds the connected monitor. Beware: it states, that xinput can not be found but for me that doesn't matter the screen rotates regardless

See the attached files for prove

photo5440758188984086283 photo5440758188984086284

nighthawk156 commented 4 years ago

Thanks, that worked for me also. Any ideas what the best way to keep it rotated after a reboot?

flothjl commented 4 years ago

I was able to solve this by updating the lightdm config. This thread has information. https://github.com/MichMich/MagicMirror/issues/1473

me2youall commented 3 years ago

I was able to solve this by updating the lightdm config. This thread has information. MichMich/MagicMirror#1473

Care to share @flothjl ?

flothjl commented 3 years ago

I was able to solve this by updating the lightdm config. This thread has information. MichMich/MagicMirror#1473

Care to share @flothjl ?

I placed this in the [Seat:*] section of /etc/lightdm/lightdm.conf file: display-setup-script=xrandr --output HDMI-1 --rotate left

me2youall commented 3 years ago

I was able to solve this by updating the lightdm config. This thread has information. MichMich/MagicMirror#1473

Care to share @flothjl ?

I placed this in the [Seat:*] section of /etc/lightdm/lightdm.conf file: display-setup-script=xrandr --output HDMI-1 --rotate left

@flothjl, this worked perfectly. Thank you

guysoft commented 3 years ago

Perhaps its worth adding this to the readme?

nighthawk156 commented 3 years ago

This worked for me also. Super easy.

On Mon, Dec 28, 2020, 5:22 AM Guy Sheffer notifications@github.com wrote:

Perhaps its worth adding this to the readme?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/guysoft/MagicMirrorOS/issues/16#issuecomment-751663752, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFUMYKI45K3YM6M6D4FPPBDSXBL7TANCNFSM4QUDKEGQ .

jbishop129 commented 3 years ago

Hi, I wanted to add a note here: At least with a Raspberry Pi 4 on the RPi official 7" touchscreen, the --outputshould be DSI-1 not HDMI-1. Hope this helps someone! Perhaps an update to the readme.md would be helpful