Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(virt-manager:75950): GSpice-CRITICAL **: 13:08:42.543: send_key: assertion 'scancode != 0' failed #135

Closed
wililupy opened this issue Aug 19, 2019 · 14 comments

Comments

@wililupy
Copy link

Hello,

I succesfully installed virt-manager and virt-viewer using your instructions on my Mac Pro running 10.14.6.

I can connect to my kvm servers using the -c qemu+ssh://username@kvmhost/system?socket=/var/run/libvirt/libvirt-sock

But when I try to enter any key input, for example, username or password to login, the terminal output reports the following after every keypress on my keyboard:

(virt-manager:75950): GSpice-CRITICAL **: 13:08:42.543: send_key: assertion 'scancode != 0' failed

Not quite sure how to fix this issue or if anyone else has a workaround to make it so that I can pass keyboard input to the vm. Mouse clicks and interactions do work on the vm.

@ghost
Copy link

ghost commented Aug 20, 2019

I can reproduce this on a MacBookPro15,2, running 10.14.6

@LouAlbano
Copy link

LouAlbano commented Aug 20, 2019

I also am seeing this error.

MacBookPro11,3, 10.14.6
gtk+3 3.24.10

I also uninstalled and reinstalled:

brew uninstall --force --ignore-dependencies gtk+3 libvirt-glib gtk-vnc spice-gtk libvirt pygobject3 virt-manager virt-viewer && brew install virt-manager virt-viewer

This error happens right when running virt-manager:

(virt-manager:23585): vnc-keymap-WARNING **: 10:40:52.618: Unsupported GDK Windowing platform.
Disabling extended keycode tables.
Please report to [email protected]
including the following information:

  - Operating system
  - GDK Windowing system build

@jeffmahoney
Copy link

This is an issue in upstream gtk. It's fixed in the 3.24 branch (but not tagged for release) by https://gitlab.gnome.org/GNOME/gtk/commit/ff21730d8e582ec7e60950771c4f8e4f9bbf82a1

commit ff21730d8e582ec7e60950771c4f8e4f9bbf82a1
Author: Jeremy Tan [email protected]
Date: Sat Jul 20 15:10:34 2019 +0800

Fix gdkconfig.h generation for GDK_WINDOWING_QUARTZ

That patch needs to be pulled into the gtk+3 Homebrew project and gtk-spice needs to be rebuilt using that. I've done this locally and it works again.

@jeffmahoney
Copy link

Sorry, spice-gtk. The gist is that it has behavior around keyboard input that depends on that #define existing. Without it, the keymap isn't referenced and you get the scancode !=0 assertion failure: https://gitlab.freedesktop.org/spice/spice-gtk/blob/master/src/vncdisplaykeymap.c#L211

@jeffmahoney
Copy link

I've put together a pull request to fix this in Homebrew:

Homebrew/homebrew-core#43331

If you want to fix this yourself locally, grab https://github.com/Homebrew/homebrew-core/blob/847a22f5008f297f584497f7166b2e31333831af/Formula/gtk%2B3.rb from that PR and do:
brew reinstall --build-from-source gtk+3.rb
brew reinstall --build-from-source spice-gtk

... and you should be set. This isn't a bug in virt-manager (or the packaging of it for Homebrew), so you don't need to rebuild/reinstall.

@AleksovAnry
Copy link

AleksovAnry commented Aug 25, 2019

Unfortunately this fix not help. After reinstalling gtk+3.rb, brew reinstall --build-from-source spice-gtk ask to uninstall gtk+3.rb. Any solutions tested, but keyboard still not work...

(remote-viewer:26124): virt-viewer-DEBUG: 00:24:24.980: Opening display to /Users/set_ws/Downloads/console.vv

