I am trying for some time to get xrandr commands to work at startup. For example when I try to run this command
xrandr --output HDMI2 --set "Broadcast RGB" "Full"
at startup from ~/.profile the command will actually work but I will always be presented with an error message like this one:
Error found when loading /home/usr/.profile
xrandr: Output DP1 is not disconnected but has no modes
xrandr: Output DP1 is not disconnected but has no modes
xrandr: Output HDMI1 is not disconnected but has no modes
xrandr: Output DP1 is not disconnected but has no modes
xrandr: Output DP1 is not disconnected but has no modes
xrandr: Output HDMI1 is not disconnected but has no modes
As a result the session will not be configured correctly.
You should fix this problem as soon as feasible.
I have to click "OK" to continue the startup process. From there on everything works as expected and the actual command for HDMI2 is successfully passed.
I had similar problems with other xrandr commands (change of resolution or refresh rate) before and was unable to resolve them. There is only one monitor connected to the machine (HDMI2).
Ubuntu 16.04 on Intel NUC5PPYH
Let me know if I need to provide anymore information.
Thank you for your help!