Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It exits with status 255 and doesn't seem to do anything. #8

Open
andrejpodzimek opened this issue May 26, 2020 · 11 comments
Open

It exits with status 255 and doesn't seem to do anything. #8

andrejpodzimek opened this issue May 26, 2020 · 11 comments

Comments

@andrejpodzimek
Copy link

The monitor is an UltraFine 27MD5KL. It works fine, albeit with certain difficulties.

Here's a full strace -f.

@Tamas-Toth-ebola
Copy link

Hi @andrejpodzimek !

Seems your problem is the same as mine here: #5

Try to use ddcutil as it seems fine for me but not yet confirmed that the result made by it is the same what lguf-brightness could reach.

@andrejpodzimek
Copy link
Author

Not sure how ddcutil is supposed to work:

$ ddcutil detect
No displays found

@andrejpodzimek
Copy link
Author

And yet ddcutil usbenv does know about my monitor. (Not sure why it should fall into the USB monitor category before USB 4, but it apparently does).

The following tests probe for USB connected monitors.

Checking for USB connected monitors...

   Using lsusb to summarize USB devices...
      Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
      Bus 001 Device 002: ID 18d1:5026 Google Inc. hg_0005
      Bus 001 Device 003: ID 04f2:b67c Chicony Electronics Co., Ltd Integrated Camera
      Bus 001 Device 004: ID 06cb:00bd Synaptics, Inc. 
      Bus 001 Device 005: ID 8087:0aaa Intel Corp. 
      Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
      Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
      Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
      Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
      Bus 005 Device 002: ID 17ef:3080 Lenovo USB2.0 Hub             
      Bus 005 Device 003: ID 17ef:3080 Lenovo 
      Bus 005 Device 004: ID 1532:0039 Razer USA, Ltd USB2.0 Hub             
      Bus 005 Device 005: ID 1532:0214 Razer USA, Ltd BlackWidow Ultimate 2016
      Bus 005 Device 006: ID 17ef:3081 Lenovo 
      Bus 005 Device 007: ID 2109:8818 VIA Labs, Inc. 
      Bus 005 Device 009: ID 17ef:3083 Lenovo USB2.0 Hub             
      Bus 005 Device 010: ID 2109:8818 VIA Labs, Inc. 
      Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
      Bus 006 Device 002: ID 17ef:307f Lenovo USB3.1 Hub             
      Bus 006 Device 003: ID 17ef:307f Lenovo 
      Bus 006 Device 004: ID 17ef:3082 Lenovo USB3.1 Hub             
      Bus 007 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
      Bus 007 Device 002: ID 043e:9a61 LG Electronics USA, Inc. USB2.1 Hub
      Bus 007 Device 003: ID 043e:9a73 LG Electronics USA, Inc. 
      Bus 007 Device 004: ID 043e:9a66 LG Electronics USA, Inc. 
      Bus 007 Device 005: ID 043e:9a70 LG Electronics USA, Inc. USB2.1 Hub
      Bus 008 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
      Bus 008 Device 002: ID 043e:9a60 LG Electronics USA, Inc. USB3.1 Hub
      Bus 008 Device 003: ID 043e:9a71 LG Electronics USA, Inc. 
      Bus 008 Device 004: ID 043e:9a68 LG Electronics USA, Inc. 
      Bus 008 Device 005: ID 18d1:4ee1 Google Inc. Nexus Device (MTP)

   USB device topology...
      /:  Bus 08.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 10000M
          |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
              |__ Port 1: Dev 5, If 0, Class=Imaging, Driver=, 5000M
              |__ Port 4: Dev 3, If 0, Class=Hub, Driver=hub/3p, 5000M
                  |__ Port 3: Dev 4, If 2, Class=Human Interface Device, Driver=usbhid, 5000M
                  |__ Port 3: Dev 4, If 0, Class=Video, Driver=uvcvideo, 5000M
                  |__ Port 3: Dev 4, If 1, Class=Video, Driver=uvcvideo, 5000M
      /:  Bus 07.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 480M
          |__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
              |__ Port 4: Dev 3, If 0, Class=Hub, Driver=hub/3p, 480M
                  |__ Port 1: Dev 4, If 1, Class=Audio, Driver=snd-usb-audio, 480M
                  |__ Port 1: Dev 4, If 2, Class=Audio, Driver=snd-usb-audio, 480M
                  |__ Port 1: Dev 4, If 0, Class=Audio, Driver=snd-usb-audio, 480M
                  |__ Port 2: Dev 5, If 0, Class=Human Interface Device, Driver=usbhid, 12M
                  |__ Port 2: Dev 5, If 1, Class=Human Interface Device, Driver=usbhid, 12M
                  |__ Port 2: Dev 5, If 2, Class=Human Interface Device, Driver=usbhid, 12M
      /:  Bus 06.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 10000M
          |__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/4p, 10000M
              |__ Port 1: Dev 3, If 0, Class=Hub, Driver=hub/4p, 10000M
                  |__ Port 2: Dev 4, If 0, Class=Vendor Specific Class, Driver=r8152, 5000M
      /:  Bus 05.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 480M
          |__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/5p, 480M
              |__ Port 1: Dev 3, If 0, Class=Hub, Driver=hub/5p, 480M
                  |__ Port 1: Dev 6, If 0, Class=Hub, Driver=hub/2p, 480M
                      |__ Port 2: Dev 9, If 0, Class=Audio, Driver=snd-usb-audio, 12M
                      |__ Port 2: Dev 9, If 1, Class=Audio, Driver=snd-usb-audio, 12M
                      |__ Port 2: Dev 9, If 2, Class=Audio, Driver=snd-usb-audio, 12M
                      |__ Port 2: Dev 9, If 3, Class=Human Interface Device, Driver=usbhid, 12M
                  |__ Port 5: Dev 10, If 0, Class=, Driver=, 480M
              |__ Port 2: Dev 4, If 0, Class=Human Interface Device, Driver=usbhid, 12M
              |__ Port 2: Dev 4, If 1, Class=Human Interface Device, Driver=usbhid, 12M
              |__ Port 3: Dev 5, If 2, Class=Human Interface Device, Driver=usbhid, 12M
              |__ Port 3: Dev 5, If 0, Class=Human Interface Device, Driver=usbhid, 12M
              |__ Port 3: Dev 5, If 1, Class=Human Interface Device, Driver=usbhid, 12M
              |__ Port 5: Dev 7, If 0, Class=, Driver=, 480M
      /:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 10000M
      /:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 480M
      /:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 10000M
      /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/12p, 480M
          |__ Port 3: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 12M
          |__ Port 8: Dev 3, If 3, Class=Video, Driver=uvcvideo, 480M
          |__ Port 8: Dev 3, If 1, Class=Video, Driver=uvcvideo, 480M
          |__ Port 8: Dev 3, If 2, Class=Video, Driver=uvcvideo, 480M
          |__ Port 8: Dev 3, If 0, Class=Video, Driver=uvcvideo, 480M
          |__ Port 9: Dev 4, If 0, Class=Vendor Specific Class, Driver=, 12M
          |__ Port 10: Dev 5, If 0, Class=Wireless, Driver=btusb, 12M
          |__ Port 10: Dev 5, If 1, Class=Wireless, Driver=btusb, 12M

   Listing /dev/usb...
      celkem 0
      crw------- 1 root root 180, 0 kvě 26 18:08 hiddev0
      crw------- 1 root root 180, 1 kvě 26 18:10 hiddev1
      crw------- 1 root root 180, 2 kvě 26 18:10 hiddev2
      crw------- 1 root root 180, 3 kvě 26 18:10 hiddev3
      crw------- 1 root root 180, 4 kvě 26 18:10 hiddev4

   Listing /dev/hiddev*...
      ls: nelze přistoupit k '/dev/hiddev*': Adresář nebo soubor neexistuje

   Listing /dev/bus/usb...
      celkem 0
      drwxr-xr-x 2 root root 140 kvě 26 18:10 001
      drwxr-xr-x 2 root root  60 kvě 26 18:08 002
      drwxr-xr-x 2 root root  60 kvě 26 18:08 003
      drwxr-xr-x 2 root root  60 kvě 26 18:10 004
      drwxr-xr-x 2 root root 220 kvě 26 18:10 005
      drwxr-xr-x 2 root root 120 kvě 26 18:10 006
      drwxr-xr-x 2 root root 140 kvě 26 18:10 007
      drwxr-xr-x 2 root root 140 kvě 26 19:03 008

   Listing /dev/hidraw*...
      crw-------  1 root root    249,  0 kvě 26 18:08 /dev/hidraw0
      crw-rw----+ 1 root plugdev 249,  1 kvě 26 18:08 /dev/hidraw1
      crw-------  1 root root    249, 10 kvě 26 18:10 /dev/hidraw10
      crw-------  1 root root    249, 11 kvě 26 18:10 /dev/hidraw11
      crw-------  1 root root    249,  2 kvě 26 18:10 /dev/hidraw2
      crw-------  1 root root    249,  3 kvě 26 18:10 /dev/hidraw3
      crw-------  1 root root    249,  4 kvě 26 18:10 /dev/hidraw4
      crw-------  1 root root    249,  5 kvě 26 18:10 /dev/hidraw5
      crw-------  1 root root    249,  6 kvě 26 18:10 /dev/hidraw6
      crw-------  1 root root    249,  7 kvě 26 18:10 /dev/hidraw7
      crw-------  1 root root    249,  8 kvě 26 18:10 /dev/hidraw8
      crw-------  1 root root    249,  9 kvě 26 18:10 /dev/hidraw9


