QubesOS / qubes-issues

The Qubes OS Project issue tracker
https://www.qubes-os.org/doc/issue-tracking/
526 stars 46 forks source link

USB camera (in HP laptop) is not detected by Devices Widget or qvm-usb in dom0 #4346

Open daniel-ayers opened 5 years ago

daniel-ayers commented 5 years ago

Qubes OS version:

R4.0 (with current dom0 updates)

Affected component(s):

Unknown


Steps to reproduce the behavior:

  1. Install and boot R4.0 on an HP laptop with USB-connected camera (USB 04f2:b51d)

  2. Verify that device is listed in lsusb -v in dom0.

  3. Verify that device is listed in qvm-usb in dom0 and in Devices Widget.

  4. Attempt to connect camera to a Qube for video conferencing.

Expected behavior:

Device is listed in lsusb -v as follows:

Bus 001 Device 005: ID 04f2:b51d Chicony Electronics Co., Ltd 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass          239 Miscellaneous Device
  bDeviceSubClass         2 
  bDeviceProtocol         1 Interface Association
  bMaxPacketSize0        64
  idVendor           0x04f2 Chicony Electronics Co., Ltd
  idProduct          0xb51d 
  bcdDevice           99.06
  iManufacturer           3 
  iProduct                1 
  iSerial                 2 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          808
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          4 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Association:
      bLength                 8
      bDescriptorType        11
      bFirstInterface         0
      bInterfaceCount         2
      bFunctionClass         14 Video
      bFunctionSubClass       3 Video Interface Collection
      bFunctionProtocol       0 
      iFunction               5 
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      1 Video Control
      bInterfaceProtocol      0 
      iInterface              5 
      VideoControl Interface Descriptor:
        bLength                13
        bDescriptorType        36
        bDescriptorSubtype      1 (HEADER)
        bcdUVC               1.00
        wTotalLength           78
        dwClockFrequency       15.000000MHz
        bInCollection           1
        baInterfaceNr( 0)       1
      VideoControl Interface Descriptor:
        bLength                18
        bDescriptorType        36
        bDescriptorSubtype      2 (INPUT_TERMINAL)
        bTerminalID             1
        wTerminalType      0x0201 Camera Sensor
        bAssocTerminal          0
        iTerminal               0 
        wObjectiveFocalLengthMin      0
        wObjectiveFocalLengthMax      0
        wOcularFocalLength            0
        bControlSize                  3
        bmControls           0x0000000e
          Auto-Exposure Mode
          Auto-Exposure Priority
          Exposure Time (Absolute)
      VideoControl Interface Descriptor:
        bLength                11
        bDescriptorType        36
        bDescriptorSubtype      5 (PROCESSING_UNIT)
      Warning: Descriptor too short
        bUnitID                 2
        bSourceID               1
        wMaxMultiplier          0
        bControlSize            2
        bmControls     0x0000157f
          Brightness
          Contrast
          Hue
          Saturation
          Sharpness
          Gamma
          White Balance Temperature
          Backlight Compensation
          Power Line Frequency
          White Balance Temperature, Auto
        iProcessing             0 
        bmVideoStandards     0x 9
          None
          SECAM - 625/50
      VideoControl Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      3 (OUTPUT_TERMINAL)
        bTerminalID             3
        wTerminalType      0x0101 USB Streaming
        bAssocTerminal          0
        bSourceID               4
        iTerminal               0 
      VideoControl Interface Descriptor:
        bLength                27
        bDescriptorType        36
        bDescriptorSubtype      6 (EXTENSION_UNIT)
        bUnitID                 4
        guidExtensionCode         {8ca72912-b447-9440-b0ce-db07386fb938}
        bNumControl             2
        bNrPins                 1
        baSourceID( 0)          2
        bControlSize            2
        bmControls( 0)       0x00
        bmControls( 1)       0x06
        iExtension              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0010  1x 16 bytes
        bInterval               6
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0 
      iInterface              0 
      VideoStreaming Interface Descriptor:
        bLength                            15
        bDescriptorType                    36
        bDescriptorSubtype                  1 (INPUT_HEADER)
        bNumFormats                         2
        wTotalLength                      571
        bEndPointAddress                  129
        bmInfo                              0
        bTerminalLink                       3
        bStillCaptureMethod                 2
        bTriggerSupport                     1
        bTriggerUsage                       0
        bControlSize                        1
        bmaControls( 0)                    27
        bmaControls( 1)                    27
      VideoStreaming Interface Descriptor:
        bLength                            27
        bDescriptorType                    36
        bDescriptorSubtype                  4 (FORMAT_UNCOMPRESSED)
        bFormatIndex                        1
        bNumFrameDescriptors                5
        guidFormat                            {59555932-0000-1000-8000-00aa00389b71}
        bBitsPerPixel                      16
        bDefaultFrameIndex                  1
        bAspectRatioX                       0
        bAspectRatioY                       0
        bmInterlaceFlags                 0x00
          Interlaced stream or variable: No
          Fields per frame: 2 fields
          Field 1 first: No
          Field pattern: Field 1 only
          bCopyProtect                      0
      VideoStreaming Interface Descriptor:
        bLength                            34
        bDescriptorType                    36
        bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
        bFrameIndex                         1
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            640
        wHeight                           480
        dwMinBitRate                 73728000
        dwMaxBitRate                147456000
        dwMaxVideoFrameBufferSize      614400
        dwDefaultFrameInterval         333333
        bFrameIntervalType                  2
        dwFrameInterval( 0)            333333
        dwFrameInterval( 1)            666666
      VideoStreaming Interface Descriptor:
        bLength                            34
        bDescriptorType                    36
        bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
        bFrameIndex                         2
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            320
        wHeight                           180
        dwMinBitRate                 13824000
        dwMaxBitRate                 27648000
        dwMaxVideoFrameBufferSize      115200
        dwDefaultFrameInterval         333333
        bFrameIntervalType                  2
        dwFrameInterval( 0)            333333
        dwFrameInterval( 1)            666666
      VideoStreaming Interface Descriptor:
        bLength                            34
        bDescriptorType                    36
        bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
        bFrameIndex                         3
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            320
        wHeight                           240
        dwMinBitRate                 18432000
        dwMaxBitRate                 36864000
        dwMaxVideoFrameBufferSize      153600
        dwDefaultFrameInterval         333333
        bFrameIntervalType                  2
        dwFrameInterval( 0)            333333
        dwFrameInterval( 1)            666666
      VideoStreaming Interface Descriptor:
        bLength                            34
        bDescriptorType                    36
        bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
        bFrameIndex                         4
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            424
        wHeight                           240
        dwMinBitRate                 24422400
        dwMaxBitRate                 48844800
        dwMaxVideoFrameBufferSize      203520
        dwDefaultFrameInterval         333333
        bFrameIntervalType                  2
        dwFrameInterval( 0)            333333
        dwFrameInterval( 1)            666666
      VideoStreaming Interface Descriptor:
        bLength                            34
        bDescriptorType                    36
        bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
        bFrameIndex                         5
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            640
        wHeight                           360
        dwMinBitRate                 55296000
        dwMaxBitRate                110592000
        dwMaxVideoFrameBufferSize      460800
        dwDefaultFrameInterval         333333
        bFrameIntervalType                  2
        dwFrameInterval( 0)            333333
        dwFrameInterval( 1)            666666
      VideoStreaming Interface Descriptor:
        bLength                            26
        bDescriptorType                    36
        bDescriptorSubtype                  3 (STILL_IMAGE_FRAME)
        bEndpointAddress                    0
        bNumImageSizePatterns               5
        wWidth( 0)                        640
        wHeight( 0)                       480
        wWidth( 1)                        320
        wHeight( 1)                       180
        wWidth( 2)                        320
        wHeight( 2)                       240
        wWidth( 3)                        424
        wHeight( 3)                       240
        wWidth( 4)                        640
        wHeight( 4)                       360
        bNumCompressionPatterns             5
      VideoStreaming Interface Descriptor:
        bLength                             6
        bDescriptorType                    36
        bDescriptorSubtype                 13 (COLORFORMAT)
        bColorPrimaries                     1 (BT.709,sRGB)
        bTransferCharacteristics            1 (BT.709)
        bMatrixCoefficients                 4 (SMPTE 170M (BT.601))
      VideoStreaming Interface Descriptor:
        bLength                            11
        bDescriptorType                    36
        bDescriptorSubtype                  6 (FORMAT_MJPEG)
        bFormatIndex                        2
        bNumFrameDescriptors                8
        bFlags                              1
          Fixed-size samples: Yes
        bDefaultFrameIndex                  1
        bAspectRatioX                       0
        bAspectRatioY                       0
        bmInterlaceFlags                 0x00
          Interlaced stream or variable: No
          Fields per frame: 1 fields
          Field 1 first: No
          Field pattern: Field 1 only
          bCopyProtect                      0
      VideoStreaming Interface Descriptor:
        bLength                            34
        bDescriptorType                    36
        bDescriptorSubtype                  7 (FRAME_MJPEG)
        bFrameIndex                         1
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            640
        wHeight                           480
        dwMinBitRate                 73728000
        dwMaxBitRate                147456000
        dwMaxVideoFrameBufferSize      614400
        dwDefaultFrameInterval         333333
        bFrameIntervalType                  2
        dwFrameInterval( 0)            333333
        dwFrameInterval( 1)            666666
      VideoStreaming Interface Descriptor:
        bLength                            34
        bDescriptorType                    36
        bDescriptorSubtype                  7 (FRAME_MJPEG)
        bFrameIndex                         2
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            320
        wHeight                           180
        dwMinBitRate                 13824000
        dwMaxBitRate                 27648000
        dwMaxVideoFrameBufferSize      115200
        dwDefaultFrameInterval         333333
        bFrameIntervalType                  2
        dwFrameInterval( 0)            333333
        dwFrameInterval( 1)            666666
      VideoStreaming Interface Descriptor:
        bLength                            34
        bDescriptorType                    36
        bDescriptorSubtype                  7 (FRAME_MJPEG)
        bFrameIndex                         3
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            320
        wHeight                           240
        dwMinBitRate                 18432000
        dwMaxBitRate                 36864000
        dwMaxVideoFrameBufferSize      153600
        dwDefaultFrameInterval         333333
        bFrameIntervalType                  2
        dwFrameInterval( 0)            333333
        dwFrameInterval( 1)            666666
      VideoStreaming Interface Descriptor:
        bLength                            34
        bDescriptorType                    36
        bDescriptorSubtype                  7 (FRAME_MJPEG)
        bFrameIndex                         4
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            424
        wHeight                           240
        dwMinBitRate                 24422400
        dwMaxBitRate                 48844800
        dwMaxVideoFrameBufferSize      203520
        dwDefaultFrameInterval         333333
        bFrameIntervalType                  2
        dwFrameInterval( 0)            333333
        dwFrameInterval( 1)            666666
      VideoStreaming Interface Descriptor:
        bLength                            34
        bDescriptorType                    36
        bDescriptorSubtype                  7 (FRAME_MJPEG)
        bFrameIndex                         5
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            640
        wHeight                           360
        dwMinBitRate                 55296000
        dwMaxBitRate                110592000
        dwMaxVideoFrameBufferSize      460800
        dwDefaultFrameInterval         333333
        bFrameIntervalType                  2
        dwFrameInterval( 0)            333333
        dwFrameInterval( 1)            666666
      VideoStreaming Interface Descriptor:
        bLength                            34
        bDescriptorType                    36
        bDescriptorSubtype                  7 (FRAME_MJPEG)
        bFrameIndex                         6
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            848
        wHeight                           480
        dwMinBitRate                 97689600
        dwMaxBitRate                195379200
        dwMaxVideoFrameBufferSize      814080
        dwDefaultFrameInterval         333333
        bFrameIntervalType                  2
        dwFrameInterval( 0)            333333
        dwFrameInterval( 1)            666666
      VideoStreaming Interface Descriptor:
        bLength                            34
        bDescriptorType                    36
        bDescriptorSubtype                  7 (FRAME_MJPEG)
        bFrameIndex                         7
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            960
        wHeight                           540
        dwMinBitRate                124416000
        dwMaxBitRate                248832000
        dwMaxVideoFrameBufferSize     1036800
        dwDefaultFrameInterval         333333
        bFrameIntervalType                  2
        dwFrameInterval( 0)            333333
        dwFrameInterval( 1)            666666
      VideoStreaming Interface Descriptor:
        bLength                            34
        bDescriptorType                    36
        bDescriptorSubtype                  7 (FRAME_MJPEG)
        bFrameIndex                         8
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                           1280
        wHeight                           720
        dwMinBitRate                221184000
        dwMaxBitRate                442368000
        dwMaxVideoFrameBufferSize     1843200
        dwDefaultFrameInterval         333333
        bFrameIntervalType                  2
        dwFrameInterval( 0)            333333
        dwFrameInterval( 1)            666666
      VideoStreaming Interface Descriptor:
        bLength                            38
        bDescriptorType                    36
        bDescriptorSubtype                  3 (STILL_IMAGE_FRAME)
        bEndpointAddress                    0
        bNumImageSizePatterns               8
        wWidth( 0)                        640
        wHeight( 0)                       480
        wWidth( 1)                        320
        wHeight( 1)                       180
        wWidth( 2)                        320
        wHeight( 2)                       240
        wWidth( 3)                        424
        wHeight( 3)                       240
        wWidth( 4)                        640
        wHeight( 4)                       360
        wWidth( 5)                        848
        wHeight( 5)                       480
        wWidth( 6)                        960
        wHeight( 6)                       540
        wWidth( 7)                       1280
        wHeight( 7)                       720
        bNumCompressionPatterns             8
      VideoStreaming Interface Descriptor:
        bLength                             6
        bDescriptorType                    36
        bDescriptorSubtype                 13 (COLORFORMAT)
        bColorPrimaries                     1 (BT.709,sRGB)
        bTransferCharacteristics            1 (BT.709)
        bMatrixCoefficients                 4 (SMPTE 170M (BT.601))
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0080  1x 128 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       2
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       3
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       4
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0b00  2x 768 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       5
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0c00  2x 1024 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       6
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x1380  3x 896 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       7
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x1400  3x 1024 bytes
        bInterval               1

