See xorg-server/hw/xfree86/os-support/linux/lnx_init.c xf86OpenConsole and do the same for mir. Use tcgetattr/tcsetattr to set the console parameters to IGNBRK, this should fix xorg-server. You probably also need to set KDSKBMUTE to prevent characters from being visible afterwards.
See xorg-server/ hw/xfree86/ os-support/ linux/lnx_ init.c xf86OpenConsole and do the same for mir. Use tcgetattr/tcsetattr to set the console parameters to IGNBRK, this should fix xorg-server. You probably also need to set KDSKBMUTE to prevent characters from being visible afterwards.