Setting resolution on xinitrc


I have a situation where I have 4 displays connected and I need to set their order & resolutions when x starts. The displays are connected to a hdmi-switcher with PIP support.

I get the correct resolution & order after starting x and running

xrandr --output HDMI-A-0 --primary --mode 1920x1080 --rate 60.00 --output HDMI-A-1 --mode 1920x1080 --rate 60.00 --right-of HDMI-A-0 --output Displayport-2 --mode 1920x1080 --rate 60.00 --right-of HDMI-A-1 --output Displayport-3 --mode 1920x1080 --rate 60.00 --right-of Displayport-2

But when I add the config to .xinitrc (also tried .xprofile) the resolution goes to 1280x720, same as without configuration as the hdmi mixer doesnt provide proper resolution information.

If I use 4 displays directly then the resolution goes to fullhd as it should without any configurations.

What I have in .xinitrc is basically:
exec xrandrd … &
exec gnome-session

And in another topic, is there an alternative to unclutter (for hiding mouse), couldnt find that in any packages.

Thanks for help!