USB With QUEMU

About Qemu-system-ppc, a PPC Mac emulator for Windows, macOS and Linux that can run Mac OS 9.0 up to Mac OS X 10.5

Moderators: Cat_7, Ronald P. Regensburg

User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: USB With QUEMU

Post by Cat_7 »

Does that scanner also show up on your host?
Can you determine whether a kext is loaded to support it? If so, can you unload that kext and then run Qemu?

Best,
Cat_7
mePy2
Tinkerer
Posts: 58
Joined: Fri Dec 29, 2017 3:43 pm

Re: USB With QUEMU

Post by mePy2 »

You are near my problem... I mean I’m not an expert but you said the magic words.

The scanner is not supported by macOS Mojave, it’s an old HP scanner. But it appears in the System Profiler of the host.

I understand just a little what a kext is... but I don’t know how to check if a “linked” kext is loaded neither how to unload that kext.

This is an issue I submitted to the sane-backends repository on GitLab about the problem. It seems that a kext requests the scanner making it unavailable to libusb.
https://gitlab.com/sane-project/backends/issues/38

Best,
mePy2
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: USB With QUEMU

Post by Cat_7 »

This might be a procedure to find out which kext is loaded for your scanner:

Open a terminal and use:

Code: Select all

kextstat -l 
This gives you a list of running kernel extensions (kexts).
Next, unplug the scanner, reboot and do

Code: Select all

kextstat -l 
again. Look for the difference(s) in the list of kexts loaded.

Next, plug in your scanner and try to kextunload the differing kext with:
sudo kextunload NameOfkext.kext
(make sure you do not unload IOUSBFamily.kext, as that will disable USB support for mouse and keyboard)

And try to run Qemu.

Best,
Cat_7

Source was this: https://sourceforge.net/p/libusb/mailma ... e/8734109/
Last edited by Cat_7 on Tue Jan 01, 2019 1:11 am, edited 1 time in total.
Reason: fixed typo
mePy2
Tinkerer
Posts: 58
Joined: Fri Dec 29, 2017 3:43 pm

Re: USB With QUEMU

Post by mePy2 »

Thank you I will try soon...
Happy new year!
mePy2
Tinkerer
Posts: 58
Joined: Fri Dec 29, 2017 3:43 pm

Re: USB With QUEMU

Post by mePy2 »

Hi,

I first tried kextstat -l without the scanner, then I plugged the scanner in and did kextstat -l again. I did not restart the Mac since I did kextstat -l without the scanner first.

Then I checked the two output files: there are no differences. Checked using the diff command.

Now?
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: USB With QUEMU

Post by Cat_7 »

Now I can only guess the scanner is seen by one of the kexts in both lists which is also loaded for some other device.

You might try to kextunload USB related kexts one by one and see whether Qemu can then use the scanner. I would advise against this if you are not prepared for some serious damage control.

https://github.com/libusb/libusb/issues ... -190582178
mePy2
Tinkerer
Posts: 58
Joined: Fri Dec 29, 2017 3:43 pm

Re: USB With QUEMU

Post by mePy2 »

Yes, I already read that issue.
But I’m wondering if there is another way to do it...
I read somewhere to create an empty kext reclaiming the scanner. But since I don’t know how things work I don’t know what to do.

How Parallels Desktops works? How can Ubuntu succeed in recognizing and using the scanner?

Is it possible to use a framework by Apple to access the usb devices instead of libusb? So creating a QEMU port specifically for macOS.
Post Reply