Comment 11 for bug 1370953

It seems that Ubuntu uses dconf to switch layouts.

gsettings set org.gnome.desktop.input-sources current 0
gsettings set org.gnome.desktop.input-sources current 1
This operations are very slow on my system because of intensive HDD IO usage.