Problems with resolutions

The only software you need is for the touchscreen. You can get this with "sudo apt-get install xinput-calibrator"

Then edit /boot/config.txt to add the following lines:

hdmi_group=2 hdmi_mode=1 hdmi_mode=87 hdmi_cvt 800 480 60 6 0 0 0 dtparam=spi=on dtparam=i2c_arm=on

dtoverlay=ads7846,cs=1,penirq=25,penirq_pull=2,speed=50000,keep_vref_on=0,swapxy=0,pmax=255,xohms=150,xmin=200,xmax=3900,ymin=200,ymax=3900 <======Note this is all on 1 line!

dtoverlay=w1-gpio-pullup,gpiopin=4,extpullup=1

Shutdown the pi, and connect the display. When you power it back up, you should have a perfect display. You can now calibrate the touchscreen by running Menu-->Preferences-->Calibrate Touchscreen. Click each of the four targets when requested and then you will get a text window which explains what you should put into a calibration file. For the Pi, the filename should be /usr/share/X11/xorg.conf.d/99-calibration.conf.

/r/raspberry_pi Thread