Does someone solved the problem with wrong resolution on boot?
I have Waveshare touchscreen LCD(B) with resolution 800x480. Sometimes it detects as expected and after boot my GUI application run well with correct touchscreen coordintaes.
If I run
DISPLAY=:0 xrandr -q
I got output
Screen 0: minimum 320 x 200, current 800 x 480, maximum 8192 x 8192
HDMI-1 connected primary 800x480+0+0 (normal left inverted right x axis y axis) 150mm x 100mm
800x480 65.68*+
The screen detects default resolution and even screen physical size.
However sometimes it detects wrong and touchscreen coordinates doesn't match to physical position.
If run
DISPLAY=:0 xrandr -q
I got output
Screen 0: minimum 320 x 200, current 1024 x 768, maximum 8192 x 8192
HDMI-1 connected primary 1024x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
1024x768 60.00*
800x600 60.32 56.25
848x480 60.00
640x480 59.94
The resolution is wrongs as well as the physical coordinates isn't detected.
I've tried to put this row to armbianEnv.txt
extraargs=drm_kms_helper.edid_firmware=HDMI-A-1:edid/800x480.bin video=HDMI-A-1:800x480-24@60
This solved correct position of bootlogo during boot, but does't solve wrong touchscreen coordinates after boot. Moreover it causes very long boot time (more than 1 minute)
I've tried to put U-boot env and save it
setenv video-mode sunxi:800x480-24@60,monitor=hdmi,hpd=0,edid=0
saveenv
It doesn't work at all.
I've tried to set U-Boot variable
CONFIG_INITIAL_USB_SCAN_DELAY=2000
I was thinking the wrong detection of screen dimension may lay in surface of screen initialization time. However it doesn't help too. The screen initialized before that delay.
I've tried to put conf file to xorg conf according to this topic. It give correct resolution and touchscreen coordinates after boot, but form time to time wrong position of bootlogo.
Does someone find the best solution?