T-vK / MobilePassThrough

Make GPU passthrough on notebooks easy and accessible!
171 stars 20 forks source link

LookingGlass Failed to map memory #16

Closed ellitedev closed 1 year ago

ellitedev commented 3 years ago

After following the guide in the readme to a tee (only thing i changed was the amount of storage and CPU's, i gave it 50gb and 2cpu's) LookingGlass seems to not have the right permissions?

I'm running Fedora 34

./looking-glass-client # Run the looking glass client 77023651 [I] main.c:2282 | main | Looking Glass (B3) 77023697 [I] main.c:2283 | main | Locking Method: Atomic 77024390 [I] wayland.c:334 | waylandEarlyInit | SDL_VIDEODRIVER has been set to wayland 77258695 [I] ivshmem.c:127 | ivshmemOpenDev | KVMFR Device : /dev/shm/looking-glass 77258811 [E] ivshmem.c:172 | ivshmemOpenDev | Failed to open: /dev/shm/looking-glass 77258826 [E] ivshmem.c:173 | ivshmemOpenDev | Permission denied 77258829 [E] main.c:1889 | lg_run | Failed to map memory

ellitedev commented 3 years ago

Also, Remmina crashes when trying to connect to rdp://192.168.99.2

T-vK commented 3 years ago

You might wanna try the unattended-win-install branch: https://github.com/T-vK/MobilePassThrough/tree/unattended-win-install

It contains a lot of fixes. I just haven't merged it into the master yet because it's not running on Ubuntu yet. You shouldn't reuse your old config file tough because I made some fundamental changes.

ellitedev commented 3 years ago

Thanks! I'll try that. If it works i'll close this issue!

ellitedev commented 3 years ago

Okay i must admit, i don't know how to properly remove the old mbpt

T-vK commented 3 years ago

Just delete the MobilePassThrough folder. If you customized the virtual drive location (DRIVE_IMG in the config file), you also have to delete that. Same for the VM_FILES_DIR.

Then you can just clone the project again with the new branch:

git clone -b unattended-win-install https://github.com/T-vK/MobilePassThrough.git
ellitedev commented 3 years ago

So, not to leave this just open, but the other branch also results in Lookingglass failing, with seemingly the same error. I've tried multiple reinstalls using the auto and configure method.

T-vK commented 3 years ago

You need to use display mode 5 in the config file. But even then, I can confirm that there seems to be an issue. The Looking Glass host service in the VM seems to fail as soon as you connect. For me it says the following in the looking glass logs inside the VM:

Failed to create D3D11 device : 0x887a0004 (The specified device interface or feature level is not supported on this system.
Failed to find a supported capture device

I had it working at some point, not sure why it doesn't anymore.

The developer of Looking Glass seems to be suggesting to use dma-buf over Looking Glass because it has less overhead: https://forum.level1techs.com/t/host-wont-start-failed-to-create-d3d11-device/166345/30

If that's an option for you, then display mode 4 should do the job. It does use dmabuf as well as rdp though. You could create another display mode that always sets USE_RDP to false in scripts/utils/common/plugins/