Looking Glass - Triage

No, my mouse is type generic ps2 mouse, relative movement and my keyboard is generic ps2. Do I need to add a VirtIO mouse too and how do I do that?

May need to adjust addresses.

    <input type='mouse' bus='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0e' function='0x0'/>
    </input>
    <input type='keyboard' bus='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0f' function='0x0'/>
    </input>

Oh, do I add those then delete the PS2 ones?

You can’t delete the ps2 ones, libvirt will always add them back, so just add these and make sure the drivers install.

Wait, what drivers? Also do you know how to get sound out of the VM through pulse audio?

Alright, thanks both gnif and lessaj, got it. The keyboard and mouse are now working fine. Now the only issue that I have right now is how to get sound out of it. Followed option two of this guide but it isn’t working.

I am glad you got that sorted, however sound support is beyond the scope of this thread as it’s Qemu specific.

Well time to make a new thread then, thanks for all the help! :smiley:

2 Likes

I found out where I went wrong I added /dev/shm/looking-glass rw to /etc/apparmor.d/abstractions/libvirt-qemu instead of /dev/shm/looking-glass rw,

I have Looking Glass working now. Still playing around with it’s different options

1 Like

Well, I have a bigger issue than sound now. So everything was fine, then I restarted. VM works fine (aside from sound) but now when I run looking glass, it ends up cutting the top bar of the console and part of the bottom. I can’t access anything on the task bar nor can I close anything. Ctrl+C on the open console window to close looking glass works but it still leaves the icon in the task bar and I can’t do anything, can’t even open looking glass again. Like all the windows partially locks up, the only way I can restart is doing sudo reboot -f…

Sounds like you’re having a GPU lockup/failure. What is the output of dmesg when this occurs?

Well then, I just tried again and it was fine. Do you have any ideas on what may have happened and how to fix it if it happens again? This kept happing earlier but I guess after some time leaving the computer on it’s fine now?

I gave my only suggestion, without debug information there is little I can do.

Ah thanks, didn’t think of checking dmesg when it happened. If it happens again I’ll be sure to add it, now off to fix the sound!

1 Like

Oh yeah, there was one other thing that I was meaning to ask you. Is it possible to add more scan codes for keyboards with extra keys? For example, some keyboards have a little scroll bar/wheel that lets you adjust the volume. According to the output in looking glass, scan code 80 is volume up, scan code 81 is volume down, and scan code 7f is mute. Also some keyboards have media keys such as play/pause, stop, forward, and rewind. The scan codes for these are 105, 104, 102, and 103 respectively.

Perhaps, I have not looked at the spice keyboard code in over a year now. To be honest though you would be better off controlling the volume of your guest in the host under pavucontrol.

Ah, I see, just used to controlling the volume like that. Also is it normal for some windows to turn white for like a second when starting or closing out of looking glass?

Not in my experience, however you have not shared any information as to your hardware, you’re setup may simply be under powered.

Oh I see, well thanks for all your help. Hopefully everything’s fine, now off to fix the sound!

I will be live streaming a demo of the new c-host shortly with some game play included on twitch for anyone interested.

1 Like