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.

    Black screen instead of desktop after installing PIR sensor

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    31 Posts 5 Posters 17.7k 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.
    • 0 Offline
      09succotash
      last edited by

      Hi, MM Community,
      I recently installed an Adafruit PIR sensor, and configured it using this MagicMirrorCentral guide (https://www.magicmirrorcentral.com/pir-sensor-raspberry-pi-magic-mirror/), and I rebooted like the instructions said. Instead of my normal desktop showing up, all I get is a black screen with my cursor on it, but there is nothing to click. I can’t even get to the terminal to run any commands. Please help me with this, what have I done wrong, and how can I fix it?

      FoziF 1 Reply Last reply Reply Quote 0
      • FoziF Offline
        Fozi Project Sponsor @09succotash
        last edited by

        @09succotash Seems like you use @cowboysdude scripts to control the display.
        Those are really simple scripts which work usually out of the box.

        What I’d guess is that the autostart folder might cause the trouble.
        Which Raspbian ver sion do you use?
        In Raspbian 9 (Jessie) the autostart folder was in

        /home/user/.config/lxsession/LXDE-pi/autostart
        

        (just as written in the above mentioned instructions)

        In Raspbian 10 (Buster) the autostart folder has changed to

        /etc/xdg/lxsession/LXDE-pi/autostart
        

        If you are on Buster, remove the /autostart folder in /home/user/.config/lxsession/LXDE-pi you may have created. Then go to

        /etc/xdg/lxsession/LXDE-pi/
        

        and insert there the the required line in the autostart file

        @/usr/bin/python /home/pi/pir.py
        

        Hope this helps.

        HowTo: Replace PIR Sensor with a RCWL-0516 Microwave Sensor

        1 Reply Last reply Reply Quote 0
        • 0 Offline
          09succotash
          last edited by 09succotash

          @Fozi Sorry I didn’t state this earlier…
          I’m using a Raspberry Pi 3 Model B, running Raspbian Stretch.

          1 Reply Last reply Reply Quote 0
          • 0 Offline
            09succotash
            last edited by 09succotash

            @Fozi How can I undo all of the PIR sensor setup? I want to completely remove it, so I can get my desktop back.

            FoziF 1 Reply Last reply Reply Quote 0
            • FoziF Offline
              Fozi Project Sponsor @09succotash
              last edited by Fozi

              @09succotash

              If you cant open a terminal directly on you Pi, then try to open a ssh session from another PC. Then you have terminal access and you can start removing the PIR installation. E.g. open a terminal from a windows PC and enter at the prompt:

              ssh pi@192.168.0.xx
              

              (means the IP of your Pi)

              You’ll be prompted to accept the ssh-key (yes) and then you are prompted to enter the password (keystroke will nor be displayed). Then you should be in.
              As you are using Stretch go edit /home/user/.config/lxsession/LXDE-pi/autostart and remove the ‘@/usr/bin/python /home/pi/pir.py’ entry you made before. save the file and reboot.
              Then go into your pi’s home folder end remove pir.py, monitor_on.sh and monitor_off.sh.
              Basically you do the reverse order when you installed the scripts.

              HowTo: Replace PIR Sensor with a RCWL-0516 Microwave Sensor

              0 2 Replies Last reply Reply Quote 0
              • 0 Offline
                09succotash @Fozi
                last edited by

                @Fozi Ok, I think the SSH interface is disabled. I’ve figured out a way to get into a terminal. It seems that the desktop is there, just its not showing. I was able to right-click, and click Terminal Emulator in the menu. Ok, i’m gonna try this, and see if it works. Thank you.

                1 Reply Last reply Reply Quote 0
                • 0 Offline
                  09succotash @Fozi
                  last edited by

                  @Fozi It didn’t work, my desktop is still just a black screen. What can I do now to get the Raspberry Pi desktop and taskbar back? All the scripts you told me to remove are gone.

                  FoziF 1 Reply Last reply Reply Quote 0
                  • FoziF Offline
                    Fozi Project Sponsor @09succotash
                    last edited by

                    @09succotash Umpf…the last thing that comes to my mind…disconnect the PIR-Sensor from GPIO. Maybe it is not connected to the right pins, which may cause that strange behaviour.

                    Do you have the MM-software installed? If so, then copy the whole MagicMirror directory to a save place and reinstall Raspbian from scratch. It’s probably the fastest and easiest solution after all, if nothing else is installed on the RPi.

                    Maybe someone else here in the forum can help? Guys?

                    HowTo: Replace PIR Sensor with a RCWL-0516 Microwave Sensor

                    0 2 Replies Last reply Reply Quote 0
                    • 0 Offline
                      09succotash @Fozi
                      last edited by

                      @Fozi MagicMirror framework is installed, yes.

                      FoziF 1 Reply Last reply Reply Quote 0
                      • 0 Offline
                        09succotash @Fozi
                        last edited by

                        @Fozi I can’t reinstall Raspbian because this is for a science fair project, due in two weeks, and I put too much work into it for me to be able to finish on time if I reinstall. There has to be a way to get my desktop back without reinstalling.

                        S 1 Reply Last reply Reply Quote 0
                        • FoziF Offline
                          Fozi Project Sponsor @09succotash
                          last edited by

                          @09succotash As said, copy the whole MM-folder, eg. via scp to another PC and then reinstall Raspbian.
                          I’m sorry that I can’t provide a more satisfying solution:disappointed_face:

                          HowTo: Replace PIR Sensor with a RCWL-0516 Microwave Sensor

                          1 Reply Last reply Reply Quote 0
                          • 0 Offline
                            09succotash
                            last edited by

                            This post is deleted!
                            1 Reply Last reply Reply Quote 0
                            • 0 Offline
                              09succotash
                              last edited by

                              @Fozi Ahh, its ok. Thanks for your help, I’ll figure something out.

                              1 Reply Last reply Reply Quote 0
                              • S Offline
                                sdetweil @09succotash
                                last edited by

                                @09succotash can u ssh into the machine?

                                is MM running on pm2? do pm2 status, and if not stopped do pm2 stop for each line (use number or name)

                                Sam

                                How to add modules

                                learning how to use browser developers window for css changes

                                0 1 Reply Last reply Reply Quote 0
                                • 0 Offline
                                  09succotash @sdetweil
                                  last edited by 09succotash

                                  @sdetweil I cannot ssh into it. I am able to access the terminal though. MM is running on pm2, I just setup an autostart script for it. I don’t think MM is causing the issue, because the issue started just when I was setting up the PIR sensor.

                                  S 1 Reply Last reply Reply Quote 0
                                  • S Offline
                                    sdetweil @09succotash
                                    last edited by

                                    @09succotash but it can’t hurt to stop it…

                                    if you can get to terminal, then its not a desktop problem…

                                    Sam

                                    How to add modules

                                    learning how to use browser developers window for css changes

                                    0 1 Reply Last reply Reply Quote 0
                                    • 0 Offline
                                      09succotash @sdetweil
                                      last edited by

                                      @sdetweil I could only get to terminal, by right clicking somewhere on the screen. I tried stopping MM using pm2, didn’t have any effect.

                                      S 1 Reply Last reply Reply Quote 0
                                      • S Offline
                                        sdetweil @09succotash
                                        last edited by

                                        @09succotash said in Black screen instead of desktop after installing PIR sensor:

                                        by right clicking somewhere on the screen

                                        ok, so desktop is running, even tho u might not be able to see it…

                                        Sam

                                        How to add modules

                                        learning how to use browser developers window for css changes

                                        0 1 Reply Last reply Reply Quote 0
                                        • 0 Offline
                                          09succotash @sdetweil
                                          last edited by

                                          @sdetweil Exactly. It seems to be running, but my wallpaper, taskbar, and icons are gone. Black screen shows in its place.

                                          S 1 Reply Last reply Reply Quote 0
                                          • S Offline
                                            sdetweil @09succotash
                                            last edited by

                                            @09succotash this is stretch or???

                                            lsb_release -a in the terminal window

                                            Sam

                                            How to add modules

                                            learning how to use browser developers window for css changes

                                            0 1 Reply Last reply Reply Quote 0

                                            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                            With your input, this post could be even better 💗

                                            Register Login
                                            • 1
                                            • 2
                                            • 1 / 2
                                            • 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