What actually is dom0:mic? Bug?

EDIT: See the message # 15

I admit I have no idea. I’ve done tons of tests to identify it, but to no avail.

This is all I can get:

[user@dom0 ~]$ qvm-device mic info dom0:mic
Microphone: build-in microphone
device ID: dom0:mic::m000000

.. while my laptop’s specs claims “HD Camera with temporal noise reduction and integrated dual array-digital microphones”…

… but no matter what I do, I can’t seem to find it as input device anywhere: in dom0, sys-audio, qube to which is attached to. Not in arecord -l / pipewire sources, not as webcam’s usb audio interface, nada. Nada!

The only way I am able to record my voice is through 3.5mm jack when I connect headset with a mic. But that one is handled by sys-audio and specific Intel HDA.

Does it work in any other OS? I don’t know. My machines are never touched by other OSes (I lied there - one of my old machines had to be touched by Fedora Live to check IOMMU groups, but that was it).

So, I am looking for a user that has internal microphone dom0:mic that works to teach me what I am missing. Thanks in advance.

Qubes r4.3.1

@corporateblush That is a virtual mic device, it’s not an actual mic hardware. It is made available by qubes gui daemon running in dom0 (ref.: qubes-gui-daemon/qubesguidaemon/mic.py at f66fb34c90d3400772df7e11dfea47331c08407f · QubesOS/qubes-gui-daemon · GitHub). So it should exist in every >=4.3 Qubes OS installation, as it does in mine.

As I understand it, this virtual mic device exist to provide a modular mechanism to send audio input to domUs (AppVMs, StandaloneVMs, and so on) regardless of your audiovm backend.

I did not read the specific code section to confirm the following claim, but that’s my guess given my experience with Qubes audio virtualization, so take that as you will: while this virtual mic (ie, dom0:mic) is the one you attach to your domU, dom0 will actually proxy all audio input from your audiovm, which could be dom0 itself, to your target domU through a qrexec channel using a specialized and simple audio transfer protocol.

It is my understanding that by default all audio output, that is audio data leaving your application to your audio hardware device, is transferred through qrexec channels using that simple audio protocol. I say by default, because you certainly can attach your audio hardware directly to a domU via USB attach, and if you configure your system to use said USB audio controller, audio will also be transferred through qrexec, but this time using usbip protocol. In the former, the default, you should get the least overhead and possibly lower attack surface; I’d say it is the easiest method to get audio output, it should just work for every VM. The same should be true for audio input when you attach the dom0:mic virtual device to a domU. See more: Audio virtualization — Qubes OS Documentation

The only way I am able to record my voice is through 3.5mm jack when I connect headset with a mic. But that one is handled by sys-audio and specific Intel HDA.

You should be able to attach dom0:mic to whatever VM and get audio input from your “3.5mm jack” you described, as long as the whatever VM uses your sys-audio as audiovm (qvm-prefs <whatever-vm> audiovm). What did you already try? And what do you mean by “that one is handled by sys-audio”? Do you manually attach your “3.5mm jack” USB controller to the domU to get audio input to work?

Hey, thanks for your time! I am indeed grateful you took so much effort to explain it in details.
Your post is very much worth to read over and over again, and I must say although I almost came to the same conclusion which can be sensed from the topic subject’s framing (what is actually dom0:mic, right?), I would never be able to explain it like you did. So thanks once again.

Now, to answer your questions:

Every possible combination to find my

Microphone: build-in microphone
device ID: dom0:mic::m000000

but nope, those "… integrated dual array-digital microphones” are nowhere to find.

That was meant to mean the only sound that can be recorded is the one that provides Intel HDA, which audio controller is connected to sys-audio, so handled by it. I expect to find some "… integrated dual array-digital microphones” whose holes are on both sides of the camera above the display, on the lid, so I speak to those holes and the voice is recorded. So far, they’re not only holes, but black holes… Whatever goes into them, disappears forever.

I do not understand “USB” part here. Nothing is USB. Everything is PCI and it resides in sys-audio. When I attach headset to ithe combo jack, I can record my voice in sys-audio. If I attach dom0:mic in addition to Telegram qube, I can record my voice both in Telegram qube and sys-audio, naturally.

But, I would like to forget combo jack and a headset, all works there, I would like to find my "… integrated dual array-digital microphones” so I don’t need headset in order to be able to speak and record by using "… integrated dual array-digital microphones” .

I’d be happy to further provide additional info in order to find it and beinga able to use it.

I don’t fully understand your scenario, so I’ll need to go baby steps first. Right off the bat, what made you expect to see an “integrated dual array-digital microphones” in the list of audio input devices? I’m trying to connect the dots.

I’ll give steps you can follow to help us troubleshoot.

Keep mind: triple-check everything you share here to avoid exposing yourself too much, that is screenshots, clipboard text, etc., remove any device identifiers as needed. I don’t need to know your specific device name and version, just it’s generic name so I can figure out if it’s a camera, audio, keyboard, whatever. Finally, as usual, don’t execute the commands I provide if you are unsure.

  1. Are you sure the camera device is attached to sys-audio? Check or share the outputs of the following commands in dom0:
qvm-device pci ls sys-audio
qvm-usb ls sys-audio
  1. If you can see your camera inside any of the outputs above (very likely in the output of the second command though), check or share the outputs of the following command in sys-audio. This command should list all available audio inputs recognized by the audio server. If you don’t see your camera in those outputs, that’s one problem, and you can stop troubleshooting here.
pactl list short sources

If pactl: Command not found install pulseaudio-utils package (same package name, Debian or Fedora).

  1. According to your last reply, the command above should not include any camera’s microphone. But I insist to double check. If the pactl command above does not include the expected camera microphone, keep going. Follow these instructions in sys-audio:

    3.1 Find the “Bus” and “Device” number of your camera:

lsusb

They might look something like this (my own):

Bus 002 Device 007: ID XXXXX:XXXX XXXXXXXXXXXXXXX Full HD webcam

Replace those variables in the script below with your respective bus and device numbers, omit the leading zeros. The following shell script list all exposed devices from your camera controller, and tries to tell whether Linux found a matching kernel driver for that device.

# CHANGE THOSE
busnum=2
devnum=7

for device in /sys/bus/usb/devices/*; do
	if [ -f "$device/busnum" ] && [ -f "$device/devnum" ]; then
		if [ "$(cat $device/busnum)" -eq "$busnum" ] && [ "$(cat $device/devnum)" -eq "$devnum" ]; then
			echo "device: $device"
			for thing in "$device/$(basename $device)":*/; do
				echo "thing: $thing"
				if [ -d "$thing"/driver/ ]; then
					ls -la "$thing"/driver
				else
					echo "MISSING DRIVER"
				fi
				echo "-------------------------"
			done
			break
		fi
	fi
done

If maybe an issue with your camera driver. Maybe.

Thanks for the baby steps. I said in OP that I took many checks and steps to find it. I am not akin to attach USB camera to my sys-audio, because before I created this topic I checked it in its sys-usb (doing all the mentioned baby steps there, but it **all** came down to a simple lsusb -v at the end, looking for audio interface, but to no avail) and it shows only video capabilities there, no audio at all, as I mentioned. Or you think it’s not the same?

Your script shows 2 USB interfaces being handled by the uvcvideo kernel driver: “Video Control” and “Video Streaming”.

My experience is that chasing webcam for microphone is not a rabbit hole to follow…,

For something like 10 years I have never seen anyone on this forum specifically stating they use those holes as a microphone.

I forgot to answer this one. The fact it is stated in the official laptop specs? No option to enable/disable it in BIOS, no trace of it when inspecting Intel HDA, nor Webcam, never saw a user here mentioning using those two black holes as a microphone…

Weird…

In my experience, lsusb only shows USB controllers, the exposed hardware devices. So, for me, lsusb output only shows one line with my webcam USB controller. USB controllers can expose multiple software interfaces, though (which that larger shell script tries to enumerate). And when I run pactl list short sources, it correctly displays the recognized webcam’s audio input.

You are not wrong to not attach your webcam to sys-audio. But it leads me to believe that’s the reason you aren’t able to record audio from the webcam “holes”. I, for instance, can record audio from my webcam; I do attach my webcam to the AppVM running audio infrastructure (aka sys-audio).

My bad if I am going around in circles. That can happen sometimes : )

This a clue. For me, it shows 4 interfaces: the first 2 handled by uvcvideo, and the last 2 handled by the snd-usb-audio kernel driver.

Thanks. As I said, no audio with a web cam in my case…

So, no one is using 2 holes (or one, depending on a laptop) as a mic?

Hi,

I don’t understand your problem.

But just to let you know (Qubes OS 4.3.1, fresh new install a couple of days ago):

  • I have an integrated webcam + mic on my laptop;
  • I never use it (I use an external one when needed);
  • both are listed in the GUI USB available devices;
  • I just tested it (dom0:mic) and it works seamlessly (attaching to an AppVM through GUI).

If I can help in any way (running commands and providing returns), please let me know.

Wish you will succeed in fixing the bug.

Cheers,

Thanks for the info and an offering to help.

  • I don’t have webcam + mic integrated, as stated above.
  • I have 2 holes on each side of web camera. Laptop site specs claims they are “HD Camera with temporal noise reduction and integrated dual array-digital microphones”
  • I’d like to use it, but cannot find it anywhere.

When you say this, did you test integrated mic while headset was plugged out and you could record audio?
Thanks for the feedback in advance.

Of course!
I thought this was the right and only way to test: ensuring that no other audio equipment was available. :wink:

Cool, thanks. Do you use sys-audio?

unfortunately no.

I found this, that might be my case:

Could this be Qubes bug?