Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Desktop Environments
  • Search

[SOLVED] qemu - mouse/keyboard not working

Problems with GUI applications? Questions about X, KDE, Gnome, Fluxbox, etc.? Come on in. NOTE: For multimedia, go up one forum
Post Reply
Advanced search
6 posts • Page 1 of 1
Author
Message
eleanor
l33t
l33t
User avatar
Posts: 666
Joined: Mon Nov 01, 2004 4:23 am

[SOLVED] qemu - mouse/keyboard not working

  • Quote

Post by eleanor » Sun Oct 20, 2013 9:53 pm

Hi,

I compiled KVM support into my kernel and installed qemu and virt-manager. When creating VM in virt-manager I'm able to start it, which looks like this (it's also very slow):

http://shrani.si/f/v/wb/3cjyZPfY/qemu2.png

Sometimes only this is displayed:

http://shrani.si/f/38/WW/3RGKaFBc/qemu3.png

After that when the VM grabs my mouse, I cannot use mouse or keyboard; they just don't work. They work only if I make a change, close the window, reopen the window, which is a nightmare, because they don't work in real-time.

I'm not sure what's wrong but I sure do need help. Let me also present the used USE flags:
# equery uses app-emulation/virt-manager
- - debug : Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see
+ + gnome-keyring : Enable support for storing passwords via gnome-keyring
- - policykit : Enables sys-auth/polkit authentication support, required when using app-emulation/libvirt with PolicyKit authentication
- - python_single_target_python2_6 : Build for Python 2.6 only
+ + python_single_target_python2_7 : Build for Python 2.7 only
- - python_targets_python2_6 : Build with Python 2.6
+ + python_targets_python2_7 : Build with Python 2.7
- - sasl : Depend on the proper libraries needed to connect to SASL-enabled libvirtd instances (e.g. Kerberos-protected instances).