Checking for USB HID devices using hiddev...
   Found 5 USB HID devices.

   Unable to open device /dev/usb/hiddev0: Permission denied

Parent device:
   struct udev_device at: 0x5574b345c340
      devpath:   /devices/pci0000:00/0000:00:14.0/usb1/1-3
      subsystem: usb
      devtype:   usb_device
      syspath:   /sys/devices/pci0000:00/0000:00:14.0/usb1/1-3
      sysname:   1-3
      sysnum:    3
      devnode:   /dev/bus/usb/001/002
      Properties:
         BUSNUM -> 001
         DEVNAME -> /dev/bus/usb/001/002
         DEVNUM -> 002
         DEVPATH -> /devices/pci0000:00/0000:00:14.0/usb1/1-3
         DEVTYPE -> usb_device
         DRIVER -> usb
         ID_BUS -> usb
         ID_FOR_SEAT -> usb-pci-0000_00_14_0-usb-0_3
         ID_MODEL -> hg_0005
         ID_MODEL_ENC -> hg_0005
         ID_MODEL_ID -> 5026
         ID_PATH -> pci-0000:00:14.0-usb-0:3
         ID_PATH_TAG -> pci-0000_00_14_0-usb-0_3
         ID_REVISION -> 0100
         ID_SERIAL -> Google_Inc._hg_0005
         ID_USB_INTERFACES -> :030000:
         ID_VENDOR -> Google_Inc.
         ID_VENDOR_ENC -> Google\x20Inc.
         ID_VENDOR_FROM_DATABASE -> Google Inc.
         ID_VENDOR_ID -> 18d1
         MAJOR -> 189
         MINOR -> 1
         PRODUCT -> 18d1/5026/100
         REALTEK_NIC_MODE -> 1
         SUBSYSTEM -> usb
         TAGS -> :seat:uaccess:
         TYPE -> 0/0/0
         USEC_INITIALIZED -> 3757694
      Sysattrs:
         authorized -> 1
         avoid_reset_quirk -> 0
         bConfigurationValue -> 1
         bDeviceClass -> 00
         bDeviceProtocol -> 00
         bDeviceSubClass -> 00
         bMaxPacketSize0 -> 64
         bMaxPower -> 100mA
         bNumConfigurations -> 1
         bNumInterfaces ->  1
         bcdDevice -> 0100
         bmAttributes -> 80
         busnum -> 1
         configuration -> 1.1
         descriptors -> ��
         dev -> 189:1
         devnum -> 2
         devpath -> 3
         driver -> usb
         firmware_node -> (null)
         idProduct -> 5026
         idVendor -> 18d1
         ltm_capable -> no
         manufacturer -> Google Inc.
         maxchild -> 0
         port -> (null)
         product -> hg_0005
         quirks -> 0x0
         removable -> removable
         rx_lanes -> 1
         speed -> 12
         subsystem -> usb
         tx_lanes -> 1
         uevent -> MAJOR=189
                   MINOR=1
                   DEVNAME=bus/usb/001/002
                   DEVTYPE=usb_device
                   DRIVER=usb
                   PRODUCT=18d1/5026/100
                   TYPE=0/0/0
                   BUSNUM=001
                   DEVNUM=002
         urbnum -> 1912
         version ->  2.00
      Detiled device summary for testing: 
         Usb_Detailed_Device_Summary at: 0x5574b34530f0
            devname                                                  : /dev/usb/hiddev0
            vendor_id                                                : 18d1
            product_id                                            () : 5026
            vendor_name                                              : Google Inc.
            product_name                                             : hg_0005
            busnum_s                                                 : 1
            devnum_s                                                 : 2
            prop_busnum                                              : 001
            prop_devnum                                              : 002
            prop_model                                               : hg_0005
            prop_model_id                                            : 5026
            prop_usb_interfaces                                      : :030000:
            prop_vendor                                              : Google_Inc.
            prop_vendor_from_database                                : Google Inc.
            prop_vendor_id                                           : 18d1
            prop_major                                               : 189
            prop_minor                                               : 1
      USB bus 1, device 2, vid:pid: 18d1:5026 - Google Inc.:hg_0005

   Device /dev/usb/hiddev1 is not a HID device or is a mouse or keyboard.  Skipping

   Unable to open device /dev/usb/hiddev2: Permission denied

