Configuring the Waveshare 7inch HDMI LCD (H) (with case) for Raspberry Pi
The Waveshare 7inch HDMI LCD (H) (with case) Touchscreen is a great screen for your Pi!
There is only one snag: By default, the Raspberry Pi uses 1920x1080 resolution despite the fact that the monitor's hardware resolution is 1024x600. This causes ugly conversion artifacts.
The solution is letting the Pi know what the actual, physical resolution of the monitor is. Here is what you need to do:
Pi with a single HDMI port (Pi Zero, 1, 2, 3 A/B/B+)
In the file config.txt, add the following lines at the end and reboot:
hdmi_group=2 hdmi_mode=87 hdmi_cvt 1024 600 60 6 0 0 0
Pi with multiple HDMI ports (Pi 4 B, Pi400)
For Pis with more than one HDMI port, the commands related to displays must use an "index identifier" to specify what port the command should be used with.
The ":1" index tells the Pi this command must be used with the HDMI1 port. If you don't specify the index, HDMI0 (":0") is assumed.
So, to configure the Pi for the Waveshare monitor on HDMI1, add the following lines at the end of the file config.txt and reboot:
hdmi_group:1=2 hdmi_mode:1=87 hdmi_cvt:1 1024 600 60 6 0 0 0
Once your Pi has rebooted, it will use the monitor's native 1024 by 600 resolution.
If you connect the included USB to micro-USB cable in the monitor's "Touch" port and your Pi's USB port, you will have both power for the display and a touch screen! No separate power is needed in most use cases!
For more information
Note: The wiki page doesn't seem to be updated for Raspberry Pi OS "Buster" kernel 5.4+ as of this writing. No driver needs to be installed AT ALL on kernel 5.4+.
Raspberry Pi Official documentation
Revised 2021-09-22 - Link update for the RPF website restructuring