# equery uses qemu
- - accessibility : Adds support for braille displays using brltty
+ + aio : Enables support for Linux's Async IO
+ + alsa : Enable alsa output for sound emulation
- - bluetooth : Enable Bluetooth Support
+ + caps : Use Linux capabilities library to control privilege
+ + curl : Support ISOs / -cdrom directives vis HTTP or HTTPS.
- - debug : Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see
http://www.gentoo.org/proj/en/qa/backtraces.xml
- - fdt : Enables firmware device tree support
+ + filecaps : Use Linux file capabilities to control privilege rather than set*id
+ + gtk : Add support for x11-libs/gtk+ (The GIMP Toolkit)
- - iscsi : Enable direct iSCSI support via net-libs/libiscsi instead of indirectly via the Linux block layer that sys-block/open-iscsi does.
+ + jpeg : Enable jpeg image support for the VNC console server
- - mixemu : Enable audio mixer emulation. On Fedora, known to cause performance problems when using SDL output and ALSA. For OSS, locks the sound device from other applications.
+ + ncurses : Enable the ncurses-based console
- - opengl : Add support for OpenGL (3D graphics)
+ + png : Enable png image support for the VNC console server
+ + pulseaudio : Enable pulseaudio output for sound emulation
+ + python : Add optional support/bindings for the Python language
- - python_targets_python2_6 : Build with Python 2.6
+ + python_targets_python2_7 : Build with Python 2.7
- - qemu_softmmu_targets_alpha : system emulation target
- - qemu_softmmu_targets_arm : system emulation target
- - qemu_softmmu_targets_cris : system emulation target
+ + qemu_softmmu_targets_i386 : system emulation target
- - qemu_softmmu_targets_lm32 : LatticeMico32 system emulation target
- - qemu_softmmu_targets_m68k : system emulation target
- - qemu_softmmu_targets_microblaze : system emulation target
- - qemu_softmmu_targets_microblazeel : system emulation target
- - qemu_softmmu_targets_mips : system emulation target
- - qemu_softmmu_targets_mips64 : system emulation target
- - qemu_softmmu_targets_mips64el : system emulation target
- - qemu_softmmu_targets_mipsel : system emulation target
- - qemu_softmmu_targets_moxie : moxielogic system emulation target
- - qemu_softmmu_targets_or32 : OpenRISC system emulation target
+ + qemu_softmmu_targets_ppc : system emulation target
+ + qemu_softmmu_targets_ppc64 : system emulation target
- - qemu_softmmu_targets_ppcemb : system emulation target [81/351]
- - qemu_softmmu_targets_s390x : system emulation target
- - qemu_softmmu_targets_sh4 : system emulation target
- - qemu_softmmu_targets_sh4eb : system emulation target
- - qemu_softmmu_targets_sparc : system emulation target
- - qemu_softmmu_targets_sparc64 : system emulation target
- - qemu_softmmu_targets_unicore32 : system emulation target
+ + qemu_softmmu_targets_x86_64 : system emulation target
- - qemu_softmmu_targets_xtensa : system emulation target
- - qemu_softmmu_targets_xtensaeb : system emulation target
- - qemu_user_targets_alpha : userspace emulation target
+ + qemu_user_targets_arm : userspace emulation target
- - qemu_user_targets_armeb : userspace emulation target
- - qemu_user_targets_cris : userspace emulation target
+ + qemu_user_targets_i386 : userspace emulation target
- - qemu_user_targets_m68k : userspace emulation target
- - qemu_user_targets_microblaze : userspace emulation target
- - qemu_user_targets_microblazeel : userspace emulation target
- - qemu_user_targets_mips : userspace emulation target
- - qemu_user_targets_mips64 : userspace emulation target
- - qemu_user_targets_mips64el : userspace emulation target
- - qemu_user_targets_mipsel : userspace emulation target
- - qemu_user_targets_mipsn32 : MIPS N32 ABI userspace emulation target
- - qemu_user_targets_mipsn32el : MIPS N32 ABI LE userspace emulation target
- - qemu_user_targets_or32 : OpenRISC userspace emulation target
- - qemu_user_targets_ppc : userspace emulation target
- - qemu_user_targets_ppc64 : userspace emulation target
- - qemu_user_targets_ppc64abi32 : userspace emulation target
- - qemu_user_targets_s390x : userspace emulation target
- - qemu_user_targets_sh4 : userspace emulation target
- - qemu_user_targets_sh4eb : userspace emulation target
- - qemu_user_targets_sparc : userspace emulation target
- - qemu_user_targets_sparc32plus : userspace emulation target
- - qemu_user_targets_sparc64 : userspace emulation target
- - qemu_user_targets_unicore32 : userspace emulation target
+ + qemu_user_targets_x86_64 : userspace emulation target
- - rbd : Enable rados block device backend support, see http://ceph.newdream.net/wiki/QEMU-RBD
- - sasl : Add support for the Simple Authentication and Security Layer
- - sdl : Enable the SDL-based console
+ + seccomp : Utilize sys-libs/libseccomp to enable kernel filtering of system calls to prevent malicious guests from doing damage.
- - smartcard : Enable smartcard support
+ + spice : Enable Spice protocol support via app-emulation/spice
- - static : Enables both 'static-softmmu' and 'static-user'
- - static-softmmu : Builds the Software MMU (system) targets as static binaries
- - static-user : Build the User targets as static binaries
- - systemtap : Enable SystemTAP/DTrace tracing
- - tci : Enable the TCG Interpreter which can speed up or slowdown workloads depending on the host and guest CPUs being emulated. In the future it
will be a runtime option but for now its compile time.
- - test : Workaround to pull in packages needed to run with FEATURES=test. Portage-2.1.2 handles this internally, so don't set it in
make.conf/package.use anymore
+ + threads : Add threads support for various packages. Usually pthreads
- - tls : Enable TLS support for the VNC console server. For 1.4 and newer this also enables WebSocket support.
- - usbredir : Use sys-apps/usbredir to redirect USB devices to another machine over TCP
+ + uuid : Enable UUID support in the vdi block driver
- - vde : Enable VDE-based networking
+ + vhost-net : Enable accelerated networking using vhost-net, see http://www.linux-kvm.org/page/VhostNet
- - virtfs : Enable VirtFS via virtio-9p-pci / fsdev. See http://wiki.qemu.org/Documentation/9psetup
+ + vnc : Enable VNC (remote desktop viewer) support
+ + xattr : Add support for getting and setting POSIX extended attributes, through sys-apps/attr. Requisite for the virtfs backend.
- - xen : Enables support for Xen backends
+ + xfs : Support xfsctl() notification and syncing for XFS backed virtual disks.

I aslo have to mention that I'm running hardened gentoo.

I appreciate any ideas.

Thank you
Last edited by eleanor on Tue Oct 22, 2013 7:21 pm, edited 1 time in total.
Top
eccerr0r
Watchman
Watchman
Posts: 10239
Joined: Thu Jul 01, 2004 6:51 pm
Location: almost Mile High in the USA
Contact:
Contact eccerr0r
Website

  • Quote

Post by eccerr0r » Sun Oct 20, 2013 11:29 pm

I thought virt-manager put in a warning... hitting control and alt at the same time (without any other button) will release the focus of the window. Is this the problem you were having?

I think the control-alt thing is fairly common in a lot of virtual machines and emulators.

I found that my virtual machines with QEMU/KVM are faster than half native speed. However disk i/o is awful and I haven't figured out why (it may be bad interaction with the RAID I'm running on).
Intel Core i7 2700K/Radeon Firepro W2100/24GB DDR3/800GB SSD
What am I supposed watching?
Top
eleanor
l33t
l33t
User avatar
Posts: 666
Joined: Mon Nov 01, 2004 4:23 am

  • Quote

Post by eleanor » Mon Oct 21, 2013 6:49 am

Hi,

I don't have the problem of virt-manager not releasing the focus: I know I can release it with ctrl+alt. The problem is that after grabbing the focus, I cannot use mouse+keyboard in a guest VM not the host. The mouse/keyboard only work if the VM grabs focus, then I press the key, then I close the VM window and reopen it (only after that the keyboard press was detected).


I believe the problem is the display of the VM not being updated. This would mean the the following settings are wrong:

http://shrani.si/f/35/FS/3BRRwhj2/qemu4.png

http://shrani.si/f/2R/Kq/uMUuNky/qemu5.png

There is a service running on port 5900, so the connection occurs, but I still don't think it's actually working.
tcp 0 0 127.0.0.1:5900 0.0.0.0:* LISTEN 5489/qemu-system-x8
It is as the screen was not updated to display the change in mouse arrow or press of a button. What can cause this?
Top
eccerr0r
Watchman
Watchman
Posts: 10239
Joined: Thu Jul 01, 2004 6:51 pm
Location: almost Mile High in the USA
Contact:
Contact eccerr0r
Website

  • Quote

Post by eccerr0r » Mon Oct 21, 2013 4:06 pm

Hmm, then I've never seen this problem you're having, it seemed to have worked fine out of the box - granted I was using VNC at first instead of SPICE.

But SPICE works fine too.

What are your use flags for qemu, libvirt, and virt-manager? Did you try re-emerging all of them?

Tried VNC instead of SPICE?

(bleah, I hate SPICE, wish they chose another name for it... name conflicts with this other piece of software that I'm more familiar with...)
Intel Core i7 2700K/Radeon Firepro W2100/24GB DDR3/800GB SSD
What am I supposed watching?
Top
eleanor
l33t
l33t
User avatar
Posts: 666
Joined: Mon Nov 01, 2004 4:23 am

  • Quote

Post by eleanor » Tue Oct 22, 2013 7:20 pm

The following solved it:

Code: Select all

# paxctl-ng -m /usr/bin/qemu-system-x86_64
After that I can run and interact with VMs normally.
Top
dyatel15
n00b
n00b
User avatar
Posts: 20
Joined: Tue Mar 14, 2006 10:03 pm

  • Quote

Post by dyatel15 » Sat Oct 26, 2013 3:25 am

eleanor wrote:The following solved it:

Code: Select all

# paxctl-ng -m /usr/bin/qemu-system-x86_64
After that I can run and interact with VMs normally.
That helped me too. Thank you!

But I found a better way fixing it, it's in RH faq:
http://www.linux-kvm.org/page/FAQ#When_ ... do_I_do.3F

"-usb -usbdevice tablet"
Top
Post Reply

6 posts • Page 1 of 1

Return to “Desktop Environments”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic