I have a debian-13-xfce based template. In it I installed some packages I like, nothing fancy. I didn’t remove much of the default packags that come with debian-13-xfce either.
The issue is this: I cannot attach the bluetooth hardware to any of the qubes that have this debian-13-xfce qube as its template.
Interestingly, I can attach USB storage devices (like USB and SSD) and also I can attach the Camera I have on my laptop to the qubes that have the same debian-13-xfce as their template. So, it is only with Bluetooth I am having this problem with.
When I use Qubes Devices tray icon, hover over the Bluetooth option that’s currently attached to the sys-usb (based on debian-13-minimal template) and select a debian qube of mine to attach to, I get a notification saying device removed and then quickly device attached. If I try attaching again, I get
Looks very similar to my problem. He suggests installing usbguard:
sudo apt install usbguard
Which I will try now, BUT, on the whonix-workstation-18 template, the same packages is NOT installed, and YET, attaching the same bluetooth to whonix qubes works. Why would it work without needing usbguard on whonix qubes then?
Installed the usbguard package to the debian-13 template of mine. Now when I try to attach bluetooth to a qube that uses that template, I get a different error:
Note: I am on @novacustom V56 (variant with NVIDIA GPU)
Edit 2: Installing usbguard package got it break attaching the camera as well. At least before installing usbguard, it was able to attach the camera. Now attaching camera fails with the same error message above.
Edit 3: removing usbguard brings the ability of attaching the camera back. But attaching the bluetooth fails with the previous error message (the ones I reported in my OP above).
I switch the debian template to a vanilla, un-modified, debian-13-xfce template from QubesOS. Start the qube (that uses that template). Try attaching the bluetooth hardware device Intel corp: BE200 Bluetooth. And get the same error:
Weirdly enough #2: I switch the template to my somewhat modified (I only installed some packages (like emacs, etc.) I use) whonix-workstation-18 template. Start the qube. Try to attach the same bluetooth hardware. And it successfully attaches.
That’s a real headscrather now. Attaching bluetooth works for whonix 18 qubes but fails for debian 13 qubes.
I just downloaded the regular debian-12-xfce template:
dom0 terminal:
qvm-template install debian-12-xfce
then, create a regular qube on top of this template, called test. Start the test qube. Use the Qubes Devices xfce4 system tray widget tool to select my Bluetooth device (Bluetooth: Intel Corp. BE200 Bluetooth), and selet the test qube as attach destination.
It fails with the same erroneous behavior as I explained in my OP in this thread:
first attempt at attaching fails silently, without errors, I just see in my QubesOS notifications that the bluetooth device is removed from my sys-usb (with the intent of attaching it to the test qube, of course), but then immediately another QubesOS notification telling me that the bluetooth device is “available” again in the sys-usb.
at this point, in the test qube, the lsusb command reports:
user@test:~$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
user@test:~$
and in this state, if I try the same way of attaching the Bluetooth device to the test qube, I get the error message in QubesOS notification: Error: QubesException - Device attach failed: /usr/lib/qubes/usb-import: 94: echo: echo: I/O error
Any ideas, please? I have been trying to use my bluetooth headset on QubesOS debian-based templates for a day now, missing some important teleconference meetings with clients.
Whonix-18 templates do NOT have the following packages installed:
firmware-iwlwifi
firmware-linux
firmware-linux-nonfree
On the other hand, the debian-12-xfce template has all these packages installed by default (why?). Also, I noticed that my debian-13-xfce -derived template had these packages installed as well (don’t know how they got installed as I didn’t install them manually on my template).
So, taking the cue, I removed these packages from the template:
user@test:~$ sudo apt purge firmware-iwlwifi firmware-linux firmware-linux-nonfree
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
amd64-microcode intel-microcode iucode-tool
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
firmware-iwlwifi* firmware-linux* firmware-linux-nonfree*
0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded.
After this operation, 118 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 141801 files and directories currently installed.)
Removing firmware-iwlwifi (20250410-2~bpo12+1) ...
Removing firmware-linux (20250410-2~bpo12+1) ...
Removing firmware-linux-nonfree (20250410-2~bpo12+1) ...
which also suggested I should autoremove amd64-microcode, intel-microcode and iucode-tool packages (note: these three packages are also not included in whonix-18)
user@test:~$ sudo apt autoremove
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
amd64-microcode intel-microcode iucode-tool
0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded.
After this operation, 20.6 MB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 141609 files and directories currently installed.)
Removing amd64-microcode (3.20250311.1~deb12u1) ...
Removing intel-microcode (3.20250812.1~deb12u1) ...
Removing iucode-tool (2.3.1-3) ...
Processing triggers for man-db (2.11.2-2) ...
Processing triggers for initramfs-tools (0.142+deb12u3) ...
update-initramfs: Generating /boot/initrd.img-6.1.0-41-amd64
user@test:~$
After that, I shut down the template, restart the qube, and I am back again, able to attach the bluetooth hardware to the debian-derived qube.
Some questions:
if the firmware-iwlwifi, firmware-linux, firmware-linux-nonfree packages prevent attaching bluetooth devices to qubes, then, why do they come pre-installed with the default debian-12-xfce qube?
Here’s an educated guess: those packages are included in case you want to base your sys-net on debian-NN-xfce during the installation. Or any time after, if you think of it.
The alternative being to ship the template without the firmware packages, and have the salt formula install them for sys-net only (raising the install complexity).
This makes sense for the case where people base their sys-usb on top of the vanilla debian-NN-xfce templates. But, what about the very same people who will try to attach a bluetooth device to the qubes built on top of the the very same debian-NN-xfce templates? Are they expected to come to the realization that they should actually clone the debian-NN-xfce template, and then remove the abovementioned 3 packages?
I defer that question to the developers
It’s obvious to me that in this context, Bluetooth functionality comes with a much lower priority. And as I wrote, there are simple ways around the whole issue, raising the install (and sys-net creation) complexity.
This looks right.
An interesting question is why inclusion of firmware prevents the
bluetooth devices being attached, unless their inclusion somehow makes
the device appear in some novel way?
I’d start by seeing which specific package is the blocker, and digging
in to the logs.
I never presume to speak for the Qubes team.
When I comment in the Forum I speak for myself.