Non-default resolution for mir-kiosk

Hi there,

I’m working on a piece of hardware (a small x86_64 server) which has an integrated 4.8" touch screen and trying to run mir-kiosk + chromium-mir-kiosk on it.
Unfortunately its native resolution is 800x480 and this particular resolution is not present while probing the driver (partial logs from mir-kiosk):

DisplayPort-2:
# This output supports the following modes: 1024x768@60.0, 1920x1080@60.0,
# 1600x1200@60.0, 1680x1050@60.0, 1280x1024@75.0, 1280x1024@60.0, 1440x900@59.9,
# 1280x960@60.0, 1152x864@75.0, 1024x768@75.0, 1024x768@70.1, 832x624@74.5,
# 800x600@75.0, 800x600@72.2, 800x600@60.3, 800x600@56.2, 640x480@75.0,
# 640x480@72.8, 640x480@66.7, 640x480@59.9, 720x400@70.1

I’ve tried to manually put proper mode in miral-kiosk.display configuration file but all I got was just a warning:

< -warning- > miral: Display config contains unmatched mode: '800x480@60.0'

For “normal” Ubuntu I successfully used xrandr + gtf combo:

xrandr --newmode $(gtf 800 480 60 | grep Modeline | sed "s/^.*Modeline[^\"]\+//")
xrandr --addmode DP-2 "800x480_60.00"
xrandr --output DP-2 --mode "800x480_60.00"

Unfortunately I have no idea if something similar is possible for mir-kiosk :thinking:

Mir only supports the modes & resolutions advertised by the driver. Currently there’s no “faking” of other modes.

Do you think is there any way to inject these xrandr commands into the mir-kiosk source and re-compile it, or is it “dead end”?

Is this the driver not picking up the mode from the screen? I mentioned a similar problem and how I work around it here: Mir News: 5th April 2019

Thanks for advice.
Unfortunately the problem is slightly different. Monitor returns wrong EDID.

You’ll have to experiment, but there’s an “hdmi_ignore_edid” option: https://www.raspberrypi.org/documentation/configuration/config-txt/video.md

Thanks, I know, but it works on x86 and regular ubuntu server :wink:

Anyway, done. Ufff… I had to generate new EDID file with proper resolution and passed it to kernel during boot. It’s not related to Mir/Kiosk so I won’t spam with the procedure here (unless someone would be interested).

Does it work with the core16 image? (My display does, it’s just core18/RPi3 that has a problem with it.)

I’ve got just mir-kiosk and chromium-mir-kiosk working on ubuntu server, that’s it. There are core and core18 snaps installed as well.
My problem was not related to mir-kiosk (well, maybe a little bit as it’s impossible to create non-standard resolution as for regular X using xrandr). The main issue is that the touchscreen does not provide a proper EDID (firmware :thinking: ?) with parameters like resolution and refresh rate.
So if I couldn’t make mir-kiosk working as I wanted, I had to focus on kernel and driver instead.