After installing the LCD display drivers, I cannot start GUI on external monitor connected via HDMI.

A solution to this problem will probably be a solution to a more general issue I have.

So, is this an expected behavior? I think the install script overrides some system files and next time when I boot my Raspberry PI 2, the monitor receives signal from rpi, but I only have TTY access, not being able to start the GUI (startx gives an error that it doesn't find the lcd module).

Here is what the driver install script does:

sudo cp -rf ./etc/modules-35  /etc/modules
sudo mkdir /etc/X11/xorg.conf.d
sudo cp -rf ./etc/X11/xorg.conf.d/99-calibration.conf-35  /etc/X11/xorg.conf.d/99-calibration.conf
sudo cp -rf ./usr/share/X11/xorg.conf.d/99-fbturbo.conf  /usr/share/X11/xorg.conf.d/
sudo cp ./kernel.img /boot/kernel.img
sudo cp ./kernel7.img /boot/
sudo cp ./cmdline.txt /boot/
sudo cp ./inittab /etc/
sudo cp ./boot/config-35.txt /boot/config.txt
sudo cp -rf ./modules /lib/
sudo reboot

I was struggling to create a script to rollback these changes (create backups in this install script, but still no success).

  • Does that tarball include some xorg.conf stuff in addition to the drivers? This may explain why X won't use the HDMI display anymore with the LCD attached. If the driver is loaded, it will use the functioning LCD. If the LCD driver isn't loaded, it will still try to use only that and, since it can't, it will then fail. If the LCD isn't attached, it may still not work since the screen X is configured to use is not there. Have a look at /var/log/Xorg.0.log for details.
    – goldilocks
    Commented Aug 14, 2015 at 15:22
  • @goldilocks Yes, I added the original install script in the question. Commented Aug 14, 2015 at 15:35
  • Try moving those conf files to another directory temporarily, rmmod the modules necessary for the LCD, then try startx from the HDMI again. If that doesn't work, try it with the stock Raspbian kernel instead (looks like you will have to get that from an image, since the install may have erased them -- not very nice!).
    – goldilocks
    Commented Aug 14, 2015 at 15:39
  • @goldilocks I moved /etc/X11/xorg.conf.d/* into my tmp folder. Still the display is working. Commented Aug 16, 2015 at 7:05
  • @goldilocks Did the same with /usr/share/X11/xorg.conf.d/99-fbturbo.conf and my HDMI display works fine! :) Thanks a lot! Post an answer. You deserve the points. :) Commented Aug 16, 2015 at 7:09

2 Answers 2


The GUI stack on GNU/Linux usually requires (at least) two drivers, one used by the kernel, and a userspace one for the X server. I think the latter one tends to be more generic, which is perhaps why there's no indication of one being installed; the kernel one handles the specifics so that a more generic, pre-installed driver can be used with X (in contrast, another question about a touchscreen here yesterday seemed to involve a generic and/or preinstalled kernel driver, but a custom X driver).

The X server does not require a configuration, in which case it probes the hardware and tries to makes an appropriate decision. However, if you do provide a configuration, it will stick to that. If that configuration is wrong, it will fail.

X logs various things at start up to /var/log/Xorg.0.log. It is tidy about this and rolls them over, so that log contains only information from the most recent start (hence you will also find a .1.log and so on, these are for previous initializations). It also indicates going through your configuration line by line.

If you shut down X and move those config files in /etc/X11/xorg.conf.d and /usr/share/X11/xorg.conf.d/, you should be able to start X on the HDMI display, presuming something funny wasn't done with the kernel. At the very least, you should get a more detailed description of the problem in the .log.

If that works, you just need a script (or two) that will symlink and unlink those configuration files depending on which display you want to use. Stupidly enough, xinit and startx don't seem to have options for using alternate .conf files. However, if it does work, you might be able to create a .conf that covers both displays, since X does not have a problem running multiple different monitors. You could then enable or disable them and change certain parameters from within the GUI using xrandr.

  • What happens if you connect both of the screens (spi and hdmi). only one of them works? or some stuff shows up on HDMI and other in touchscreen display?. I am looking to set up a project where I have an input gui in the touchscreen and output videos to the hdmi display. Pretty much a video selection using a small touch screen and the output showing on the big HDMI. Is this possible?
    – Mosfetdaha
    Commented May 12, 2016 at 23:59

Try this to switch back to HDMI Output: Run "sudo nano /etc/X11/xorg.conf.d/99-fbturbo.conf". Then go down to where it said "fb1 or fb0". So in your case since it's outputting to the screen, it most likely says fb1. Change it to fb0 for HDMI output, and fb1 for SPI(So your touch screen) output. Hope this helps!

  • Thanks for the answer. Mine was in /usr/share/X11/xorg.conf.d/99-fbturbo.conf but that f1 to f0 worked fine! Commented Oct 2, 2019 at 20:37
  • Awesome! It was tricky to figure this all out. Glad to have been able to help you! Commented Oct 3, 2019 at 21:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.