I experience this bug on Raspbian, but not Arch. I don't have an Ubuntu system, but here is an easy way to reproduce it in software, which may be helpful:
$ setxkbmap us basic
$ setxkbmap us dvorak
$ sudo udevadm trigger
$ aoeuaoeusdfasdfasdf
You can see that half-way through typing the last line, the layout changes.
I experience this bug on Raspbian, but not Arch. I don't have an Ubuntu system, but here is an easy way to reproduce it in software, which may be helpful:
$ setxkbmap us basic
$ setxkbmap us dvorak
$ sudo udevadm trigger
$ aoeuaoeusdfasdfasdf
You can see that half-way through typing the last line, the layout changes.