Device is also listed in qvm-usb output and shown in Device Widget.

Device can be connected to Qube and works for video conferencing.

Actual behavior:

Device is shown in lsusb -v as above.

Device is not listed in qvm-usb (output is blank apart from header line).

Device is not shown in Devices Widget (but microphone and block devices are).

General notes:


Related issues:

andrewdavidwong commented 5 years ago

Duplicate of #4035

andrewdavidwong commented 5 years ago

This appears to be a duplicate of an existing issue. If you believe this is not really a duplicate, please leave a comment briefly explaining why. We'll be happy to take another look and, if appropriate, reopen this issue. Thank you.

daniel-ayers commented 5 years ago

I reviewed that issue prior to opening this one. I did not think this was a duplicate because there is a clear difference - in https://github.com/QubesOS/qubes-issues/issues/4035 the camera can be attached to a VM (the problem there is it doesn't work and later disappears). In this issue, the camera never appears in dom0 lsusb or the Device Widget.

I don't know enough about the inner workings of Qubes to say whether this is a duplicate or not, but I wanted to point out that there is a clear difference in the reported issue.

daniel-ayers commented 5 years ago

Clarification: the camera never appears in qvm-usb either, and since it never appears in any of the tools that can be used to assign it to a VM is cannot be assigned to a VM.

