in Getting started by

I have worked through the Raspberry Pi 4 Hello World example.  I have a Official 7 inch touch screen connected to my Rpi 4.

When I run the program the screen displays exactly as it should.  But it does not respond to any touches.

I know the touch screen is OK, I use it on other Pi4s.

Do you have any suggestions ?


1 Answer

0 votes


maybe you have connected another input device or the touch device is registered with a different name - you can change the settings within the file ew_bsp_touch.c. There you will find the following define:

#define DEFAULT_TOUCH_DEVICE  "/dev/input/event0"

The current implementation is set-up to use


as touch input device. If you have attached a keyboard or mouse to your Raspberry Pi, then it could be that the touch controller is assigned to a different id. You can found out the names and other attributes of the attached input devices by executing

cat /proc/bus/input/devices

on your shell.

Does this help?

Best regards,



Manfred :

I ran cat /proc/bus/input/devices and my touch screen is input2.

So I edited the ew_bsp_touch.c file as suggested.

Then recompiled with make.

But when I ran the program I got the error message

Initialize Display ...  [failed]

So I though openGL is not selected somehow ( it was before ???)

so I used raspi-config to select openGl and when I did some commands ran, I assume installing something.  and I selected the fake KMS version

But I still get the [failed] message when I run the EmbeddedWizard-RasPi-4B file.

The only thing I did between after running the program with good video but no touch, and now, was to power down, send my previous message, read your reply, and then power back up.  

Any ideas why openGL doesnt seem to be starting ?

I have done some more testing.  After reloading the SD card and starting over a few times, I think I found the problem

After booting up for the first time after enabling SSH there is a message that says you should change your password.  So I did.  I would probably change my password sooner or later anyway, every one in the world with a raspberry pi knows the default password is raspberry.

 But then that is when the "initialize display ... [failed]" error occurs.

I dont know why a new password confuses things, but it seems to.

 So I am now using the default password only, and everything works fine.  The demonstration programs work as expected and the touch screen touch works.


I have made a few back up images of the SD card in various configurations, and I will do some experimenting with the password and Host name.  I have more than 1 pi and I dont want them to be all called the same thing.

Hi Robert,

thanks for sharing the update.

I just verified it on a RasPi 4B and tried to rebuild and execute one of the GUI examples with a changed password for the user 'pi' - it works fine....

Maybe the reboot after changing the password helped.

Best regards,


Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint