No announcement yet.

From 4DPi to HDMI, and back

  • Filter
  • Time
  • Show
Clear All
new posts

  • From 4DPi to HDMI, and back

    I want an easy way to change the display I want to use.
    Before installing a 4DPi-32 TFT on a Raspberry Pi 2, I made a backup of these files:

    The backup files are in my home directory, in a folder called ~/HDMI

    Then, after the 4DPi installation, I made another backup, as these files were modified, and put them in a folder called ~/4DPi

    Now, the idea was to switch between HDMI and 4DPi TFT simply by overwriting these files with the specific backup.
    But the result is quite strange...

    The HDMI version of the files works fine, but with the 4DPi version, the display alternates between HDMI and TFT after 1 or 2 reboot.
    By rebooting 5 times, I got:

    I didn't change anything between the reboots. After the initial overwriting of the files with 4DPi versions, I just rebooted 5 times, doing nothing else.
    What's wrong with my solution? Why is it not stable?

  • #2

    Is the problem with boot console or with LXDE GUI only? If only GUI is started on wrong screen, please try disabling booting to GUI with raspi-config after switching back to 4DPi files.


    • #3

      Thank you! With the 4DPi files, and after a boot that landed on HMDI screen, I disabled booting to GUI. It is much better now. It boots on the right screen when I choose HDMI files (boots on console, on HDMI screen) or 4DPi files (boots on GUI, on 4DPi screen).
      Is there a way to enable the GUI with HDMI too?


      • #4
        you can switch easily between 4DPi and HDMI by using 4DPi kernel all the time and editing /etc/rc.local file. There is a line just before final exit 0:

        sudo -u pi FRAMEBUFFER=/dev/fb1 startx &

        change fb1 to fb0

        fb0 is HDMI; fb1 is 4DPi


        • #5
          Hello, strancara i try to do what you say but it still boots to the HAT?
          I just got the HAT and pi 2 and updated both. HAT is the 2.4 and works both cmd line and gui but the desktop i can't scroll to see stuff at the bottom of screen like the terminal screen when open?!
          I like to be able to switch between the 2 output so when at home i can use hdmi and on the go use the HAT display.


          • #6
            Hi, with new drivers, please use:

            startx -- -layout TFT
            startx -- -layout HDMI

            either from /etc/rc.local or from command line.
            Last edited by strancara; 21 August 2015, 06:04 PM.


            • #7
              That worked! Thanks. Where did you get that info from so i can find it next time?


              • #8
                Hi 'thatguy'

                Strancara is on our development team for the 4DPi's.

                The 2 lines he mentioned above are new additions which work with the latest release, however the older commands still work too.

                FRAMEBUFFER=/dev/fb1 startx


                FRAMEBUFFER=/dev/fb0 startx

                These will be added to the Datasheet soon.