Closed Lissanro closed 2 years ago
Sorry, disregard this issue. After I deleted log files, without doing any other changes, the service started working. Not sure what was wrong. Maybe permission issue or something. I am not sure if log files were updated correctly when it was starting as a service, so perhaps it was reading ini file correctly after all, but crashed because something was wrong with the log files.
Also don't use SCREAM.
https://github.com/duncanthrax/scream#using-ivshmem-between-windows-guest-and-linux-host
warning Note: While this setup is possible, it is generally only advised if you can't use network transfer via a standard virtio-net device. Scream on QEMU does not benefit from using IVSHMEM. It increases CPU load and latency due to the polling nature of the implementation.
Either use QEMUs native audio output support, or upgrade to Looking Glass bleeding edge (or wait for B6) which has native audio support built in.
In virt-manager I have two shmem devices, the first one for Looking Glass and another for Scream.
My first attempt to make Looking Glass work was fruitless, it kept ignoring ini file and insisted using IVSHMEM 0. After spending some time, I managed to make it so IVSHMEM 0 is of 64MB size, but after I rebooted my PC, it became IVSHMEM 1 again. I did not understand at first why the Looking Glass service ignores ini file.
It is notable that my ini file worked, I had specified d3d12 copyBackend, and this was reflected in the log files as expected. But now (after IVSHMEM 0 became IVSHMEM 1, and I tried to add shmDevice=1 to the config) I see that ini file also ignored:
My config file:
I had to use disableDamage=yes otherwise I had glitches, but for this bug report, this is not relevant, because copyBackend=d3d12 is completely ignored if IVSHMEM 0 is not of sufficient size, and shmDevice=1 is also ignored.
This makes no sense to me, because if I cd to the directory whele Looking Glass host is installed, and run .\looking-glass-host.exe -h, it suddenly starts reading the ini file:
And if I run it as .\looking-glass-host.exe, it works. Yes, I am sure the service points to the right file and I do not have any other installation, and I also tried to uninstall and install the service again by running:
But this unfortunatelly does not help.
Even if this issue is fixed, I think it would be better if Looking Glass detected right device ID based on its size. For example, if I want to use 64MB device, there is no reason to try 2MB device and fail. This is how Scream service works, after I specify IVSHMEM size, it looks for it, and then it works regardless of possible ID changes.
I found no reliable way to force IVSHMEM for Looking Glass to have ID 0, it does not read the ini file because of this, so it does not work as a service for me. Uninstalling it as a service and manually adding to startup does not work either, if IVSHMEM 0 is 2MB device. But I can startup Looking Glass host manually, either from the terminal or from Start menu.