SOLVED - how to force rpi to boot into 1080p even if TV is OFF?

Hi, id like to know HOW to force rpi to boot into 1080p even if TV is OFF ?

my problem is:

if the TV is off during boot, pi boots into this:
osmc@osmc:~$ tvservice -s
state 0x40001 [NTSC 4:3], 720x480 @ 60.00Hz, interlaced

and when i turn on the TV, KODI is also in that resolution.

BUT

if the TV is on during boot, pi boots into this:
osmc@osmc:~$ tvservice -s
state 0x12001a [HDMI CEA (16) RGB lim 16:9], 1920x1080 @ 60.00Hz, progressive

pi also stays in good resolution (1080p) if it was booted with tv on, and i turn the tv off and then back on.
wrong resolution only happens when boot is with tv off.

i need to reboot my pi occasionally via ssh and this cases the tv is off obviously , and when i get back home and turn on the tv, i get this low resolution and i have to reboot again with tv on.

is there any solution for this inconvenient ?

Thank you.

ps: i was not able to force pi to boot into 1080p in config.txt setting when the tv is off with this:
hdmi_group=1
hdmi_mode=16

From http://elinux.org/RPiconfig#Which_values_are_valid_for_my_monitor.3F

Set the output format to VGA 60 Hz (hdmi_group=1 hdmi_mode=1) and boot up the Raspberry Pi

sudo tvservice -d /boot/edid.dat

Then add to config.txt -

hdmi_edid_file=1
hdmi_force_hotplug=1

Thank you

i used like this:
hdmi_group=1
hdmi_mode=16

then

tvservice -d /boot/edid.dat

then

hdmi_edid_file=1
hdmi_force_hotplug=1

now it boots into 1080p even if the tv is off.

Thank you.

suggestion: should be part of osmc settings in the future?

I’m pretty sure it’s already in the settings app Settings>PiConfig>Display>store hdmi to file

Yes youre right