• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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.

Rpi 4 and two monitors

Scheduled Pinned Locked Moved Hardware
60 Posts 6 Posters 25.9k 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.
  • S Offline
    sdetweil
    last edited by sdetweil Feb 8, 2020, 1:36 PM Feb 8, 2020, 1:25 PM

    well, I finally got it to work , note I have two displays that support 4k, 3840x2160, so my screen pos is double yours

    in /boot/config.txt

    [pi4]
    # Enable DRM VC4 V3D driver on top of the dispmanx display stack
    dtoverlay=vc4-fkms-v3d
    max_framebuffers=4
    

    and in /boot/cmdline.txt
    add cma=384M to the end of the line, like this…

    plymouth.ignore-serial-consoles cma=384M
    

    then you must power down and back up for these changes to be applied

    found here
    https://retropie.org.uk/forum/topic/24436/drm_ioctl_mode_create_dumb-failed-cannot-allocate-memory/9

    I was getting the DRM cannot allocate memory error

    MagicMirror/run-start.sh line for chromium

    chromium-browser -noerrdialogs -kiosk --user-data-dir='Default' --window-position=0,0 -start_maximized  --disable-infobars --app=http://localhost:$port  --ignore-certificate-errors-spki-list --ignore-ssl-errors --ignore-certificate-errors 2>/dev/null
    

    MagicMirror2/run-start.sh line for chromium

    chromium-browser --disable-bundled-ppapi-flash -noerrdialogs -kiosk -start_maximized  --window-position="3840,0" --disable-infobars --app=http://localhost:$port  --ignore-certificate-errors-spki-list --ignore-ssl-errors --ignore-certificate-errors  --user-data-dir='Test2'  # 2>/dev/null
    

    this boots up and both MM start via pm2 and display on separate screens, with different content (modules in different positions)

    here is a screenshot of my dev system connected to both MM servers at the same time
    (the displays are two hdmi ports on the same TV, so I can’t show them physically at the same time)
    alt text

    Sam

    How to add modules

    learning how to use browser developers window for css changes

    1 Reply Last reply Reply Quote 1
    • N Offline
      NathTheDude
      last edited by Feb 8, 2020, 2:44 PM

      @sdetweil - nice 2 x 4k’s.

      So, I did what you mentioned in your last post but unfortunetly I am in the same issue. I wonder if your problem was more to do with 2 x 4k’s which is perhaps different to mine? I am not sure.

      1 Reply Last reply Reply Quote 0
      • N Offline
        NathTheDude
        last edited by Feb 8, 2020, 2:47 PM

        @sdetweil - if you comment out the chromium line in the run-start.sh does this cause you any issues/errors?

        S 2 Replies Last reply Feb 8, 2020, 3:01 PM Reply Quote 0
        • S Offline
          sdetweil @NathTheDude
          last edited by Feb 8, 2020, 3:01 PM

          @NathTheDude no… you could just change config.js to serverOnly:true, then it won’t try to start chrome

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          1 Reply Last reply Reply Quote 0
          • S Offline
            sdetweil @NathTheDude
            last edited by sdetweil Feb 8, 2020, 3:05 PM Feb 8, 2020, 3:04 PM

            @NathTheDude I started by doing

            cd MagicMirror
            node serveronly 
            

            note no npm start needed, will run til you ctrl-break out

            then tried multiple tries to get chrome on the second display…
            (it works manually if the position is mispelled!)

            then once it worked reliably,
            i killed the server instance
            then I used pm2 to stop/start that instance til I got that to work.

            note that I had to use
            –disable-bundled-ppapi-flash
            on the second instance as it collided with the 1st…

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            K 1 Reply Last reply Sep 28, 2022, 8:22 PM Reply Quote 0
            • K Offline
              krocaq @sdetweil
              last edited by Sep 28, 2022, 8:22 PM

              @sdetweil

              @saljoke
              Hi. Thats right. i only use 1 Pi4 to serve both displays via 2 MM instances. first the originally MagicMirror directory and the second in a MagicMirror2 directory. Both powered up via PM2 and turned off and on via PIR sensor.

              The config looks like this:

              language: “de”,
              logLevel: [“INFO”, “LOG”, “WARN”, “ERROR”],
              timeFormat: 24,
              units: “metric”,
              electronOptions: {fullscreen:true, x:1920},

              1920 is the resolution witdh of the main display.

              Very easy to handle and good for the electrical consumption

              S 1 Reply Last reply Sep 28, 2022, 8:24 PM Reply Quote 0
              • S Offline
                sdetweil @krocaq
                last edited by sdetweil Sep 28, 2022, 8:24 PM Sep 28, 2022, 8:24 PM

                @krocaq see my comment here , you can do it with ONE directory
                https://forum.magicmirror.builders/topic/17239/two-display/2?_=1663555322286

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                1 Reply Last reply Reply Quote 0
                • 1
                • 2
                • 3
                • 4
                • 5
                • 6
                • 6 / 6
                • 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