To issue X commands from vt1, you need to specify the display. E.g.:
DISPLAY=:0 xrandr --auto
The monitors.xml config file is what GNOME uses to set up your multihead layout, however it's unlikely to be the source of your trouble. Theoretically deleting it and rebooting would force GNOME to go back to its defaults, if it was a bug in the GNOME config tool.
/etc/X11/xorg.conf
is what X uses to configure itself. With your Intel HD graphics system you shouldn't need an xorg.conf at all; if there is one present, you can try deleting it and rebooting. But I don't think that's the source of your trouble either.
I don't think your .dmrc is relevant. You could test going into a guest session and see if you can reproduce it there; if you can then it's not going to be any of your user config files.
Beyond that, there's a variety of things that can cause this, but without seeing some logs or more test results it's hard to guess what it could be.
With Intel video cards, only two of your outputs can be live at one time. Especially with these newer systems they have a lot more than two possible outputs (HDMI, DVI, VGA, LVDS, ...) and there are various ways the linux kernel can get confused and hook up to the wrong thing. Sometimes it's a bit of a race condition what outputs get enabled. Some of the outputs that the video card is capable of aren't even hooked up to a physical port on your computer.
If the system were in front of me, the things I'd start looking at would be xrandr
to see what possible outputs were present and what ones X thinks are connected. Next I'd enable graphics debugging (sudo xdiagnose
, first option), and then reboot and study dmesg from with and without the problem to see how the kernel was picking which outputs to turn on.
Hopefully that gets you on a productive path. Blank screen bugs can be caused by a lot of different things and it's hard to diagnose it merely based on symptoms, but the above steps should get you far enough into the problem that it'll become diagnosable.
sudo apt-get update && sudo apt-get dist-upgrade && sudo shutdown -r now
Plug the cable on the display, open a terminal, type:
tail -f /var/log/{messages,kernel,dmesg,syslog}
Plug the cable to the ultra book and see if you get some sort of output.
just to see if the cable works.
sudo apt-get install arandr
Use arandr
to set the output.
Best Answer
Here's my permanent solution to the problem, which required I install:
sudo apt install gnome-session-wayland
Once installed, reboot. When at the login screen, a cog should be visible beside the 'Sign In' button. Click on the cog and choose from a selection of desktop environments. I had four:
The two environments in bold supported the external monitor without any problems.
It seems that Wayland is necessary for my external monitor to be recognised.
This became apparent when preventing gdm3 from using Wayland caused my login screen to fail, when it had previously displayed properly.
From there I was able to find what package was necessary to use Wayland on the Desktop, which resulted in the fix described above.
More information on Wayland and Xorg is available here.