Parent device:
   struct udev_device at: 0x5574b3450260
      devpath:   /devices/pci0000:00/0000:00:1d.4/0000:05:00.0/0000:06:01.0/0000:08:00.0/0000:09:04.0/0000:0b:00.0/0000:0c:02.0/0000:0d:00.0/usb7/7-2/7-2.4/7-2.4.2
      subsystem: usb
      devtype:   usb_device
      syspath:   /sys/devices/pci0000:00/0000:00:1d.4/0000:05:00.0/0000:06:01.0/0000:08:00.0/0000:09:04.0/0000:0b:00.0/0000:0c:02.0/0000:0d:00.0/usb7/7-2/7-2.4/7-2.4.2
      sysname:   7-2.4.2
      sysnum:    2
      devnode:   /dev/bus/usb/007/005
      Properties:
         BUSNUM -> 007
         DEVNAME -> /dev/bus/usb/007/005
         DEVNUM -> 005
         DEVPATH -> /devices/pci0000:00/0000:00:1d.4/0000:05:00.0/0000:06:01.0/0000:08:00.0/0000:09:04.0/0000:0b:00.0/0000:0c:02.0/0000:0d:00.0/usb7/7-2/7-2.4/7-2.4.2
         DEVTYPE -> usb_device
         DRIVER -> usb
         ID_BUS -> usb
         ID_MODEL -> LG_UltraFine_Display_Controls
         ID_MODEL_ENC -> LG\x20UltraFine\x20Display\x20Controls
         ID_MODEL_ID -> 9a70
         ID_PATH -> pci-0000:0d:00.0-usb-0:2.4.2
         ID_PATH_TAG -> pci-0000_0d_00_0-usb-0_2_4_2
         ID_REVISION -> 0413
         ID_SERIAL -> LG_Electronics_Inc._LG_UltraFine_Display_Controls
         ID_USB_INTERFACES -> :030000:
         ID_VENDOR -> LG_Electronics_Inc.
         ID_VENDOR_ENC -> LG\x20Electronics\x20Inc.
         ID_VENDOR_FROM_DATABASE -> LG Electronics USA, Inc.
         ID_VENDOR_ID -> 043e
         MAJOR -> 189
         MINOR -> 772
         PRODUCT -> 43e/9a70/413
         SUBSYSTEM -> usb
         TYPE -> 0/0/0
         USEC_INITIALIZED -> 110696624
      Sysattrs:
         authorized -> 1
         avoid_reset_quirk -> 0
         bConfigurationValue -> 1
         bDeviceClass -> 00
         bDeviceProtocol -> 00
         bDeviceSubClass -> 00
         bMaxPacketSize0 -> 64
         bMaxPower -> 0mA
         bNumConfigurations -> 1
         bNumInterfaces ->  3
         bcdDevice -> 0413
         bmAttributes -> c0
         busnum -> 7
         configuration -> 
         descriptors -> ��
         dev -> 189:772
         devnum -> 5
         devpath -> 2.4.2
         driver -> usb
         idProduct -> 9a70
         idVendor -> 043e
         ltm_capable -> no
         manufacturer -> LG Electronics Inc.
         maxchild -> 0
         port -> (null)
         product -> LG UltraFine Display Controls
         quirks -> 0x0
         removable -> fixed
         rx_lanes -> 1
         speed -> 12
         subsystem -> usb
         tx_lanes -> 1
         uevent -> MAJOR=189
                   MINOR=772
                   DEVNAME=bus/usb/007/005
                   DEVTYPE=usb_device
                   DRIVER=usb
                   PRODUCT=43e/9a70/413
                   TYPE=0/0/0
                   BUSNUM=007
                   DEVNUM=005
         urbnum -> 20
         version ->  2.00
      Detiled device summary for testing: 
         Usb_Detailed_Device_Summary at: 0x5574b346f290
            devname                                                  : /dev/usb/hiddev2
            vendor_id                                                : 043e
            product_id                                            () : 9a70
            vendor_name                                              : LG Electronics Inc.
            product_name                                             : LG UltraFine Display Controls
            busnum_s                                                 : 7
            devnum_s                                                 : 5
            prop_busnum                                              : 007
            prop_devnum                                              : 005
            prop_model                                               : LG_UltraFine_Display_Controls
            prop_model_id                                            : 9a70
            prop_usb_interfaces                                      : :030000:
            prop_vendor                                              : LG_Electronics_Inc.
            prop_vendor_from_database                                : LG Electronics USA, Inc.
            prop_vendor_id                                           : 043e
            prop_major                                               : 189
            prop_minor                                               : 772
      USB bus 7, device 5, vid:pid: 043e:9a70 - LG Electronics Inc.:LG UltraFine Display Controls

   Unable to open device /dev/usb/hiddev3: Permission denied

