Closed goyaweb closed 6 years ago
The brightness is controlled by a specific USB device (integrated with the monitor).
Do you have this (VID: 034E, PID: 9A40) in Device Manager?
If you drag the program to cmd and run it, it might prompt you Failed to open the device...
. Is it the case?
I have only the 4K one. The 5K model is reported working.
LG has released a revised version of this display. Something might have been changed. Please list if there is something seeming related in Device Manager (additional USB device after you plug in the display).
Actually VID and PID are the same as your screenshot, but my REV is different: REV_0300 instead of 0214. When I run the program I just get the regular: Press '-' or '=' to adjust brightness. Press '[' or: ']' to fine tune. Press 'q' to quit. Input:
See https://github.com/unknownzerx/lguf-brightness/issues/2 . You might copy the steps to see if anything is changed in the USB command for brightness controlling.
However, an authentic Mac would be required to install 'Boot Camp Support Software'.
hmm no mac with bootcamp around for me to capture commands with...
I wonder if the reason could be that the program somehow go linked to the screen in the apple store and kept that reference somehow?
The program doesn't keep any state, and I don't think old system device record caused the problem.
As a last resort, if you don't change brightness often, you might try hackintosh on the XPS 15...
I tried to debug this problem. I used Device Monitoring Studio. I only found GET_DESCRIPTOR related packets captured and no control packets captured when I pressed "-", "+".
BTW, are you guoren?
@csujedihy The program was not working and thus no packets were captured.
I have only the 4K display and the 12" MacBook (USB-C, not ThunderBolt 3).
If someone could hand on an authentic Mac with TB3 and the 5K one, Please
Then we can port it to ordinary PC.
I have all you listed. I did some tests yesterday. I will show you captured packets later.
I tested your program with 5K from my MBP. The program didn't send out control packets. The function libusb_control_transfer
returned -1
which is IO error.
Here is the captured packets. I already ruled out unrelated packets but I uploaded another one just in case.
I captured packets when using your tool but only GET_DESCRIPTOR packets are found.
@unknownzerx Do you need more trace?
Here is the pcap I've used min-to-max.pcap.zip
I hasn't noticed any difference...
It is a group of 3 packet. I got some of the arguments for libusb_control_transfer
from the 1st packet
URB setup
bmRequestType: 0x21
bRequest: 9
wValue: 0x0300
wIndex: 1 (0x0001)
wLength: 6
The second one looks likes:
USB URB
[Source: 1.8.0]
[Destination: host]
USBPcap pseudoheader length: 28
IRP ID: 0xffff938ccf29f670
IRP USBD_STATUS: USBD_STATUS_SUCCESS (0x00000000)
URB Function: URB_FUNCTION_CONTROL_TRANSFER (0x0008)
IRP information: 0x01, Direction: PDO -> FDO
URB bus id: 1
Device address: 8
Endpoint: 0x00, Direction: OUT
URB transfer type: URB_CONTROL (0x02)
Packet Data Length: 6
[Request in: 4]
[Time from request: 0.046909000 seconds]
Control transfer stage: Data (1)
[bInterfaceClass: Unknown (0xffff)]
CONTROL response data: 900100000000
where the last line is the 6-byte data
Could you try
I always run windows version with admin privilege and it doesn't work. I can't see any USB packets sent while capturing except two for GET_DESCRIPTOR.
In OSX, it works perfectly with my LG 5K.
I think the protocol is exactly the same as the one for LG 4k and in Windows, your program just didn't send those USB packets out. libusb_control_transfer
just returned -1
.
Do you run your program on Windows 10?
I think I found the problem. I adjusted the brightness by using HIDAPI. But I don't understand how USB communication works. In wireshark, does host
mean computer or the usb device? I thought it was device but host
sends the same packet everytime.
Thanks! I finally solved this problem by using HIDAPI.
Glad to see it works. Thank you.
I do run it on Win 10. Have no idea about what is wrong.
HIDAPI is better to use.
When I tested the program with my Dell XPS 15 at the apple store with the Ultrafine 5K it worked flawlessly. Having bought the device (a different one) and coming home it stopped working.