Issue using Yubikeys on Qubes as GPG smart card: "selecting card failed: No such device"

I did everything. my friend !!! This does not work

Check the file grub config:

sudo mount /dev/nvme1n1p1 /mnt
cat /mnt/EFI/qubes/grub.cfg | grep rd.qubes.hide_all_usb

If you have rd.qubes.hide_all_usb options there then remove all of them from grub config.

UPD:
Or maybe your keyboard is working already and only your mouse is not working?
The change in /mnt/etc/qubes-rpc/policy/qubes.InputKeyboard only fixed your keyboard but not mouse.
You need to also change this file /mnt/etc/qubes-rpc/policy/qubes.InputMouse to make mouse work.


simon@debian:~$ sudo mount /dev/nvme1n1p1 /mnt
simon@debian:~$ cat /mnt/EFI/qubes/grub.cfg | grep rd.qubes.hide_all_usb
        module2 /vmlinuz-5.10.109-1.fc32.qubes.x86_64 placeholder root=/dev/mapper/qubes_dom0-root ro rd.lvm.lv=qubes_dom0/root rd.lvm.lv=qubes_dom0/swap plymouth.ignore-serial-consoles rd.driver.pre=btrfs rhgb quiet rd.qubes.hide_all_usb 
                        module2 /vmlinuz-5.10.109-1.fc32.qubes.x86_64 placeholder root=/dev/mapper/qubes_dom0-root ro rd.lvm.lv=qubes_dom0/root rd.lvm.lv=qubes_dom0/swap plymouth.ignore-serial-consoles rd.driver.pre=btrfs rhgb quiet rd.qubes.hide_all_usb 
                        module2 /vmlinuz-5.10.104-3.fc32.qubes.x86_64 placeholder root=/dev/mapper/qubes_dom0-root ro rd.lvm.lv=qubes_dom0/root rd.lvm.lv=qubes_dom0/swap plymouth.ignore-serial-consoles rd.driver.pre=btrfs rhgb quiet rd.qubes.hide_all_usb 
                        module2 /vmlinuz-5.10.90-1.fc32.qubes.x86_64 placeholder root=/dev/mapper/qubes_dom0-root ro rd.lvm.lv=qubes_dom0/root rd.lvm.lv=qubes_dom0/swap plymouth.ignore-serial-consoles rd.driver.pre=btrfs rhgb quiet rd.qubes.hide_all_usb 
                        module  /vmlinuz-5.10.109-1.fc32.qubes.x86_64 placeholder root=/dev/mapper/qubes_dom0-root ro rd.lvm.lv=qubes_dom0/root rd.lvm.lv=qubes_dom0/swap plymouth.ignore-serial-consoles rd.driver.pre=btrfs rhgb quiet rd.qubes.hide_all_usb 
                        module  /vmlinuz-5.10.104-3.fc32.qubes.x86_64 placeholder root=/dev/mapper/qubes_dom0-root ro rd.lvm.lv=qubes_dom0/root rd.lvm.lv=qubes_dom0/swap plymouth.ignore-serial-consoles rd.driver.pre=btrfs rhgb quiet rd.qubes.hide_all_usb 
                        module  /vmlinuz-5.10.90-1.fc32.qubes.x86_64 placeholder root=/dev/mapper/qubes_dom0-root ro rd.lvm.lv=qubes_dom0/root rd.lvm.lv=qubes_dom0/swap plymouth.ignore-serial-consoles rd.driver.pre=btrfs rhgb quiet rd.qubes.hide_all_usb

there is no other way? right now 100% grab.cfg will break

grub.log (13.3 KB)
this grub.cfg

thank you friend. Both keyboard and mouse worked. I hit the cube. Now we need to figure out how to add YK

Create sys-usb as I’ve explained here:

UPD:
On second thought you already should have working sys-usb after your config changes.
Check if you have your USB devices listed in Qubes Devices tray icon:


(edited title to make it more explicit, OP feel free to edit it if it’s wrong)

I recently became interested in cubes os. Decided to just install and try. It turned out that this is what I need for my desktop.

  1. What I didn’t like was the installation - network settings and so on. I think in the future the developers will bring to mind the installation mode.
  2. It was easy for me to figure out how to create and run virtual machines. It took a little time to understand that the machine template plays a key role. But it took a lot of time to learn how to enable keys to external repositories.

In total, I worked for about two weeks and I really like the cubes ecosystem.

Cubes OS is an ecosystem. A very good idea, and I think it will have a good continuation.
For example, that there are few video instructions. There are bloggers who talk about how good and safe it is, how to run and create virtual machines, and nothing else.
I read that Cubes OS loves OS very much and we will communicate in it.
As for the GUI, I have not seen anything complicated or well described.

I decided to add Yubikey. And that’s when I realized that I could be left without my data at all. And that’s when I realized that there are problems in the system and I need to somehow fix them in order to be able to manage my task.

For example, in Debian everything is clear how to add a device, delete, disable, configure.

Here I found out that there is sys-usb. Where it is - in the description. I am a beginner, I began to read the manual, after which the login to the system broke (the mouse and keyboard did not work). Why did it happen so ? I never found where to find all my USB devices. I just wanted to add Yubikey. Couldn’t do it. In the process, I discovered that if the Yubico is configured incorrectly, it is possible to close the OS. In general, at this point I stayed and decided to leave the presence of Yubico.

Do you have sys-usb?

not

You need to create sys-usb.
Since your PC has 3 USB controllers then the best way is to dedicate 1 USB controller to dom0 and connect your USB keyboard and USB mouse to it and create sys-usb with other 2 USB controllers.
Here is the guide:

Qubes 4.1: How to enable a USB keyboard on a separate USB controller

Good. I will try again. The first time when creating everything ended badly
Thank

Add usbcore.authorized_default=0 and rd.qubes.dom0_usb=<BDF> to that line, where <BDF> is the USB controller identifier.


ID 1532:0083 Razer USA Ltd Raser Basilic X HyperSpeed
ID 1532:025a Razer USA Ltd Raser BlackWidow V3 Pro

Tell me how to correctly register the identifier for the keyboard and mouse, the manufacturer is one (Razer)

There is a link to the guide on how to identify the right USB controller in the first step of the guide above:


after this procedure, this is what happened

After you performed all these steps?

  • Find the controller used for input devices.
  • Open the file /etc/default/grub in dom0.
  • Find the line that begins with GRUB_CMDLINE_LINUX .
  • Add usbcore.authorized_default=0 and rd.qubes.dom0_usb=<BDF> to that line, where <BDF> is the USB controller identifier.
  • Save and close the file.
  • Run the command grub2-mkconfig -o /boot/grub2/grub.cfg (legacy boot) or grub2-mkconfig -o /boot/efi/EFI/qubes/grub.cfg (EFI) in dom0.
  • Reboot.

That’s the expected result. Now you need to perform last 8th step:

And create sys-usb. There is a link in the step on how to do it. You need to run this command in dom0:
sudo qubesctl state.sls qvm.sys-usb

sysusb.log (4.5 KB)

Here seems to be the same problem:

Check the output of this command in dom0:
sudo qubesctl top.enabled pillar=True