Parent device:
   struct udev_device at: 0x5574b3454a30
      devpath:   /devices/pci0000:00/0000:00:1d.4/0000:05:00.0/0000:06:01.0/0000:08:00.0/0000:09:04.0/0000:0b:00.0/0000:0c:02.0/0000:0d:00.0/usb7/7-2/7-2.4/7-2.4.2
      subsystem: usb
      devtype:   usb_device
      syspath:   /sys/devices/pci0000:00/0000:00:1d.4/0000:05:00.0/0000:06:01.0/0000:08:00.0/0000:09:04.0/0000:0b:00.0/0000:0c:02.0/0000:0d:00.0/usb7/7-2/7-2.4/7-2.4.2
      sysname:   7-2.4.2
      sysnum:    2
      devnode:   /dev/bus/usb/007/005
      Properties:
         BUSNUM -> 007
         DEVNAME -> /dev/bus/usb/007/005
         DEVNUM -> 005
         DEVPATH -> /devices/pci0000:00/0000:00:1d.4/0000:05:00.0/0000:06:01.0/0000:08:00.0/0000:09:04.0/0000:0b:00.0/0000:0c:02.0/0000:0d:00.0/usb7/7-2/7-2.4/7-2.4.2
         DEVTYPE -> usb_device
         DRIVER -> usb
         ID_BUS -> usb
         ID_MODEL -> LG_UltraFine_Display_Controls
         ID_MODEL_ENC -> LG\x20UltraFine\x20Display\x20Controls
         ID_MODEL_ID -> 9a70
         ID_PATH -> pci-0000:0d:00.0-usb-0:2.4.2
         ID_PATH_TAG -> pci-0000_0d_00_0-usb-0_2_4_2
         ID_REVISION -> 0413
         ID_SERIAL -> LG_Electronics_Inc._LG_UltraFine_Display_Controls
         ID_USB_INTERFACES -> :030000:
         ID_VENDOR -> LG_Electronics_Inc.
         ID_VENDOR_ENC -> LG\x20Electronics\x20Inc.
         ID_VENDOR_FROM_DATABASE -> LG Electronics USA, Inc.
         ID_VENDOR_ID -> 043e
         MAJOR -> 189
         MINOR -> 772
         PRODUCT -> 43e/9a70/413
         SUBSYSTEM -> usb
         TYPE -> 0/0/0
         USEC_INITIALIZED -> 110696624
      Sysattrs:
         authorized -> 1
         avoid_reset_quirk -> 0
         bConfigurationValue -> 1
         bDeviceClass -> 00
         bDeviceProtocol -> 00
         bDeviceSubClass -> 00
         bMaxPacketSize0 -> 64
         bMaxPower -> 0mA
         bNumConfigurations -> 1
         bNumInterfaces ->  3
         bcdDevice -> 0413
         bmAttributes -> c0
         busnum -> 7
         configuration -> 
         descriptors -> ��
         dev -> 189:772
         devnum -> 5
         devpath -> 2.4.2
         driver -> usb
         idProduct -> 9a70
         idVendor -> 043e
         ltm_capable -> no
         manufacturer -> LG Electronics Inc.
         maxchild -> 0
         port -> (null)
         product -> LG UltraFine Display Controls
         quirks -> 0x0
         removable -> fixed
         rx_lanes -> 1
         speed -> 12
         subsystem -> usb
         tx_lanes -> 1
         uevent -> MAJOR=189
                   MINOR=772
                   DEVNAME=bus/usb/007/005
                   DEVTYPE=usb_device
                   DRIVER=usb
                   PRODUCT=43e/9a70/413
                   TYPE=0/0/0
                   BUSNUM=007
                   DEVNUM=005
         urbnum -> 20
         version ->  2.00
      Detiled device summary for testing: 
         Usb_Detailed_Device_Summary at: 0x5574b346ea50
            devname                                                  : /dev/usb/hiddev3
            vendor_id                                                : 043e
            product_id                                            () : 9a70
            vendor_name                                              : LG Electronics Inc.
            product_name                                             : LG UltraFine Display Controls
            busnum_s                                                 : 7
            devnum_s                                                 : 5
            prop_busnum                                              : 007
            prop_devnum                                              : 005
            prop_model                                               : LG_UltraFine_Display_Controls
            prop_model_id                                            : 9a70
            prop_usb_interfaces                                      : :030000:
            prop_vendor                                              : LG_Electronics_Inc.
            prop_vendor_from_database                                : LG Electronics USA, Inc.
            prop_vendor_id                                           : 043e
            prop_major                                               : 189
            prop_minor                                               : 772
      USB bus 7, device 5, vid:pid: 043e:9a70 - LG Electronics Inc.:LG UltraFine Display Controls

   Unable to open device /dev/usb/hiddev4: Permission denied

Parent device:
   struct udev_device at: 0x5574b3462a10
      devpath:   /devices/pci0000:00/0000:00:1d.4/0000:05:00.0/0000:06:01.0/0000:08:00.0/0000:09:04.0/0000:0b:00.0/0000:0c:02.0/0000:0d:00.0/usb7/7-2/7-2.4/7-2.4.2
      subsystem: usb
      devtype:   usb_device
      syspath:   /sys/devices/pci0000:00/0000:00:1d.4/0000:05:00.0/0000:06:01.0/0000:08:00.0/0000:09:04.0/0000:0b:00.0/0000:0c:02.0/0000:0d:00.0/usb7/7-2/7-2.4/7-2.4.2
      sysname:   7-2.4.2
      sysnum:    2
      devnode:   /dev/bus/usb/007/005
      Properties:
         BUSNUM -> 007
         DEVNAME -> /dev/bus/usb/007/005
         DEVNUM -> 005
         DEVPATH -> /devices/pci0000:00/0000:00:1d.4/0000:05:00.0/0000:06:01.0/0000:08:00.0/0000:09:04.0/0000:0b:00.0/0000:0c:02.0/0000:0d:00.0/usb7/7-2/7-2.4/7-2.4.2
         DEVTYPE -> usb_device
         DRIVER -> usb
         ID_BUS -> usb
         ID_MODEL -> LG_UltraFine_Display_Controls
         ID_MODEL_ENC -> LG\x20UltraFine\x20Display\x20Controls
         ID_MODEL_ID -> 9a70
         ID_PATH -> pci-0000:0d:00.0-usb-0:2.4.2
         ID_PATH_TAG -> pci-0000_0d_00_0-usb-0_2_4_2
         ID_REVISION -> 0413
         ID_SERIAL -> LG_Electronics_Inc._LG_UltraFine_Display_Controls
         ID_USB_INTERFACES -> :030000:
         ID_VENDOR -> LG_Electronics_Inc.
         ID_VENDOR_ENC -> LG\x20Electronics\x20Inc.
         ID_VENDOR_FROM_DATABASE -> LG Electronics USA, Inc.
         ID_VENDOR_ID -> 043e
         MAJOR -> 189
         MINOR -> 772
         PRODUCT -> 43e/9a70/413
         SUBSYSTEM -> usb
         TYPE -> 0/0/0
         USEC_INITIALIZED -> 110696624
      Sysattrs:
         authorized -> 1
         avoid_reset_quirk -> 0
         bConfigurationValue -> 1
         bDeviceClass -> 00
         bDeviceProtocol -> 00
         bDeviceSubClass -> 00
         bMaxPacketSize0 -> 64
         bMaxPower -> 0mA
         bNumConfigurations -> 1
         bNumInterfaces ->  3
         bcdDevice -> 0413
         bmAttributes -> c0
         busnum -> 7
         configuration -> 
         descriptors -> ��
         dev -> 189:772
         devnum -> 5
         devpath -> 2.4.2
         driver -> usb
         idProduct -> 9a70
         idVendor -> 043e
         ltm_capable -> no
         manufacturer -> LG Electronics Inc.
         maxchild -> 0
         port -> (null)
         product -> LG UltraFine Display Controls
         quirks -> 0x0
         removable -> fixed
         rx_lanes -> 1
         speed -> 12
         subsystem -> usb
         tx_lanes -> 1
         uevent -> MAJOR=189
                   MINOR=772
                   DEVNAME=bus/usb/007/005
                   DEVTYPE=usb_device
                   DRIVER=usb
                   PRODUCT=43e/9a70/413
                   TYPE=0/0/0
                   BUSNUM=007
                   DEVNUM=005
         urbnum -> 20
         version ->  2.00
      Detiled device summary for testing: 
         Usb_Detailed_Device_Summary at: 0x5574b34587d0
            devname                                                  : /dev/usb/hiddev4
            vendor_id                                                : 043e
            product_id                                            () : 9a70
            vendor_name                                              : LG Electronics Inc.
            product_name                                             : LG UltraFine Display Controls
            busnum_s                                                 : 7
            devnum_s                                                 : 5
            prop_busnum                                              : 007
            prop_devnum                                              : 005
            prop_model                                               : LG_UltraFine_Display_Controls
            prop_model_id                                            : 9a70
            prop_usb_interfaces                                      : :030000:
            prop_vendor                                              : LG_Electronics_Inc.
            prop_vendor_from_database                                : LG Electronics USA, Inc.
            prop_vendor_id                                           : 043e
            prop_major                                               : 189
            prop_minor                                               : 772
      USB bus 7, device 5, vid:pid: 043e:9a70 - LG Electronics Inc.:LG UltraFine Display Controls

Checking for USB HID Report Descriptors in /sys/kernel/debug/hid...
   Unable to open directory /sys/kernel/debug/hid/: Permission denied

Checking for USB connected monitors complete

@Tamas-Toth-ebola
Copy link

Tamas-Toth-ebola commented May 26, 2020

Did you probe them with 'sudo', or does your Linux user in i2c group?

Seems that I can get same like results as your if I remove myself from the i2c group and restart my user session. i2c group supposed to be the 'authorization background' of ddcutil.

(With 'sudo' you should not get any problems, but you could drop yourself in that group for a test. Of course with session restart.)

@andrejpodzimek
Copy link
Author

I don't have an i2c group on any of my systems. Also, this is a Thunderbolt(-only) monitor, listed by ddcutil as a USB monitor, so I doubt there's anything i2c-related going on. (That would require an i2c bus to be relayed through Thunderbolt, which is probably not happening.)

@Tamas-Toth-ebola
Copy link

Tamas-Toth-ebola commented May 27, 2020

My monitor also a Thunderbolt only monitor. The 2019 release of the smaller one: https://www.lg.com/us/monitors/lg-24MD4KL-B-4k-uhd-led-monitor

'All' things what ddcutil shows you seems like the same as mine, so do not care about USB thingie as Thunderbolt as standard communicate through USB 3.x also and maybe ddcutil do not handle this sophisticatedly. This is probably not an error just a fact.

Anyway if you do not have i2c group yet I have no more ideas but you could check this permission requirement at ddcutils's site: https://www.ddcutil.com/i2c_permissions/


Just to show the background of mine:

ddcutil detect
Display 1
   I2C bus:             /dev/i2c-6
   EDID synopsis:
      Mfg id:           GSM
      Model:            LG UltraFine
      Serial number:    906NTAB1W544
      Manufacture year: 2019
      EDID version:     1.4

also

lsusb | grep "LG"
Bus 004 Device 002: ID 043e:9a60 LG Electronics USA, Inc. USB3.1 Hub
Bus 003 Device 005: ID 043e:9a63 LG Electronics USA, Inc. 
Bus 003 Device 004: ID 043e:9a64 LG Electronics USA, Inc. 
Bus 003 Device 003: ID 043e:9a62 LG Electronics USA, Inc. 
Bus 003 Device 002: ID 043e:9a61 LG Electronics USA, Inc. USB2.1 Hub

So you can see there is no dedicated Thunderbolt bus handled by Linux.

@andrejpodzimek
Copy link
Author

I don’t have any /dev/i2c-* devices, so there is something different.

Ultimately I hacked it this way — that snippet shows the HID commands that control brightness on the 27MD5KL. (Nothing i2c-related seems to be involved. There is a similar HID-based protocol for (some) Apple / Samsung monitors, just a few magic numbers are different.)

Just for the record, there is a Thunderbolt bus handled by Linux (not necessarily dedicated in any way or sense, but there is one):

# boltctl list
 ● Lenovo ThinkPad Thunderbolt 3 Dock
   ├─ type:          peripheral
   ├─ name:          ThinkPad Thunderbolt 3 Dock
   ├─ vendor:        Lenovo
   ├─ uuid:          00a94851-e85e-0801-ffff-ffffffffffff
   ├─ status:        authorized
   │  ├─ domain:     d1030000-0080-8518-2352-351e86034a24
   │  └─ authflags:  none
   ├─ authorized:    Wed 27 May 2020 03:04:38 AM UTC
   ├─ connected:     Wed 27 May 2020 03:04:38 AM UTC
   └─ stored:        Wed 08 Apr 2020 12:30:27 PM UTC
      ├─ policy:     iommu
      └─ key:        no

 ● LG Electronics UltraFine 5K
   ├─ type:          peripheral
   ├─ name:          UltraFine 5K
   ├─ vendor:        LG Electronics
   ├─ uuid:          001701b8-a469-1e00-ffff-ffffffffffff
   ├─ status:        authorized
   │  ├─ domain:     d1030000-0080-8518-2352-351e86034a24
   │  └─ authflags:  none
   ├─ authorized:    Wed 27 May 2020 03:04:50 AM UTC
   ├─ connected:     Wed 27 May 2020 03:04:50 AM UTC
   └─ stored:        Tue 26 May 2020 12:16:56 PM UTC
      ├─ policy:     iommu
      └─ key:        no

(Side note 1: I guess the correct way to manage the /dev/usb/hiddev* and/or /dev/i2c-* nodes would be session management in systemd + udev (instead of permanent group memberships). Session management uses ACLs to (temporarily) grant device access (e.g. monitor HID control) to logged-in users, based on which monitor(s) they are using. (This is how it already works for sound cards, security tokens etc.) Sadly I haven’t spotted a suitable udev + systemd configuration example on the web, so I’ll probably set brightness as root for the time being; no big deal.)

(Side note 2: DisplayPort / Thunderbolt / USB co-existence is surprising in many ways. For example, adapters from Thunderbolt to DisplayPort show up on the USB bus as USB 2.0 devices. These USB “devices” are not directly involved in DisplayPort transfers; USB 2.0 is nowhere near fast enough for that anyway. They probably serve as identifiers of some sort, to tell the machine that there is a DisplayPort connected to a Thunderbolt port. In the past I thought that Thunderbolt->DisplayPort adapters were passive, until I got a few of them and realized they were semi-active, in a very strange way.)

