:: [DNG] Mouse won't release in Devuan…
Etusivu
Poista viesti
Vastaa
Lähettäjä: Steve Litt
Päiväys:  
Vastaanottaja: dng
Aihe: [DNG] Mouse won't release in Devuan beta 2 with Qemu
Hi all,

Fsmithred and I have put a heckofa lot of time into this, and frankly
need help from everyone who can reproduce this problem (Fsmithred
can't).

The problem is this: When you run either Refracta or Devuan Jessie
Beta 2 in a Qemu guest (on a Void Linux host), run the GUI, and click
the mouse in the guest so that the mouse is captured by the guest:

1) You cannot get the mouse pointer to go outside the guest window,
whether or not you press the ungrab hotkey.

2) Pressing the hotkey that would ordinarily get you to another
workspace on the host doesn't work.

3) As a result, your only way of using other programs on the host is to:
    a) Log out of the gui so you're confronted with the login window,
    b) Press the ungrab key combo, and c) move the mouse where you want
    it to go.



WHAT THE SYMPTOM LOOKS LIKE
---------------------------
Specifically, on Refracta and Devuan, when your guest window is not
maximized, you move your mouse pointer to an edge of the guest window
and beyond, and the pointer sticks at the edge, while the "Qemu: Press
Right Ctrl to exit grab" titlebar changes to just "Qemu". The mouse
pointer is not visible outside the guest window, nor do host hotkeys
work.

As a reminder, the way it should work (at least according to a Void
guest and a Lubuntu 16.04 guest) is you move your mouse pointer to an
edge of the guest window and beyond, and the pointer sticks at the
edge, while the "Qemu: Press Right Ctrl to exit grab" titlebar changes
to just "Qemu", BUT A SECOND MOUSE POINTER APPEARS OUTSIDE THE GUEST
WINDOW, AND HOST HOTKEYS BECOME ENABLED. Furthermore, on Lubuntu and
Void guests, pressing the ungrab hotkey enables host hotkeys to be
used, but on Refracta and Devuan it doesn't.

For the rest of this email, I'll refer to the way Void and Lubuntu
hosts work as "as expected".


DISTINCTIONS
------------
Fsmithred and I have discovered many distinctions that we hope can
narrow the root cause scope on this situation:

* This happens only when the gui is running. When Devuan is running in
CLI mode (because I disabled the lightdm daemon and didn't startx or
quit a gui started by startx), it works as expected.

* This happens only with Devuan, Refracta and Sublinux. It doesn't
happen with Lubuntu or Void. With Sublinux, you can play tricks with
the mouse and ungrab key combo to escape grab.

* This happens with a Devuan qemu guest I had from May 12, 2016. I
don't know if it was beta or alpha, and neither uname -a nor
cat /etc/issue helped me answer that question.

* This happens on Xfce, LXDE, and Openbox with Refracta (and I'd assume
Devuan Beta).

* This happens in Refracta's live CD mode. It does *not* happen during
Devuan's install process.

* In Refracta, disabling all vbox* daemons did not eliminate the
symptom.


SIGNIFICANCE
------------
I have no data as to whether this behavior occurs in a Virtualbox guest
because I've not been able to get Virtualbox working on my Void host.
Long before switching to Void, I stopped using Virtualbox because I
found it intermittent and crashy. There are probably others who aren't
good candidates for Virtualbox, so if it turns out this behavior
doesn't occur on a Virtualbox guest, that's not a "solution."

The preceding paragraph notwithstanding, trying to reproduce this
problem in Virtualbox would be a great *diagnostic test*. But a lousy
solution. I'd do it in Virtualbox myself except so far I haven't been
able to get Virtualbox running on my Void host.

In certain use cases, this situation can be a showstopper. A great deal
of distro experimentation is done in Qemu guests, and the requirement
of having to log out of GUI every time you want to switch out of a
guest is a productivity destroyer.

The point could be made that one could (presumably) get around this
problem by using ssh -Y to run guest programs from a host ssh session.
Such an ssh solution would probably work, but it requires much more
sophisticated networking in the guest, GUI programs would run noticibly
slower, and the SSH "solution" is a big departure from the typical
"quick and dirty experimental setup."

The bottom line is this: This Qemu/(Refracta|Devuan) problem is a
significant impediment to using Refracta and Devuan, and unless it
turns out I'm the only person on the planet having this problem, the
goal should be to fix it, not to suggest workarounds.


WHAT I'M ASKING FOR
-------------------
I've gone as far as I can in diagnosting this problem, given the
demands of everything else on my todo list. Fsmithred has also put in
significant time, but cannot reproduce the symptom. We need help, and
the first piece of help we need is for people to try to reproduce this
behavior. The following shellscript should do the trick:

qemu-system-x86_64 -m 4096 -hda devuan.img -boot d -ctrl-grab \
-cdrom devuan_jessie_1.0.0-beta2_amd64_CD.iso \
-vga std -enable-kvm \
-netdev user,id=mynet0 -device e1000,netdev=mynet0

In the preceding, devuan_jessie_1.0.0-beta2_amd64_CD.iso is assumed to
be in the current directory, and devuan.img is a Qemu image file
created by the following command:

qemu-img create devuan.img 8G

Note that, depending on your physical hardware and other things, you
might need to change your -vga std to -vga cirrus or -vga vmware.

Run the shellscript, install Devuan on the 8GB virtual hard disk
bestowed by devuan.img, shutdown -h now, then in the shellscript change
-boot d to -boot c, rerun the shellscript, and notice that you're now
running the installed Devuan. Click in the guest window (the one
running Devuan), open an instance of lxterminal, then move the mouse
out of the guest window. Can you click on other windows provided by
your host? If so, you are NOT experiencing the symptom. But if, no
matter how you move the mouse, you can't see a mouse pointer outside
the guest window, and you can't click on anything outside the guest
window, and your normal host system hotkeys don't work, even if you
press the ungrab key combo listed in the titlebar of the guest window,
then you're exibiting the symptom. Either way, please report back. The
more people we can get who can reproduce this symptom,the more we can
exploit differences and commonalities to narrow it down to its root
cause.

Thanks,

SteveT

Steve Litt
December 2016 featured book: Rapid Learning for the 21st Century
http://www.troubleshooters.com/rl21