balena-io-experimental / browser

A drop-in web browser block
98 stars 75 forks source link

ROTATE_DISPLAY does not work on RPi 4 #75

Open nmaas87 opened 3 years ago

nmaas87 commented 3 years ago

The current version of the browser block does not rotate the display on the RPi 4 with the current settings / vc4-fkms-v3d. If you decide to rotate, it will just resize the window - starting on 0,0 and then not e.g. landscape it like normal, but resize it in portrait if you ROTATE_DISPLAY=right - but not rotate the display/screen. The only reliable way i found was to leave the ROTATE_DISPLAY and WINDOW_SIZE settings all alone and rotate the screen itself on boot by using BALENA_HOST_CONFIG_display_hdmi_rotate=3 (for 270 degree clockwise rotation). Then it will work flawlessly.

jellyfish-bot commented 2 years ago

[phil-d-wilson] This issue has attached support thread https://jel.ly.fish/da9aa3d4-b994-4e1b-8ff8-0b625ee6f746

rahul-thakoor commented 2 years ago

i think it might be related to https://github.com/balenablocks/browser/blob/a42c8c0da333a707b3a5e4b7b37e67a45e10a106/src/start.sh#L49

which leaves = after variable names.

we might need

environment=$(env | grep -v -w '_' | awk -F: '{ st = index($0,"=");print substr($1,0,st -1) ","}' | tr -d "\n")

rahul-thakoor commented 2 years ago

maybe fixed by #91 ?

Chrissi2812 commented 2 years ago

I have tested it with 2.0.7 and it does work now.