What you are trying--and which desktop you are using--is vague here. There are specific things to try, but I cannot tell what you are trying. My desktop environment is XFCE4 on Ubuntu 17.10 running the X11-based display. Not Wayland.
I have Dell Precision 5510 and a brand new USB-C dock. On the Dock itself, there are HDMI and DisplayPort jacks. I can get 3 monitors going if you count the laptop display and the 2 monitors. I have used 3 external successfully when they are plugged into separate jacks, not in a USB-C dock. I'm pretty sure you can get 2 external working via the usb-c, I suggest you try with that. Then worry about 3rd.
Here are things to try. Let us know what you see.
In terminal, run
xrandr --listmonitors
to find out if system really does see monitors. You can run xrandr to get a much more verbose listing. Right now, I'm not connected, and end of xrandr output is:
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
HDMI-2 disconnected (normal left inverted right x axis y axis)
If you see that, then 4 monitors would be possible. Right now, I have removed the nvidia proprietary drivers and I still do have success with 2 external monitors via the dock. I expect you can too.
However, configuring will be a problem. Even if system notices your monitors, it will not use them until you configure them. You could try CLI with xrandr, but I don't do that too often anymore. It is easier if you use the GUI for this. My favorite is "arandr", which has worked great for 3 years, until last week it failed to recognize the resolutions. I have no idea what broke it.
If arandr fails, there is a much improved program called Display in the XFCE4 settings. I believe it is adapted from the Gnome project, possible your desktop has it, or similar. It lists detected monitors. You click a button "active" separately for each one, it shows them in a tiny rectangle, and you can move them about in the screen to place them left and right. If your dock is like mine, those monitors will not work until you activate.
If (IF) you are using the NVIDIA proprietary drivers for X11, run the
nvidia-settings
program. You'll see what monitors it can detect. You'll see that you cannot get all 4 monitors in one X11 session, but you can get a pairs connected with each other. You will probably not be able to drag a window across all 3 monitors. nvidia-settings will offer to re-write /etc/X11/xorg.conf for you. Make sure you have a copy of the old one before saying yes. At one time (say 2010), I was knee deep in settings for Xinerama and Nvidia Twinview. If you start bumping up against very fine grained video configurations, take a step back. It is still possible to do that stuff, but the whole push in X11 setup is to let users ignore it.
I am a little distrustful of the USB-C device you have. Unless you know for sure it works with your computer, it may be trouble. I got this computer May, 2016, and tried to order a dock. Dell said "our dock does not work, you can't buy one." I waited until Nov 2017 to get one because that was the first time the firmware was compatible with Ubuntu Linux. It mostly works now, but not always. The USB poops out about 10% of the time and I have to unplug everything. If a monitor powers down to save power, the laptop often cannot wake it up through the usb dock.
If you try and need more help, write back with more information, including what kind of dock this is, the xrandr output, and which video driver you are using, It really is a different game if you run the Nvidia proprietary driver.
Oh, if you are in Ubuntu 17.10 with Wayland as graphic environment, then I have nothing to say. I'm avoiding it.
Best Answer
Good question. A bit tricky to answer, but here is a try.
Basic Answer
There is actually a little reset possiblity included in X11. You can find it at
/etc/X11/Xreset
. You could use the Xreset directory (Xreset.d
) to paste a script that runs automatically when a user logs out. The README file:You could thus a) add a reset script in
/etc/X11/Xreset.d
and b) make a script attached to a launcher that sets your dual external displays up. As such, you would log off and everything would be back to normal, you would log on to your laptop, hit the launcher for the displays and enjoy life.More information
You might want to look into
sudo dpkg-reconfigure -phigh xserver-xorg
for resetting the xserver or (probably better look at the answer Mik suggested in the comments).A SuSE guy wrote a nice article about X.
In a solved bugreport someone states:
This is the contents of the file:
You can find it on your own system.