How to connect and configure a 7 inch touchscreen (model C) from waveshare to a rasberry pi 4 model B
Since the last version of Raspbian (Buster) and with the last version of the raspberry pi (rpi4b) the tutorial of the screen has not being updated correctly by Waveshare.
Waveshare 7 inch screen (model C). The 7 screen inch model C from Waveshare is originaly a basic LCD 1024x600x60Htz Hdmi touchscreen caracterized by a very low power consumption (5v - 30mA to 300 mA with backlight on). It can run on an USB port. This screen is compatible with most OS and architectures (it can run on 32Bit, Arm, 64bit, or Windows 10, linux Debian, and a lot of SBC like the Bananapi, Raspberry pi, Odroid ...).
Raspberry Pi 4 Model B - official presentation page. The Raspberry Pi 4 model B has been launched at the end of 2019. Some problems occurs and need to be fixed. For example, Ubuntu is not totaly compatible at this date. It can't manage the new 4 Gb range of ram of the rpi4b. One of this problem was : how to connect and use the 7 inch touchscreen (model C) from waveshare with this new rpi ? After a few hours of investigation this can be done !
- A rpi with raspbian buster pre-installed,
- a PC with a terminal on the same network and a ssh client installed,
- an official adaptator 5.1V+ - 3A !very Important!.
After burned the Raspbian Buster OS, open the sdcard on a pc, open the file config.txt at the root on the boot partition with a text editor.
comment this lines (*), just add a "#" before each line :
#dtoverlay=vc4-fkms-v3d
#max_framebuffers=2
And add this lines just under [rpi4] :
max_usb_current=1
hdmi_force_hotplug=1
config_hdmi_boost=7
hdmi_group=2
hdmi_mode=88
hdmi_drive=1
hdmi_cvt 1024 600 60 6 0 0 0
Save the file at the same place.
(*) Recommandation from waveshare and Raspberry foundation. The fkms overlay is not supported by this type of screen. We can use standard kms overlay and work without 3d material acceleration. This work perfectly.
on the boot partition add a file named 'ssh' (without extention) for activate ssh at first boot.
reboot the pi4 without the screen but with connected to your network, open a PC (connected on the same network) open a ssh client (like Putty) and connect it to the raspberry pi (with default user/password : pi/raspberry)
Debian - example on how to connect your pi in ssh : ssh 192.168.0.87 -p22 replace the ip and port with your pi ip and ssh port. First, on the PC, type in the terminal :
sudo apt update && sudo apt-upgrade -y
sudo raspi-config
in raspi-config , go to advanced options.
- select "resolution" set to
DMT 88 1024x600 60Hz 15:9
, - select "Pi 4 Video Output" set to
V1 Enable 4Kp60 HDMI
, - select "GL driver" and set to
Legacy Original non-GL desktop driver
,
connect the waveshare screen to the raspberry pi 4 . The screen mini USB must be connected on a USB3 port because USB2.0 seems limited in Volts or A and can't give enough to the screen) .
reboot the pi4... You're done !!!. You can now use VLC in 4k mode with your HDMI screen, or use touch screen for launch raspbian software ...etc
Hello,
do you know if this tutorial will work with the model R as well? It's identical, but it's resistive instead of capacitive.
Another thing: can I edit the file /boot/config.txt after the installation? or do I really need to edit it in the SD card before even putting the card into the raspberry pi?