Back to basics:
Your graphics cards are driven by the X Server. The X server tries to automatically configure itself to use the available hardware, but sometimes this does not work (or does not work in the way you want it). In this case, you need to configure the X server via the xorg.conf file (see here for locations on Ubuntu, on my Debian system I put it into
/etc/X11/xorg.conf, which is the "traditional" location).
An additional complication is that the nvidia driver is closed source, and sometimes does not play nice with the rest of the X drivers.
A second complication is that the open source radeon driver conflicts with the proprietary fglrx driver, so you should remove all packages with "fglrx" in it if you have installed it.
All other software works on a level above this. So even if there is some software that allows you to configure everything through a nice GUI, if something goes wrong, you still need to go back to this level to figure out how to fix it.
1) The first thing to do when trying to debug the configuration of the X server is to look at the log file. On my system, the log file is in
/var/log/Xorg.0.log, "0" meaning the first X server (usually there is only one, but one can start several servers). The log file will tell you what drivers X tried to load, what the drivers did to initialize the cards, and if something went wrong, what went wrong and why.
So have a look at this file. If it mentions your AMD card, but there's some kind of error, you know what to look for next. If it doesn't mention the AMD card at all, then it decided by default to use only the first card, so we need an
Evertyime you make changes to the
xorg.conf and restart the server, have a look at the log file again to verify what works and what doesn't.
2) The X server is started by the display manager. The display manager for the Gnome Desktop is called
gdm, the display manager for KDE is called
kdm. Restart these from a console login to restart the X server (faster than reboot).
Your Ubuntu probably uses systemd (which I don't use), but it should be something similar to
systemctl restart gdm.service or
systemctrl restart kdm.service.
3) If you stop the display manager (
systemctrl stop instead of
restart, or boot into recovery mode), you can use
X -configure to have X create a config file for you that corresponds to the default configuration. It's not strictly necessary to do that, but it will give you an idea how the config file is structured and how the various sections will look like for your hardware.
4) The most important sections you'll need in the
xorg.conf file are two
device sections, one for each card. They should look something like
Identifier "NVIDIA Card"
Identifier "AMD Card"
This is very likely already enough, the other sections shouldn't be necessary and the defaults for those section should work. You may need a
ServerLayout section if the monitors are not layout in the way you want.
If it doesn't work, have a look at the log file and try to figure out what went wrong, and change the
xorg.conf accordingly. This is a process, and I can't describe it step by step, because I also need to see the log file to see what to do next.
The format of the
xorg.conf file together with available options is also documented in the man pages: