I've been looking for about 3 years to find a solution for working with 3 monitors with 3d hardware acceleration in ubuntu. And today I found the best solution, so I'd like to share it with you.
One possible solution is to disable twinview, run 3 seperate x-servers and combine them with Xinerama. The only problem is that compiz will not work and dragging windows from one screen to another can sometimes be buggy.
The solution I found was the next:
- Remove your old xorg.conf
- Check what the addresses are for your monitors (You can check them in the NVIDIA X Server Settings), it should look like GPU-*.DFP-*
- Run the following command from a terminal:
In here you need to set the correct resolutions and positionings. (I had to start with position +0+0, otherwise it went wrong and my left monitor got cloned to my middle monitor)Code:sudo nvidia-xconfig --base-mosaic --metamodes="GPU-1.DFP-2: 1680x1050+0+0, GPU-0.DFP-0: 1920x1080+1680+0, GPU-0.DFP-2: 1680x1050+3600+0"
- If you restart X now, everything will be working, but the screen has lots of lag (3 seconds in my case) which is pretty annoying.
To fix the lag, you need to set a parameter in Grub2
- Edit /etc/default/grub
Code:sudo vi /etc/default/grub
- Look for GRUB_CMDLINE_LINUX_DEFAULT=
- Add "iommu=pt" to the string after the variable
It will look like:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash iommu=pt"
- Now save the file and update your grub
- Now all you have to do is restart your machine and everything should be working!
I hope I can help a lot of people with this solution. Let me know in the comments below if you have any problems.