genymotion UI 损坏并显示为混淆

genymotion UI is broken and shows as mixed up

我用genymotion已经有一段时间了,没有任何问题。但是最近当我 运行 它时, UI 显示像这样损坏:

终端中有这条消息:

(genymotion:14471): Gdk-WARNING **: shmget failed: error 28 (No space left on device)

虽然查了很多遍了,有很多space。可以肯定的是,我删除了很多文件和程序,但它仍然这样说。

genymotion.log 文件有这些:

Nov 9 11:11:43 [Genymotion] [Warning] Genymotion Version: Genymotion 2.5.2 
Nov 9 11:11:43 [Genymotion] [Debug] [LaunchpadApp] Started with ("./genymotion") 
Nov 9 11:11:44 [Genymotion] [Debug] [doRequest] Requesting:  "https://cloud.genymotion.com/launchpad/last_version/linux/x64/" 
Nov 9 11:11:44 [Genymotion] [Debug] Getting currently authenticated user from  local cache 
Nov 9 11:11:44 [Genymotion] [Warning] QNativeImage: Unable to attach to shared memory segment. 
Nov 9 11:11:44 [Genymotion] [Warning] QPainter::begin: Paint device returned engine == 0, type: 3
Nov 9 11:11:44 [Genymotion] [Warning] QPainter::setCompositionMode: Painter not active
Nov 9 11:11:44 [Genymotion] [Warning] X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x0
Nov 9 11:11:44 [Genymotion] [Debug] [doRequest] HTTP Status: 0 
Nov 9 11:11:44 [Genymotion] [Debug] [doRequest] HTTP Content: "" 
Nov 9 11:11:44 [Genymotion] [Debug] [doRequest] Reply error: "Proxy connection refused" ( 99 ) 
Nov 9 11:11:44 [Genymotion] [Debug] [doRequest] last error msg: "Unknown proxy error" 
Nov 9 11:11:44 [Genymotion] [Error] Network error while retrieving JSON content:  7 
Nov 9 11:11:44 [Genymotion] [Error] [getGenymotionLastVersion] Bad request: "/launchpad/last_version/linux/x64/" 
Nov 9 11:11:44 [Genymotion] [Warning] QPainter::begin: Paint device returned engine == 0, type: 3
Nov 9 11:11:44 [Genymotion] [Warning] QPainter::setCompositionMode: Painter not active
Nov 9 11:11:44 [Genymotion] [Error] Unable to get last Genymotion version number from server:  7 
Nov 9 11:11:44 [Genymotion] [Debug] [login] Trying to authenticate  "mousa_mk" 
Nov 9 11:11:44 [Genymotion] [Debug] Trying to logout user 
Nov 9 11:11:44 [Genymotion] [Debug] [doRequest] Requesting:  "https://cloud.genymotion.com/launchpad/login/" 
Nov 9 11:11:44 [Genymotion] [Warning] X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x0
Nov 9 11:11:44 [Genymotion] [Debug] [doRequest] HTTP Status: 0 
Nov 9 11:11:44 [Genymotion] [Debug] [doRequest] HTTP Content: "" 
Nov 9 11:11:44 [Genymotion] [Debug] [doRequest] Reply error: "Proxy connection refused" ( 99 ) 
Nov 9 11:11:44 [Genymotion] [Debug] [doRequest] last error msg: "Unknown proxy error" 
Nov 9 11:11:44 [Genymotion] [Error] [login] Login process result: 7 
Nov 9 11:11:44 [Genymotion] [Warning] QPainter::begin: Paint device returned engine == 0, type: 3
Nov 9 11:11:44 [Genymotion] [Warning] QPainter::setCompositionMode: Painter not active
Nov 9 11:11:44 [Genymotion] [Debug] Loading "vboxmanage" plugin 
Nov 9 11:11:44 [Genymotion] [Warning] X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x0
Nov 9 11:11:44 [Genymotion] [Debug] Plugin "vboxmanage" loaded 
Nov 9 11:11:44 [Genymotion] [Debug] Chipset: "GenuineIntel" 
Nov 9 11:11:44 [Genymotion] [Debug] CPUID 0x1 (Intel): ECX= "1dbae3bf" 
Nov 9 11:11:44 [Genymotion] [Debug] [VBoxManageCore] Path: "VBoxManage" 
Nov 9 11:11:44 [Genymotion] [Debug] VBoxManage ("list", "hostinfo") returns 0 
Nov 9 11:11:44 [Genymotion] [Debug] [System properties] Online physical CPU number: 4 
Nov 9 11:11:44 [Genymotion] [Debug] [System properties] Online virtual CPU number: 2 
Nov 9 11:11:44 [Genymotion] [Debug] [System properties] Max CPU number: 8 
Nov 9 11:11:44 [Genymotion] [Debug] [System properties] Max memory size: 7917 
Nov 9 11:11:44 [Genymotion] [Debug] VBoxManage ("list", "hostonlyifs") returns 0 
Nov 9 11:11:44 [Genymotion] [Debug] [VBoxManageCore] Checking status of interface "vboxnet0" "192.168.56.1" 
Nov 9 11:11:44 [Genymotion] [Debug] [VBoxManageCore] "vboxnet0" is OK 
Nov 9 11:11:44 [Genymotion] [Debug] VBoxManage ("list", "dhcpservers") returns 0 
Nov 9 11:11:44 [Genymotion] [Debug] VBoxManage ("--version") returns 0 
Nov 9 11:11:44 [Genymotion] [Debug] VM engine version: "5.0.4_Ubuntur102546" 
Nov 9 11:11:44 [Genymotion] [Debug] VMX/SVM CPU availability: true 
Nov 9 11:11:44 [Genymotion] [Debug] VBoxManage ("--version") returns 0 
Nov 9 11:11:44 [Genymotion] [Debug] VM engine version: "5.0.4_Ubuntur102546" 
Nov 9 11:11:44 [Genymotion] [Warning] QPainter::begin: Paint device returned engine == 0, type: 3
Nov 9 11:11:44 [Genymotion] [Warning] QPainter::setCompositionMode: Painter not active
Nov 9 11:11:44 [Genymotion] [Warning] X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x0
Nov 9 11:11:44 [Genymotion] [Debug] VBoxManage ("list", "vms") returns 0 
Nov 9 11:11:44 [Genymotion] [Debug] VBoxManage ("guestproperty", "enumerate", "2d9b3a13-d8af-412a-bbeb-e7f713b4b42d") returns 0 
Nov 9 11:11:44 [Genymotion] [Debug] VBoxManage ("guestproperty", "enumerate", "76afb120-f753-4474-bbc9-53c18cc77576") returns 0 
Nov 9 11:11:44 [Genymotion] [Debug] VBoxManage ("guestproperty", "enumerate", "4f274f87-41ec-4998-9860-224869634750") returns 0 
Nov 9 11:11:44 [Genymotion] [Warning] QPainter::begin: Paint device returned engine == 0, type: 3
Nov 9 11:11:44 [Genymotion] [Warning] QPainter::setCompositionMode: Painter not active
Nov 9 11:11:44 [Genymotion] [Warning] X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x0
Nov 9 11:11:44 [Genymotion] [Debug] VBoxManage ("guestproperty", "enumerate", "Custom Phone - 5.1.0 - API 22 - 768x1280") returns 0 
Nov 9 11:11:44 [Genymotion] [Debug] VBoxManage ("showvminfo", "Custom Phone - 5.1.0 - API 22 - 768x1280") returns 0 
Nov 9 11:11:44 [Genymotion] [Error] VBoxManage ("guestproperty", "enumerate", "443b5e7d-fb22-4070-a2ae-1ddcf4ccc1c7") returns 1 
Nov 9 11:11:44 [Genymotion] [Error] Output command: "VBoxManage: error: The object functionality is limited
VBoxManage: error: Details: code E_ACCESSDENIED (0x80070005), component MachineWrap, interface IMachine, callee nsISupports
VBoxManage: error: Context: "LockMachine(a->session, LockType_Shared)" at line 253 of file VBoxManageGuestProp.cpp" 
Nov 9 11:11:44 [Genymotion] [Debug] VBoxManage ("guestproperty", "enumerate", "74ce8294-3c0c-4b8f-a1a6-b443fe0fdcac") returns 0 
Nov 9 11:11:44 [Genymotion] [Debug] VBoxManage ("guestproperty", "enumerate", "Google Nexus 4 - 5.1.0 - API 22 - 768x1280") returns 0 
Nov 9 11:11:45 [Genymotion] [Debug] VBoxManage ("showvminfo", "Google Nexus 4 - 5.1.0 - API 22 - 768x1280") returns 0 
Nov 9 11:11:45 [Genymotion] [Warning] QPainter::begin: Paint device returned engine == 0, type: 3
Nov 9 11:11:45 [Genymotion] [Warning] QPainter::setCompositionMode: Painter not active
Nov 9 11:11:45 [Genymotion] [Warning] QPainter::begin: Paint device returned engine == 0, type: 3
Nov 9 11:11:45 [Genymotion] [Warning] QPainter::setCompositionMode: Painter not active
Nov 9 11:11:45 [Genymotion] [Warning] X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id:  0x0
Nov 9 11:11:45 [Genymotion] [Warning] X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id:  0x0
Nov 9 11:11:45 [Genymotion] [Warning] QNativeImage: Unable to attach to shared memory segment. 
Nov 9 11:11:45 [Genymotion] [Warning] X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id:  0x0
Nov 9 11:11:45 [Genymotion] [Warning] QNativeImage: Unable to attach to shared memory segment. 
Nov 9 11:11:45 [Genymotion] [Warning] X Error: BadPixmap (invalid Pixmap parameter) 4
Major opcode: 56 (X_ChangeGC)
Resource id:  0x0
Nov 9 11:11:45 [Genymotion] [Warning] X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id:  0x0
Nov 9 11:11:45 [Genymotion] [Warning] X Error: BadPixmap (invalid Pixmap parameter) 4
Major opcode: 56 (X_ChangeGC)
Resource id:  0x0
Nov 9 11:11:45 [Genymotion] [Warning] X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id:  0x0
Nov 9 11:11:48 [Genymotion] [Warning] X Error: BadPixmap (invalid Pixmap parameter) 4
Major opcode: 56 (X_ChangeGC)
Resource id:  0x0
Nov 9 11:11:48 [Genymotion] [Warning] X Error: BadPixmap (invalid Pixmap parameter) 4
Major opcode: 56 (X_ChangeGC)
Resource id:  0x0
Nov 9 11:11:48 [Genymotion] [Warning] X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id:  0x0

我尝试重新安装 genymotion,甚至删除了 .Genymotion 文件夹,但没有成功。

注意:我怀疑这是升级到 ubuntu 15.10 后发生的,但我不确定。

我发现这与 genymotion 无关,问题出在 Qtgnome 上。 VirtualBoxGoldenDict 等其他一些应用程序也受到影响。

此解决方法暂时抑制它:

export QT_X11_NO_MITSHM=1

Mousa 的回答很棒。

我正在使用 Ubuntu,所以我发现在我的启动器中安装 Genymotion 很方便。为此,并包括 QT 解决方法,我在下面完成了以下操作。

1. 首先我在~/opt/genymotion安装了Genymotion。如果安装在别处,记得放。

2. 然后我创建了 ~/.local/share/applications/genymotion.desktop:

# 
[Desktop Entry]
Type=Application
Name=Genymotion
Comment=Android Emulator
Icon=genymotion
Exec=env QT_X11_NO_MITSHM=1 /home/username/opt/genymotion/genymotion
Terminal=false
Categories=Development;IDE;Java;
Keywords=android;genymotion;emulator;

注意 1:QT 解决方法在 Exec 语句中。

注意 2:请记住编辑您的 genymotion 可执行文件的绝对路径。

3.然后我复制了Genymotion图标文件,以便Unity可以找到它:

cp ~/opt/genymotion/icons/icon.png ~/.local/share/icons/genymotion.png 

4. 现在您可以在 Unity 启动器搜索中找到 Genymotion。

5.(有时需要重新登录才能让Unity发现您的个人更改)。

在撰写本文时,Linux 的 Skype 也受到此 QT 问题的影响,可以应用类似的方法:只需 locate 其各自的 *.desktop 文件,复制它进入您的 ~/.local/share/applications/ 文件夹,为应用程序提供一个新的 Name(例如前置 "QT-fix")并将上述修复插入 Exec.