# lsusb | grep LG
Bus 008 Device 004: ID 043e:9a68 LG Electronics USA, Inc.
Bus 008 Device 003: ID 043e:9a71 LG Electronics USA, Inc.
Bus 008 Device 002: ID 043e:9a60 LG Electronics USA, Inc. USB3.1 Hub
Bus 007 Device 005: ID 043e:9a70 LG Electronics USA, Inc. USB2.1 Hub
Bus 007 Device 004: ID 043e:9a66 LG Electronics USA, Inc.
Bus 007 Device 003: ID 043e:9a73 LG Electronics USA, Inc.
Bus 007 Device 002: ID 043e:9a61 LG Electronics USA, Inc. USB2.1 Hub

@Tamas-Toth-ebola
Copy link

Tamas-Toth-ebola commented May 27, 2020

Hi! As now I have some minutes to answer here are just some final thoughts.

  1. You are absolutely right. Thunderbolt bus and devices handled somehow by Linux but there are lot of cross-talk between solutions and as you already also wrote:

DisplayPort / Thunderbolt / USB co-existence is surprising in many ways. For example, adapters from Thunderbolt to DisplayPort show up on the USB bus as USB 2.0 devices...

So I just tried to spotlight that if you see through ddcutil you monitor on USB bus that should be absolutely not critical problem as I see my very same like monitor totally on the same way while ddcutil works fine for me.

  1. My next and last thought was that the source of the problem is maybe not your monitor neither ddcutil but maybe some of your other environments as the Thunderbolt controller on the other side or so. It was just a blind shot I mean it would have been... as Stanford ( @rockowitz ) at ddcutil already explained you that your problem is a little bit special and the source of it could be the i915 controller at least how the lying above softwares handle it on Linux: Display not found with LG UltraFine 27MD5KL rockowitz/ddcutil#123 (comment)

But independently from these written lines I hope somehow you could reach successful result in any way as seems with my NUC8i7 and it's Thunderbolt control the result is fine with one 'almost' same like monitor as your with ddcutil where I think there are more differences from the controller aspect as from the monitor or ddcutil itself .

Best regards,

@andrejpodzimek
Copy link
Author

OK, now I see that I had been completely wrong when I throught that there was no i2c involved. Oh yes, there is i2c, it was just that I didn't have the right kernel module loaded.

Now ddcutil works for me, detects the monitor and sets brightness. (I have yet to explore this a little bit and find out whether the i2c-based interface exposes more functionality than the HID one. It would be awesome, for example, to be able to set the monitor’s color tone or the like.)

I've also retried lguf_brightness, now that I have the right kernel module and i2c device nodes in /dev, but still got a 255 exit status. (Here's a strace -f from that.)

@Tamas-Toth-ebola
Copy link

Tamas-Toth-ebola commented May 28, 2020

I glad for your success!

Currently I'm automatically changing the brightness of mine based on my Spyder X colorimeter's ambient light measurement as I don't know how to reach any data from the monitor's own ambient light meter, and as I'm not a programmer there are limits in front of me:D

My systemd timed shell script measure ambient light set the monitor brightness also align the corresponding ICC color profile for the actual brightness so the result is more then fine...
... but still have some problems.

  1. Do not know how to catch the monitor wake up event from standby with systemd (not the system wake up just the monitor what called to screen-saver in Ubuntu/GNOME or so) to run the automation at this event.
  2. Spyder X ambient light metering with Argyll is horrible slow (approx. 5-10 sec.). If the monitor's integrated could give us faster results would be more comfortable (and I should not see my colorimeter on my desk always:)). Partly because of it I just call the script after boot, login, and in every 30 minutes.
  3. Sadly do not know why, after every system restart Argyll could not reach the Spyder X, just after replug it as USB device. Interestingly 'udev' rules seems ok (or I do not see the problem), also the system see the device immediately just Argyll not and I could not trace yet why. After replug it after every restart it works fine (but this is really uncomfortable and as i usually forget it I just realise when the monitor brightness not follows my requirements)

If I could finish these 3 problems would be everything perfect.


  1. Anyway from these thing I had some problems with the wake up of my monitor as after full system shutdown (something like cold start) if I later start my computer sometimes my monitor simply does not came back. Stay in power off state and as I do not have screen I simply do not know the is the problem. My NUC has the latest firmware but without Mac I simply could not upgrade my monitor's firmware:( If I have some more time in the next such case I will login to my machine through SSH and try to force some Thunderbolt functions but this is just a plan yet.

@Tamas-Toth-ebola
Copy link

Just to inform anybody about the result I find out that I missed to put myself into colord Linux group and seems this was the reason of the not fully identified Spyder X after reboot. Now the Spyder X based automatic brightness and color profiles seems working perfectly, but sadly I need to investigate my other 3 problems:

  1. I need to catch systemd monitor wake-up event from 'screen saver'.
  2. Maybe would be faster and better to handle the ambient light with LG - Ultrafine monitor's integrated ambient light sensor instead of the Spyder X.
  3. The Thunderbolt monitor not initialized after cold start. boltctl shows as 'disconnected' device so I need to replug to get any visible screen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants