# 3.5 inch touch screen code doesn't work? Rpi

**URL:** https://forum.core-electronics.com.au/t/3-5-inch-touch-screen-code-doesnt-work-rpi/4897
**Category:** Product Questions
**Created:** [24 March 2019 21:05 UTC](https://forum.core-electronics.com.au/t/3-5-inch-touch-screen-code-doesnt-work-rpi/4897 "2019-03-24T21:05:25Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![Abram68481](https://avatars.discourse-cdn.com/v4/letter/a/ba9def/32.png) [@Abram68481](https://forum.core-electronics.com.au/u/Abram68481)
#### Post date: [24 March 2019 21:05 UTC](https://forum.core-electronics.com.au/t/3-5-inch-touch-screen-code-doesnt-work-rpi/4897/1 "2019-03-24T21:05:25Z")

</div>

Hi,

I recently bought a 3.5 inch touch screen for raspberry pi 3b+ and it works fine displaying everything. The only issue I have is that I can’t run the scripts to revert back to normal hdmi function. When I run them I either get an error or it just reboots exactly the same.

Bit of a tutorial for the package use for it please?

Thanks!

---

<div class="post-metadata">

### Author: ![James46717](https://avatars.discourse-cdn.com/v4/letter/j/e5b9ba/32.png) [@James46717](https://forum.core-electronics.com.au/u/James46717)
#### Post date: [25 March 2019 23:00 UTC](https://forum.core-electronics.com.au/t/3-5-inch-touch-screen-code-doesnt-work-rpi/4897/2 "2019-03-25T23:00:33Z")

</div>

Recently purchased one of these 3.5" screens too. Agree its a bit of a steep learning curve, ended up re-installing raspbian a number of times. If your device is this one I may be able to help.

> **[3.5inch Display Module Touch LCD with Stylus for Raspberry Pi 3B+](https://core-electronics.com.au/3-5inch-display-module-touch-lcd-with-stylus-for-raspberry-pi-3.html)**
>
> This little display is perfect for a dedicated, simple Raspberry Pi touch-interface. Simply plug it onto the Pi's GPIO and execute the provided installation command.

  
The link on the page is to waveshare drivers, which work, … sort of … I had much more success with the GitHub drivers. [https://github.com/goodtft/LCD-show](https://github.com/goodtft/LCD-show)

But there are a few gotchas with the GitHub script.  
It expects the Pi host name to be _rapsberrypi_.  
It expects the _/usr/share/X11/xorg.conf.d/_ directory to exist, if it doesn’t it wont copy the file.

Suggest using GitHib drivers as they worked well for me, apart from the above. The wave share scripts have a number of errors.

Cheers  
Jim

PS if you can list the error that occurs when running the LCD-hdmi script I might be able to help.

---

<div class="post-metadata">

### Author: ![Abram68481](https://avatars.discourse-cdn.com/v4/letter/a/ba9def/32.png) [@Abram68481](https://forum.core-electronics.com.au/u/Abram68481)
#### Post date: [26 March 2019 00:20 UTC](https://forum.core-electronics.com.au/t/3-5-inch-touch-screen-code-doesnt-work-rpi/4897/3 "2019-03-26T00:20:27Z")

</div>

Yeah that’s the one. I might try the Github drivers for it and get back to you!

---

<div class="post-metadata">

### Author: ![Abram68481](https://avatars.discourse-cdn.com/v4/letter/a/ba9def/32.png) [@Abram68481](https://forum.core-electronics.com.au/u/Abram68481)
#### Post date: [4 April 2019 05:33 UTC](https://forum.core-electronics.com.au/t/3-5-inch-touch-screen-code-doesnt-work-rpi/4897/4 "2019-04-04T05:33:28Z")

</div>

Ok so I used the github drivers and they work awesome. For anyone else looking at this, the github files have drivers for every type of LCD you could think of. All you have to do is step 2 in ReadMe.md on github on James’ link and then type this into the terminal:

(I forgot to mention they have a table with all the executable names for each type of LCD. The one for the 3.5" GPIO pin touscreen hat is LCD35-show)

So for my touchscreen the next command is:(after cd LCD-show in step 2)

./LCD35-show

(before you run this you need to place the screen on the pins)

That should automatically reboot and show a static bootloader on the hdmi output and the desktop interface on the touchscreen.

YAY!

If not, don’t worry, just pull the power and plug back in to manually reboot it and it should work.

Once you’ve had your fun though, and want to revert back to HDMI function, all you need to do is type this into the terminal:

cd LCD-show

and then:

./LCD-hdmi

That should take a second, reboot and display a white screen on the touchscreen and the desktop on the HDMI output.

Now if you’re like me and have a wireless mouse or your mouse goes really laggy after this, don’t fret. I had the same problem and it’s an easy fix.

Type this into the terminal:

sudo nano /boot/cmdline.txt

once the interface comes up, go all the way to the end of the first line, hit space and type this:

usbhid.mousepoll=0

Then click CTRL+X

Then when it asks “Save modified buffer?”, press y and then enter.

It shouldn’t do anything right away, just reboot it and it should work flawlessly.

Hope that helps anyone that was like me!

---

<div class="post-metadata">

### Author: ![Stephen](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/stephen/32/1599_2.png) [@Stephen](https://forum.core-electronics.com.au/u/Stephen)
#### Post date: [4 April 2019 21:14 UTC](https://forum.core-electronics.com.au/t/3-5-inch-touch-screen-code-doesnt-work-rpi/4897/5 "2019-04-04T21:14:43Z")

</div>

Great! Thanks for sharing your results Abram!

We will start working on some material that uses the Github drivers and put it up to make things easier on people.

---

<div class="post-metadata">

### Author: ![Abram68481](https://avatars.discourse-cdn.com/v4/letter/a/ba9def/32.png) [@Abram68481](https://forum.core-electronics.com.au/u/Abram68481)
#### Post date: [5 April 2019 00:17 UTC](https://forum.core-electronics.com.au/t/3-5-inch-touch-screen-code-doesnt-work-rpi/4897/6 "2019-04-05T00:17:04Z")

</div>

Thanks Stephen. I’ll make sure to check them out!

---

<div class="post-metadata">

### Author: ![James46717](https://avatars.discourse-cdn.com/v4/letter/j/e5b9ba/32.png) [@James46717](https://forum.core-electronics.com.au/u/James46717)
#### Post date: [6 April 2019 20:02 UTC](https://forum.core-electronics.com.au/t/3-5-inch-touch-screen-code-doesnt-work-rpi/4897/7 "2019-04-06T20:02:51Z")

</div>

> **[@Abram68481](https://forum.core-electronics.com.au/u/Abram68481)**
>
> Love nodeMCU IOT projects, arduino projects and big ideas. Dont ask me about how a Raspberry Pi works though, I can use them (just) but I STILL havent figured it out.

Thanks for the info on the mouse. Haven’t used the LCD screen in graphical mode very much but when I did the mouse movement was extremely slow and annoying.

Cheers  
Jim

PS For anyone using this LCD screen please note it seems to have no control for the backlight meaning it is consuming around 200mA all the time, even when not in use. In my design this is not a problem. But, I believe other LCDs do have backlight control, although much more expensive.

---

<div class="post-metadata">

### Author: ![Abram68481](https://avatars.discourse-cdn.com/v4/letter/a/ba9def/32.png) [@Abram68481](https://forum.core-electronics.com.au/u/Abram68481)
#### Post date: [6 April 2019 21:53 UTC](https://forum.core-electronics.com.au/t/3-5-inch-touch-screen-code-doesnt-work-rpi/4897/8 "2019-04-06T21:53:10Z")

</div>

Yeah I don’t know if the cmdline fixes the laggy mouse problem on the screen but I know it does afterwards when you revert back to hdmi function. Thats where I got all my lag…

---

<div class="post-metadata">

### Author: ![Abram68481](https://avatars.discourse-cdn.com/v4/letter/a/ba9def/32.png) [@Abram68481](https://forum.core-electronics.com.au/u/Abram68481)
#### Post date: [6 April 2019 21:54 UTC](https://forum.core-electronics.com.au/t/3-5-inch-touch-screen-code-doesnt-work-rpi/4897/9 "2019-04-06T21:54:24Z")

</div>

Also, yeah the screen is really laggy with the mouse so I just used the stylus included. Haven’t tried modifying the cmdline script on the screen yet but I will try and get back to you.

---

<div class="post-metadata">

### Author: ![Abram68481](https://avatars.discourse-cdn.com/v4/letter/a/ba9def/32.png) [@Abram68481](https://forum.core-electronics.com.au/u/Abram68481)
#### Post date: [10 April 2019 08:00 UTC](https://forum.core-electronics.com.au/t/3-5-inch-touch-screen-code-doesnt-work-rpi/4897/10 "2019-04-10T08:00:24Z")

</div>

OK yeah, so I used the usbhid.mousepoll=0 command and it did fix the lag on the mouse(on the touch screen). There is still a little bit of lag but I think that’s due to the frame rate of the screen. It is actually usable with the mouse Now!

P.S.  
Stephen you should probably put this part into the tutorial aswell. It’s just the part from the sudo nano /boot/cmdline.txt to the usbhid mousepoll part and the reboot (hope that makes sense, you’ll probably get it). Just gotta do that when already in the touch screen 🙂

---

<div class="post-metadata">

### Author: ![Stephen](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/stephen/32/1599_2.png) [@Stephen](https://forum.core-electronics.com.au/u/Stephen)
#### Post date: [11 April 2019 05:26 UTC](https://forum.core-electronics.com.au/t/3-5-inch-touch-screen-code-doesnt-work-rpi/4897/11 "2019-04-11T05:26:04Z")

</div>

Good find Abram,

Its on my (admittedly long) list of tutorials. This is good stuff though, and some of it I’ve gone through myself without finding a solution. Excellent work!
