On Sun, Feb 19, 2023 at 09:27:33PM +0000, [email protected] wrote:
> I haven't looked into what's causing this behaviour yet because I
> was cooking
So am I :-).
> I was playing a series of flac files through mplayer (single process,
> many files) in a root shell on the text console
^^^^^^^^^^
Don't do this.
> (DISPLAY will not
> have been set, nor XAUTHORITY) and using X normally. When mplayer
> started a new track the X display acted as though a key was stuck
> down. Which key was stuck changes (it may have been related to keys
> I was pressing).
Off the top of my head, I'm guessing that mplayer is trying to open
various devices directly to display it's output on the framebuffer
console, since X is not running.
Since it's running as root, this will obviously succeed, and bad
things will happen if another process is expecting exclusive access.
Try this experiment:
* Kill X
* Log in as root on a VT
* Run:
# while true ; do dd if=/dev/wskbd0 of=/dev/null bs=512 count=1 ; sleep 1 ; done
Now try to use the machine.
You'll note that switching VTs is difficult, because pressing CTRL-ALT-Fx,
often the first keystoke gets swallowed by the dd process.
But it works if you do various dummy keystrokes, then do the CTRL-ALT-Fx
combination between invocations of the dd in the loop, (I.E. during the
one second pause).
If you run mplayer as a normal user, (who is not also logged in on ttyC0),
then the open of the device files should fail.