(remote-viewer:26124): virt-viewer-DEBUG: 00:24:24.981: Guest (null) has a spice display
(remote-viewer:26124): virt-viewer-DEBUG: 00:24:24.988: After open connection callback fd=-1
(remote-viewer:26124): virt-viewer-DEBUG: 00:24:24.988: Opening connection to display at /Users/set_ws/Downloads/console.vv
(remote-viewer:26124): virt-viewer-DEBUG: 00:24:24.990: fullscreen display 0: 0
(remote-viewer:26124): virt-viewer-DEBUG: 00:24:24.990: app is not in full screen
(remote-viewer:26124): virt-viewer-DEBUG: 00:24:24.991: New spice channel 0x7f9d0b0a8390 SpiceMainChannel 0
(remote-viewer:26124): virt-viewer-DEBUG: 00:24:24.991: notebook show status 0x7f9d0b804280
(remote-viewer:26124): virt-viewer-DEBUG: 00:24:25.388: main channel: opened
(remote-viewer:26124): virt-viewer-DEBUG: 00:24:25.388: notebook show status 0x7f9d0b804280
(remote-viewer:26124): virt-viewer-DEBUG: 00:24:25.390: virt_viewer_app_set_uuid_string: UUID changed to f4048a8f-58a4-4b0c-8639-2e572776d803
(remote-viewer:26124): virt-viewer-DEBUG: 00:24:25.390: app is not in full screen
(remote-viewer:26124): virt-viewer-DEBUG: 00:24:25.394: app is not in full screen
(remote-viewer:26124): virt-viewer-DEBUG: 00:24:25.394: New spice channel 0x7f9d0b88e390 SpiceUsbredirChannel 3
(remote-viewer:26124): virt-viewer-DEBUG: 00:24:25.394: new usbredir channel
(remote-viewer:26124): virt-viewer-DEBUG: 00:24:25.394: New spice channel 0x7f9d0b88e5b0 SpiceUsbredirChannel 2
(remote-viewer:26124): virt-viewer-DEBUG: 00:24:25.394: new usbredir channel
(remote-viewer:26124): virt-viewer-DEBUG: 00:24:25.394: New spice channel 0x7f9d0b88e7d0 SpiceUsbredirChannel 1
(remote-viewer:26124): virt-viewer-DEBUG: 00:24:25.394: new usbredir channel
(remote-viewer:26124): virt-viewer-DEBUG: 00:24:25.395: New spice channel 0x7f9d0b88e9f0 SpiceUsbredirChannel 0
(remote-viewer:26124): virt-viewer-DEBUG: 00:24:25.395: new usbredir channel
(remote-viewer:26124): virt-viewer-DEBUG: 00:24:25.395: New spice channel 0x7f9d0b892290 SpiceRecordChannel 0
(remote-viewer:26124): virt-viewer-DEBUG: 00:24:25.395: New spice channel 0x7f9d0b8924a0 SpicePlaybackChannel 0
(remote-viewer:26124): virt-viewer-DEBUG: 00:24:25.395: new audio channel
(remote-viewer:26124): virt-viewer-DEBUG: 00:24:25.411: New spice channel 0x7f9d0b8044e0 SpiceDisplayChannel 0
(remote-viewer:26124): virt-viewer-DEBUG: 00:24:25.411: New spice channel 0x7f9d0b9c81d0 SpiceCursorChannel 0
(remote-viewer:26124): virt-viewer-DEBUG: 00:24:25.411: New spice channel 0x7f9d0b9c83d0 SpiceInputsChannel 0
(remote-viewer:26124): virt-viewer-DEBUG: 00:24:25.411: new inputs channel
(remote-viewer:26124): virt-viewer-DEBUG: 00:24:25.586: creating spice display (#:0)
(remote-viewer:26124): virt-viewer-DEBUG: 00:24:25.586: Insert display 0 0x7f9d0a0059e0
(remote-viewer:26124): virt-viewer-DEBUG: 00:24:25.795: Found a window without a display, reusing for display #0
(remote-viewer:26124): virt-viewer-DEBUG: 00:24:25.796: notebook show display 0x7f9d0b804280

(remote-viewer:26124): vnc-keymap-WARNING **: 00:24:25.796: Unsupported GDK Windowing platform.
Disabling extended keycode tables.
Please report to [email protected]
including the following information:

  • Operating system
  • GDK Windowing system build

(remote-viewer:26124): virt-viewer-DEBUG: 00:24:25.798: Allocated 1920x1080
(remote-viewer:26124): virt-viewer-DEBUG: 00:24:25.798: Child allocate 1920x1080

(remote-viewer:26124): GSpice-WARNING **: 00:24:27.154: Warning no automount-inhibiting implementation available
(remote-viewer:26124): virt-viewer-DEBUG: 00:24:27.156: Allocated 1920x1080
(remote-viewer:26124): virt-viewer-DEBUG: 00:24:27.156: Child allocate 1920x1080

(remote-viewer:26124): GSpice-CRITICAL **: 00:24:31.927: send_key: assertion 'scancode != 0' failed

(remote-viewer:26124): GSpice-CRITICAL **: 00:24:32.084: send_key: assertion 'scancode != 0' failed

@jeffmahoney
Copy link

I don't know enough about homebrew to know why it wanted to replace gtk+3 after you built it yourself. The fix in GTK+ is the fix for this issue. I've been using it since shortly before posting it here. The log above just shows that the fix isn't applied, which is no surprise if it wanted to use the downloaded gtk+3 again.

@AleksovAnry
Copy link

I download gtk+3.rb using link above and try to apply 2 steps again. Maybe I'm doing something wrong?

brew reinstall --build-from-source gtk+3.rb
==> Reinstalling gtk+3
==> Downloading https://download.gnome.org/sources/gtk+/3.24/gtk+-3.24.10.tar.xz
Already downloaded: /Users/set_ws/Library/Caches/Homebrew/downloads/36c3e83c9911abee8de48fefe0ee45f4bdde3199c5f843bb4fbb22f32d2266f0--gtk -3.24.10.tar.xz
==> Patching
patching file libgail-util/meson.build
patching file meson.build
patching file gdk/gdkconfig.h.meson
patching file gdk/meson.build
patching file gtk/meson.build
patch unexpectedly ends in middle of line
Hunk #1 succeeded at 899 with fuzz 1.
==> meson --prefix=/usr/local/Cellar/gtk+3/3.24.10_1 -Dx11_backend=false -Dquartz_backend=true -Dgtk_doc=false -Dman=true -Dintrospection=true ..
==> ninja -v
==> ninja install -v
==> /usr/local/opt/glib/bin/glib-compile-schemas /usr/local/share/glib-2.0/schemas
==> /usr/local/Cellar/gtk+3/3.24.10_1/bin/gtk3-update-icon-cache -f -t /usr/local/share/icons/hicolor
🍺 /usr/local/Cellar/gtk+3/3.24.10_1: 709 files, 51.6MB, built in 1 minute 52 seconds
brew reinstall --build-from-source spice-gtk
==> Reinstalling spice-gtk
==> Installing dependencies for spice-gtk: gtk+3
Error: gtk+3 is already installed from !
Please brew uninstall gtk+3 first."

@starkovv
Copy link

+1

@jhenrard
Copy link

jhenrard commented Sep 4, 2019

I'm having the same issue as AleksovAnry and wondering if I'm applying the patch correctly. How do I apply it?

@jeffreywildman
Copy link
Owner

This patch referenced by @jeffmahoney was merged into gtk+3 and included in 3.24.11 which is now available in homebrew-core. There shouldn't be a need to rebuild gtk+3 anymore. brew cleanup gtk+3 may be needed to remove the old version, followed by brew reinstall spice-gtk.

@AleksovAnry
Copy link

AleksovAnry commented Sep 5, 2019

Patch not helps :( I reinstall ALL and it still returns error
(remote-viewer:28718): GSpice-CRITICAL **: 11:58:00.093: send_key: assertion 'scancode != 0' failed

Info:

gtk+3: stable 3.24.11 (bottled) Toolkit for creating graphical user interfaces https://gtk.org/ /usr/local/Cellar/gtk+3/3.24.11 (710 files, 51.7MB) * Poured from bottle on 2019-09-05 at 11:31:35 From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/gtk+3.rb ==> Dependencies Build: docbook ✔, docbook-xsl ✔, gobject-introspection ✔, meson ✔, ninja ✔, pkg-config ✔ Required: atk ✔, gdk-pixbuf ✔, glib ✔, gsettings-desktop-schemas ✔, hicolor-icon-theme ✔, libepoxy ✔, pango ✔ ==> Analytics install: 13,179 (30 days), 52,458 (90 days), 185,728 (365 days) install_on_request: 2,830 (30 days), 11,081 (90 days), 38,218 (365 days) build_error: 0 (30 days)

jeffreywildman/virt-manager/virt-viewer: stable 8.0 App for virtualized guest interaction https://virt-manager.org/ /usr/local/Cellar/virt-viewer/8.0 (117 files, 1.5MB) * Built from source on 2019-09-05 at 11:50:59 /usr/local/Cellar/virt-viewer/8.0.reinstall (117 files, 1.5MB) Built from source on 2019-08-26 at 00:19:44 From: https://github.com/jeffreywildman/homebrew-virt-manager/blob/master/virt-viewer.rb ==> Dependencies Build: intltool ✔, libtool ✔, pkg-config ✔ Required: atk ✔, cairo ✔, gdk-pixbuf ✔, gettext ✔, glib ✔, gtk+3 ✔, gtk-vnc ✔, hicolor-icon-theme ✔, libvirt ✔, libvirt-glib ✔, pango ✔, shared-mime-info ✔, spice-gtk ✔, spice-protocol ✔

@jeffreywildman
Copy link
Owner

I just tested again, the current spice-gtk bottle wasn't built with gtk+3 3.24.11. I needed to perform brew reinstall --build-from-source spice-gtk and this error went away.

I've opened Homebrew/homebrew-core#43961 to try to correct this.

@jeffreywildman
Copy link
Owner

spice-gtk bottle now built against updated gtk+3. Marking this as closed, thanks to @jeffmahoney for tracking down the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants