MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    Screen rotation and resizing

    Scheduled Pinned Locked Moved Solved Troubleshooting
    9 Posts 6 Posters 4.0k Views 6 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T Offline
      Thgj0842
      last edited by

      Hi

      yes i have searched the forums but i havent found an answer to my problem

      so i can rotate the monitor, both via /boot/config.txt and via css.js
      my problem is that i can not figure out how to resize the screen to fit the rotated monitor

      I’m running a 1920x1200 horizontal monitor
      i physically rotate the monitor, i edit either config.txt or css.js and the screen rotates but the magicmirror interface looks like it is still horizontal. I only see half of the modules and it dont fill down the monitor to the bottom.

      is it a limitation in Rasbian Buster because i am running with desktop or is it required to run desktop ?

      have i missed a config file ?
      Greets
      TT

      S evroomE 2 Replies Last reply Reply Quote 0
      • T Offline
        Thgj0842
        last edited by

        do

        i found the “problem”

        yesterday i tried to rotate the screen with display_rotate=1, 2 and 3
        i tried to set the framebuffer_width=1920 and framebuffer_height=1200 also tried to reverse it but i could not get it to work.

        then i found the post about the CSS method and when testing that out i must have forgotten to uncomment display_rotate in config.txt

        the CSS method is working without problems.

        Have a nice X-Mas
        \TT

        1 Reply Last reply Reply Quote 0
        • S Offline
          sonicgoose @Thgj0842
          last edited by

          @Thgj0842 I did this just yesterday with a new install of Raspbian and MagicMirror. I put

          display_rotate=3
          

          at the very end of /boot/config.txt after rotating my monitor 90º counter-clockwise. You may need to try

          display_rotate=1
          

          if you’ve rotated 90º clockwise.

          That’s all I had to do.

          1 Reply Last reply Reply Quote 0
          • evroomE Online
            evroom @Thgj0842
            last edited by

            @Thgj0842

            There is a thread somewhere that discusses rotation via css.
            I have my monitor rotated 90 degrees, clockwise, using these settings:

            ~/MagicMirror/css/custom.css
            
            body {
              margin: 0;
              position: absolute;
              transform: rotate(-90deg);
              transform-origin: top left;
              width: 100vh;
              height: 100vw;
            
              object-fit: cover;
              top: 100vh;
                    visibility: visible;
             }
            
            /boot/config.txt
            
            display_hdmi_rotate=0
            

            Here are all settings from my current config.txt:

            $ cat /boot/config.txt | egrep -v '^$|#'
            decode_MPG2=0xYYYYYYYY
            dtparam=audio=on
            hdmi_group=2
            hdmi_mode=83
            display_hdmi_rotate=0
            framebuffer_width=1600
            framebuffer_height=900
            gpu_mem=128
            

            Give it a try.

            MagicMirror version: 2.30.0
            Raspberry Pi 4 Model B Rev 1.5 (8 GB RAM)
            Raspbian GNU/Linux 12 (bookworm)

            Test environment:
            MagicMirror version: v2.30.0
            Raspberry Pi 3 Model B Plus Rev 1.3 (1 GB RAM)
            Raspbian GNU/Linux 12 (bookworm)

            1 Reply Last reply Reply Quote 0
            • T Offline
              Thgj0842
              last edited by

              this is strange

              like i wrote i have tried all this. but of cause now when i tested again it is working ???

              so it is working on my monitor here at home but when i tested this earlier today it was at work

              i will check tomorrow again on my work monitor

              1 Reply Last reply Reply Quote 0
              • T Offline
                Thgj0842
                last edited by

                do

                i found the “problem”

                yesterday i tried to rotate the screen with display_rotate=1, 2 and 3
                i tried to set the framebuffer_width=1920 and framebuffer_height=1200 also tried to reverse it but i could not get it to work.

                then i found the post about the CSS method and when testing that out i must have forgotten to uncomment display_rotate in config.txt

                the CSS method is working without problems.

                Have a nice X-Mas
                \TT

                1 Reply Last reply Reply Quote 0
                • R Offline
                  rjansy
                  last edited by

                  Hi there, this fix has seemed to work for me as well. However I cannot get it the correct way round in my case. This means +90 degrees OR -270 degrees. Neither of these options seem to work, however -90 degrees seems to work. Does anyone know a solution for this?

                  evroomE 1 Reply Last reply Reply Quote 0
                  • evroomE Online
                    evroom @rjansy
                    last edited by evroom

                    @rjansy
                    Hi,
                    do you want to rotate your monitor clockwise or counter-clockwise?
                    See my response above on how I clockwise rotate my monitor.
                    Make sure you do not rotate via /boot/config.txt when using the css solution.
                    Set it to zero and reboot to activate.
                    Now in config.css, you have to counter-rotate, so -90 degrees, to have your MM displaying horizontal again.
                    So, you turn your screen +90 degrees, therefore you make it up again by rotating the contents of your screen -90 degrees.
                    When rotating your screen counter-clockwise, the opposite applies.

                    Good luck !

                    MagicMirror version: 2.30.0
                    Raspberry Pi 4 Model B Rev 1.5 (8 GB RAM)
                    Raspbian GNU/Linux 12 (bookworm)

                    Test environment:
                    MagicMirror version: v2.30.0
                    Raspberry Pi 3 Model B Plus Rev 1.3 (1 GB RAM)
                    Raspbian GNU/Linux 12 (bookworm)

                    1 Reply Last reply Reply Quote 0
                    • D Offline
                      doubleT Module Developer
                      last edited by

                      I had trouble using the CSS method and googled a bit more.

                      in /etc/xdg/lxsession/LXDE-pi/autostart ad this line (with sudo):
                      @xrandr --output HDMI-1 --rotate right

                      kayakbabeK 1 Reply Last reply Reply Quote 1
                      • kayakbabeK Offline
                        kayakbabe @doubleT
                        last edited by

                        @doubleT

                        for the screen size, look in the magicmirror doc for the electron options, you’ll want the full screen option probably. but you can set width and height too. You make these changes in your magicmirror config.js

                        When messing with modules and stuff, I generally set my screen size width and height to about half of my monitor so I can edit config and things comfortable on the same screen.

                        tips:
                        Ctrl+m will minimize electron and thus magic mirror, if you need to get to the desktop and are running full screen.

                        click on teh electron instance then ctrl+r will reload magic mirror. That way you don’t have to completely stop and reload when you are messing with css or config. At least 90% of the time ctrl+r wll be enough.

                        1 Reply Last reply Reply Quote 0
                        • 1 / 1
                        • First post
                          Last post
                        Enjoying MagicMirror? Please consider a donation!
                        MagicMirror created by Michael Teeuw.
                        Forum managed by Sam, technical setup by Karsten.
                        This forum is using NodeBB as its core | Contributors
                        Contact | Privacy Policy