andrewdavidwong commented 5 years ago

Might be a localized hardware issue, but I'll reopen for now.

astroneer commented 3 years ago

I hope to contribute with additional details to this issue. In my case I attach an external USB camera and observe the same behavior:

Here's my dmesg log of dom0, which shows that something happens when plugging the USB camera in and out:

Plugging in: [Sat Feb 20 13:02:49 2021] usb 2-2.4: new high-speed USB device number 5 using xhci_hcd [Sat Feb 20 13:02:49 2021] usb 2-2.4: New USB device found, idVendor=13d3, idProduct=784b, bcdDevice= 5.14 [Sat Feb 20 13:02:49 2021] usb 2-2.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [Sat Feb 20 13:02:49 2021] usb 2-2.4: Product: Integrated Camera [Sat Feb 20 13:02:49 2021] usb 2-2.4: Manufacturer: FLH-BY-0309-200514 [Sat Feb 20 13:02:49 2021] mc: Linux media interface: v0.10 [Sat Feb 20 13:02:49 2021] videodev: Linux video capture interface: v2.00 [Sat Feb 20 13:02:49 2021] uvcvideo: Found UVC 1.00 device Integrated Camera (13d3:784b) [Sat Feb 20 13:02:49 2021] uvcvideo: Failed to query (GET_INFO) UVC control 3 on unit 1: -32 (exp. 1). [Sat Feb 20 13:02:49 2021] input: Integrated Camera: Integrated C as /devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2.4/2-2.4:1.0/input/input36 [Sat Feb 20 13:02:49 2021] usbcore: registered new interface driver uvcvideo [Sat Feb 20 13:02:49 2021] USB Video Class driver (1.1.1) Plugging out: [Sat Feb 20 13:04:39 2021] usb 2-2.4: USB disconnect, device number 5

While plugged in lsusb detects the USB camera (qvm-usb does not show the device): $ lsusb Bus 002 Device 007: ID 13d3:784b IMC Networks

marmarek commented 3 years ago

Here's my dmesg log of dom0

To use qvm-usb, you need to create USB qube: https://www.qubes-os.org/doc/usb-qubes/

astroneer commented 3 years ago

To use qvm-usb, you need to create USB qube

Yes, obviously (I should have skipped the qvm-usb part in my comment...) My understanding: Without sys-usb all USB device should arrive in dom0, displayed in the Devices Widget and can be attached to qubes (I know that for security a sys-usb qube, immediately taking care of new USB devices, is necessary to avoid attaching devices directly to dom0). In my (non-secure) setup without sys-usb, which I assume could be the same as the author of this issue, I see all USB devices I tried appearing in the Device Widget, allowing me to attach them to qubes; except for this USB camera. I just hoped to help with the dmesg logs as possible hints.

github-actions[bot] commented 11 months ago

This issue is being closed because:

If anyone believes that this issue should be reopened and reassigned to an active milestone, please leave a brief comment. (For example, if a bug still affects Qubes OS 4.1, then the comment "Affects 4.1" will suffice.)

mahakal commented 5 months ago

Affects 4.2 The internal Webcam works in Dom0(after allowing using USBguard) but won't show up in the device widget. Lenovo Legion 5 Pro HCL and cpio files https://forum.qubes-os.org/t/lenovo-legion-5-pro-16ach6h-82jq/23559

xaki23 commented 5 months ago

Affects 4.2 The internal Webcam works in Dom0(after allowing using USBguard) but won't show up in the device widget.

this is by design / as intended. if you want to pass around USB devices, connect them to a USB controller attached to a USB-VM like sys-usb. see: https://github.com/QubesOS/qubes-issues/issues/4346#issuecomment-782630339

(and afair, with the 16ach6h, that is a problem... but a very separate problem from this old issue.)

mahakal commented 5 months ago

I did create a sys-usb and passed the appropriate usb controller where the internal webcam is hardwired and tried everything I could I found on google.

I allowed the device on dom0 to check whether it's a driver related issue, the webcam works fine in dom0, used cheese.

But the internal webcam won't show in device widget but other devices on the same controller do show and have no problem with passthrough to other VM's.

That's why I replied on the thread.

(and afair, with the 16ach6h, that is a problem... but a very separate problem from this old issue.)

Can you tell about the problem with 16ach6h a bit maybe it will help me to troubleshoot a bit.

xaki23 commented 5 months ago

I did create a sys-usb and passed the appropriate usb controller where the internal webcam is hardwired and tried everything I could I found on google. I allowed the device on dom0 to check whether it's a driver related issue, the webcam works fine in dom0, used cheese.

if the usb device still shows up in dom0, the usb controller it is attached to is still in dom0, not in sys-usb. please doublecheck all your usb-controller PCI devices are passed to sys-usb. and i recommend you disable sys-usb autostart, because ...

Can you tell about the problem with 16ach6h a bit maybe it will help me to troubleshoot a bit.

... i am pretty sure we had an unsolved 16ach6h support case in qubes chat last week where the machine did a hard reboot every time sys-usb started.

mahakal commented 5 months ago

if the usb device still shows up in dom0, the usb controller it is attached to is still in dom0, not in sys-usb. please doublecheck all your usb-controller PCI devices are passed to sys-usb. and i recommend you disable sys-usb autostart, because ...

The device to which the USB controller belongs to is attached to sys-usb, the other HID devices and block devices on the controller are working fine except the webcam and I can rule out the driver problem as it is working fine in dom0. Problem being it's not showing up in the device widget.

... i am pretty sure we had an unsolved 16ach6h support case in qubes chat last week where the machine did a hard reboot every time sys-usb started.

Yes, I had encountered that problem when installing qubes v4.0rc3, v4.0rc4 and v4 stable and the first boot crashed at creation and starting up of sys-usb which could be mitigated by adding the kernel option to skip_autostart in grub boot menu or not creating the sys-usb at firstboot.

Side Note:

Just a suggestion that there should be an option for selecting the usb controllers to attach when creating the sys-usb at first boot.

So there are two pci usb controllers in 16ach6h the system crashes when attaching one of them to sys-usb and there's no logs as the system crashes so no way to debug that easily, my guess would be that the faulty usb controller is attached to some critical cpu related component hence the system crash. Or maybe some misconfiguration in the device configuration in mainline linux.

Did you check the HCL report it's in plain text and the thread is where detailed. And all the system info is available in the cpio archive, do check that out.

And yeah the webcam controller is the one attached to sys-usb but not showing up in the device widget.

I'm on the qubes IRC channel if you need to get some additional info or run some test on the device.

DemiMarie commented 4 months ago

Just a suggestion that there should be an option for selecting the usb controllers to attach when creating the sys-usb at first boot.

In the common case where there is only 1 USB controller I don’t think this is needed, but if there is more than one controller this would be an amazing idea. There are multiple good reasons to keep a controller in dom0:

  1. The system crashes when the controller is assigned to a VM.
  2. The controller is dedicated for USB keyboard & mouse use.