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

Prestige PS341WU #1

Closed
Wehin opened this issue Feb 11, 2020 · 29 comments
Closed

Prestige PS341WU #1

Wehin opened this issue Feb 11, 2020 · 29 comments
Assignees

Comments

@Wehin
Copy link

Wehin commented Feb 11, 2020

lsusb -vd 1462:3fa4

Bus 003 Device 027: ID 1462:3fa4 Micro Star International 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x1462 Micro Star International
  idProduct          0x3fa4 
  bcdDevice            0.00
  iManufacturer           1 MS
  iProduct                2 MSI Gaming Controller
  iSerial                 3 A02019010700
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           64
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 No Subclass
      bInterfaceProtocol      0 None
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      51
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk-Only
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x04  EP 4 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
Device Status:     0x0000
  (Bus Powered)

./msigd --info --debug --query

DEBUG: Initializing HID lib
Unexpected unknown01 : 5b00
Unexpected unknown04 : 5b00
Unexpected unknown05 : 5b00
Detected an unknown monitor. Please report the output of
'msigd --info --debug --query' as an issue and also provide
the ID (MAG...) of your monitor. Thank you!
Vendor Id:  0x1462
Product Id: 0x3fa4
Product:    MSI Gaming Controller
Serial:     A02019010700
DEBUG: Special 01 b0 : 01 5a 37 00 00 00 00 00 00 00 00 00 00 00 00 00 
DEBUG: Special 01 b4 : 01 5a 41 00 19 b2 00 00 00 00 00 00 00 00 00 00 
DEBUG: Special 01 35 38 30 30 31 39 30 0d : 01 35 62 30 30 00 00 00 30 30 30 0d 00 00 00 00 
msigd: Error querying device on power - got <5b00>
Try 'msigd --help' for more information.
unknown02 : 001
msigd: Error querying device on mode - got <5b00>
Try 'msigd --help' for more information.
msigd: Error querying device on unknown03 - got <5b00>
Try 'msigd --help' for more information.
msigd: Error querying device on frequency - got <5b00>
Try 'msigd --help' for more information.
DEBUG: Error 0 reading from HID device
msigd: Error querying device on game_mode - got <>
Try 'msigd --help' for more information.
DEBUG: Error 0 reading from HID device
msigd: Error querying device on unknown06 - got <>
Try 'msigd --help' for more information.
msigd: Error querying device on response_time - got <5b00>
Try 'msigd --help' for more information.
DEBUG: Error 0 reading from HID device
msigd: Error querying device on enable_dynamic - got <>
Try 'msigd --help' for more information.
DEBUG: Error 0 reading from HID device
msigd: Error querying device on hdcr - got <>
Try 'msigd --help' for more information.
DEBUG: Error 0 reading from HID device
msigd: Error querying device on refresh_rate_display - got <>
Try 'msigd --help' for more information.
DEBUG: Error 0 reading from HID device
msigd: Error querying device on refresh_rate_position - got <>
Try 'msigd --help' for more information.
msigd: Error querying device on alarm_clock - got <5b00>
Try 'msigd --help' for more information.
DEBUG: Error 0 reading from HID device
msigd: Error querying device on alarm_clock_index - got <>
Try 'msigd --help' for more information.
DEBUG: Error 0 reading from HID device
msigd: Error querying device on alarm_clock_time - got <>
Try 'msigd --help' for more information.
msigd: Error querying device on alarm_clock_position - got <5b00>
Try 'msigd --help' for more information.
msigd: Error querying device on screen_assistance - got <5b00>
Try 'msigd --help' for more information.
DEBUG: Error 0 reading from HID device
msigd: Error querying device on unknown08 - got <>
Try 'msigd --help' for more information.
DEBUG: Error 0 reading from HID device
msigd: Error querying device on zero_latency - got <>
Try 'msigd --help' for more information.
msigd: Error querying device on screen_size - got <5b00>
Try 'msigd --help' for more information.
DEBUG: Error 0 reading from HID device
msigd: Error querying device on night_vision - got <>
Try 'msigd --help' for more information.
msigd: Error querying device on pro_mode - got <5b00>
Try 'msigd --help' for more information.
msigd: Error querying device on eye_saver - got <5b00>
Try 'msigd --help' for more information.
msigd: Error querying device on image_enhancement - got <5b00>
Try 'msigd --help' for more information.
msigd: Error querying device on brightness - got <5b00>
Try 'msigd --help' for more information.
msigd: Error querying device on contrast - got <5b00>
Try 'msigd --help' for more information.
msigd: Error querying device on sharpness - got <5b00>
Try 'msigd --help' for more information.
msigd: Error querying device on color_preset - got <5b00>
Try 'msigd --help' for more information.
DEBUG: Error 0 reading from HID device
msigd: Error querying device on red - got <>
Try 'msigd --help' for more information.
DEBUG: Error 0 reading from HID device
msigd: Error querying device on green - got <>
Try 'msigd --help' for more information.
DEBUG: Error 0 reading from HID device
msigd: Error querying device on blue - got <>
Try 'msigd --help' for more information.
msigd: Error querying device on rgb - got <5b00>
Try 'msigd --help' for more information.
DEBUG: Error 0 reading from HID device
msigd: Error querying device on unknown09 - got <>
Try 'msigd --help' for more information.
msigd: Error querying device on input - got <5b00>
Try 'msigd --help' for more information.
msigd: Error querying device on pip - got <5b00>
Try 'msigd --help' for more information.
DEBUG: Error 0 reading from HID device
msigd: Error querying device on pip_input - got <>
Try 'msigd --help' for more information.
msigd: Error querying device on pbp_input - got <5b00>
Try 'msigd --help' for more information.
msigd: Error querying device on pip_size - got <5b00>
Try 'msigd --help' for more information.
msigd: Error querying device on pip_position - got <5b00>
Try 'msigd --help' for more information.
msigd: Error querying device on osd_language - got <5b00>
Try 'msigd --help' for more information.
msigd: Error querying device on osd_transparency - got <5b00>
Try 'msigd --help' for more information.
msigd: Error querying device on osd_timeout - got <5b00>
Try 'msigd --help' for more information.
msigd: Error querying device on sound_enable - got <5b00>
Try 'msigd --help' for more information.
DEBUG: Error 0 reading from HID device
msigd: Error querying device on back_rgb - got <>
Try 'msigd --help' for more information.
msigd: Error querying device on navi_up - got <5b00>
Try 'msigd --help' for more information.
msigd: Error querying device on navi_down - got <5b00>
Try 'msigd --help' for more information.
msigd: Error querying device on navi_left - got <5b00>
Try 'msigd --help' for more information.
msigd: Error querying device on navi_right - got <5b00>
Try 'msigd --help' for more information.
@couriersud
Copy link
Owner

This looks weird. The return values are truncated.
Can you please try

make clean
make USE_HIDAPI=0

and try

./msigd --info --debug --query

again?
If this doesn't help I need to improve error logging.

@Wehin
Copy link
Author

Wehin commented Feb 11, 2020

./msigd --info --debug --query

DEBUG: Initializing usb_lib
DEBUG: Scanning USB devices...
DEBUG: Found device MSI Gaming Controller 

DEBUG: Interface 0 alt 0 class 3
DEBUG: Endpoint 01 0040
DEBUG: Endpoint 1 does is not of type output
DEBUG: Endpoint 02 0040
DEBUG: Endpoint 2 does is not of type input
DEBUG: Found 2 interfaces, using interface 0
DEBUG: Setting Configuration
DEBUG: failed to detach kernel driver from USB device: -22
DEBUG: Releasing interface 0

DEBUG: Error 1 releasing Interface 

msigd: No usb device found
Try 'msigd --help' for more information.

form dmesg

[86654.267127] usb 3-1.4.3.4.1: New USB device found, idVendor=1462, idProduct=3fa4
[86654.267129] usb 3-1.4.3.4.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[86654.267130] usb 3-1.4.3.4.1: Product: MSI Gaming Controller
[86654.267131] usb 3-1.4.3.4.1: Manufacturer: MS
[86654.267132] usb 3-1.4.3.4.1: SerialNumber: A02019010700
[86654.269161] input: MS MSI Gaming Controller as /devices/pci0000:00/0000:00:14.0/usb3/3-1/3-1.4/3-1.4.3/3-1.4.3.4/3-1.4.3.4.1/3-1.4.3.4.1:1.0/0003:1462:3FA4.0018/input/input38
[86654.269313] hid-generic 0003:1462:3FA4.0018: input,hidraw7: USB HID v1.10 Device [MS MSI Gaming Controller] on usb-0000:00:14.0-1.4.3.4.1/input0
[86654.269360] usb-storage 3-1.4.3.4.1:1.1: USB Mass Storage device detected
[86654.269421] scsi host15: usb-storage 3-1.4.3.4.1:1.1
[86655.613867] scsi 15:0:0:0: Direct-Access     MSI      MSI Prestige Dri ver  PQ: 0 ANSI: 0
[86655.614210] sd 15:0:0:0: Attached scsi generic sg4 type 0
[86655.614452] sd 15:0:0:0: [sde] 44 512-byte logical blocks: (22.5 kB/22.0 KiB)
[86655.614596] sd 15:0:0:0: [sde] Write Protect is on
[86655.614599] sd 15:0:0:0: [sde] Mode Sense: 20 f1 80 00
[86655.614750] sd 15:0:0:0: [sde] No Caching mode page found
[86655.614752] sd 15:0:0:0: [sde] Assuming drive cache: write through
[86655.662855] scsi_io_completion: 53 callbacks suppressed
[86655.662860] sd 15:0:0:0: [sde] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[86655.662862] sd 15:0:0:0: [sde] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 04 00
[86655.662863] blk_update_request: 53 callbacks suppressed
[86655.662864] blk_update_request: I/O error, dev sde, sector 0
[86655.662866] buffer_io_error: 50 callbacks suppressed
[86655.662867] Buffer I/O error on dev sde, logical block 0, async page read
[86655.708944] sd 15:0:0:0: [sde] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[86655.708947] sd 15:0:0:0: [sde] tag#0 CDB: Read(10) 28 00 00 00 00 04 00 00 04 00
[86655.708949] blk_update_request: I/O error, dev sde, sector 4
[86655.708951] Buffer I/O error on dev sde, logical block 1, async page read
[86655.755911] sd 15:0:0:0: [sde] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[86655.755915] sd 15:0:0:0: [sde] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 04 00
[86655.755917] blk_update_request: I/O error, dev sde, sector 0
[86655.755920] Buffer I/O error on dev sde, logical block 0, async page read
[86655.802916] sd 15:0:0:0: [sde] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[86655.802920] sd 15:0:0:0: [sde] tag#0 CDB: Read(10) 28 00 00 00 00 04 00 00 04 00
[86655.802922] blk_update_request: I/O error, dev sde, sector 4
[86655.802924] Buffer I/O error on dev sde, logical block 1, async page read
[86655.850994] sd 15:0:0:0: [sde] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[86655.850998] sd 15:0:0:0: [sde] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 04 00
[86655.850999] blk_update_request: I/O error, dev sde, sector 0
[86655.851003] Buffer I/O error on dev sde, logical block 0, async page read
[86655.898829] sd 15:0:0:0: [sde] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[86655.898834] sd 15:0:0:0: [sde] tag#0 CDB: Read(10) 28 00 00 00 00 04 00 00 04 00
[86655.898836] blk_update_request: I/O error, dev sde, sector 4
[86655.898838] Buffer I/O error on dev sde, logical block 1, async page read
[86655.898867] ldm_validate_partition_table(): Disk read failed.
[86655.944944] sd 15:0:0:0: [sde] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[86655.944948] sd 15:0:0:0: [sde] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 04 00
[86655.944949] blk_update_request: I/O error, dev sde, sector 0
[86655.944952] Buffer I/O error on dev sde, logical block 0, async page read
[86655.991925] sd 15:0:0:0: [sde] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[86655.991929] sd 15:0:0:0: [sde] tag#0 CDB: Read(10) 28 00 00 00 00 04 00 00 04 00
[86655.991931] blk_update_request: I/O error, dev sde, sector 4
[86655.991944] Buffer I/O error on dev sde, logical block 1, async page read
[86656.038967] sd 15:0:0:0: [sde] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[86656.038979] sd 15:0:0:0: [sde] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 04 00
[86656.038981] blk_update_request: I/O error, dev sde, sector 0
[86656.038983] Buffer I/O error on dev sde, logical block 0, async page read
[86656.087907] sd 15:0:0:0: [sde] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[86656.087913] sd 15:0:0:0: [sde] tag#0 CDB: Read(10) 28 00 00 00 00 04 00 00 04 00
[86656.087915] blk_update_request: I/O error, dev sde, sector 4
[86656.087918] Buffer I/O error on dev sde, logical block 1, async page read
[86656.279945] Dev sde: unable to read RDB block 0
[86656.465941]  sde: unable to read partition table
[86656.467034] sd 15:0:0:0: [sde] Attached SCSI removable disk
[87135.197341] usb 3-1.4.3.4.1: usbfs: interface 0 claimed by usbhid while 'msigd' sets config #1
[87135.209640] usb 3-1.4.3.4.1: usbfs: interface 1 claimed by usb-storage while 'msigd' sets config #1
[87194.781417] usb 3-1.4.3.4.1: usbfs: interface 1 claimed by usb-storage while 'msigd' sets config #1

@couriersud
Copy link
Owner

Short solution since this is for debugging only:

Please try

sudo ./msigd --info --debug --query

The long story is in section 4.1. of the README.MD.

I will commit an update in a couple of minutes which has more flexible return code reading. This will ignore zero bytes. The monitor should be supported by the code, at least that is my conclusion from looking at the CreatorOS exe and the first packets it tries to exchange with my monitor.

@couriersud
Copy link
Owner

Committed code update as promised.

@Wehin
Copy link
Author

Wehin commented Feb 11, 2020

# ./msigd --info --debug --query
DEBUG: Initializing HID lib
Unexpected unknown03 : 5b0000?
Unexpected unknown01 : 5b00V06
Unexpected unknown04 : 5b00DA1A019340045
Unexpected unknown05 : 5b00000
Detected an unknown monitor. Please report the output of
'msigd --info --debug --query' as an issue and also provide
the ID (MAG...) of your monitor. Thank you!
Vendor Id:  0x1462
Product Id: 0x3fa4
Product:    MSI Gaming Controller
Serial:     A02019010700
DEBUG: Special 01 b0 : 01 5a 37 00 00 00 00 00 00 00 00 00 00 00 00 00 
DEBUG: Special 01 b4 : 01 5a 41 00 19 b2 00 00 00 00 00 00 00 00 00 00 
DEBUG: Special 01 35 38 30 30 31 39 30 0d : 01 35 62 30 30 00 00 00 30 30 30 0d 00 00 00 00 
msigd: Error querying device on power - got <5b00001>
Try 'msigd --help' for more information.
unknown02 : 000
msigd: Error querying device on mode - got <5b00013>
Try 'msigd --help' for more information.
msigd: Error querying device on frequency - got <5b00030>
Try 'msigd --help' for more information.
DEBUG: Error 0 reading from HID device
msigd: Error querying device on game_mode - got <>
Try 'msigd --help' for more information.
DEBUG: Error 0 reading from HID device
msigd: Error querying device on unknown06 - got <>
Try 'msigd --help' for more information.
msigd: Error querying device on response_time - got <5b00000>
Try 'msigd --help' for more information.
DEBUG: Error 0 reading from HID device
msigd: Error querying device on enable_dynamic - got <>
Try 'msigd --help' for more information.
DEBUG: Error 0 reading from HID device
msigd: Error querying device on hdcr - got <>
Try 'msigd --help' for more information.
DEBUG: Error 0 reading from HID device
msigd: Error querying device on refresh_rate_display - got <>
Try 'msigd --help' for more information.
DEBUG: Error 0 reading from HID device
msigd: Error querying device on refresh_rate_position - got <>
Try 'msigd --help' for more information.
msigd: Error querying device on alarm_clock - got <5b00000>
Try 'msigd --help' for more information.
DEBUG: Error 0 reading from HID device
msigd: Error querying device on alarm_clock_index - got <>
Try 'msigd --help' for more information.
DEBUG: Error 0 reading from HID device
msigd: Error querying device on alarm_clock_time - got <>
Try 'msigd --help' for more information.
msigd: Error querying device on alarm_clock_position - got <5b00000>
Try 'msigd --help' for more information.
msigd: Error querying device on screen_assistance - got <5b00000>
Try 'msigd --help' for more information.
DEBUG: Error 0 reading from HID device
msigd: Error querying device on unknown08 - got <>
Try 'msigd --help' for more information.
DEBUG: Error 0 reading from HID device
msigd: Error querying device on zero_latency - got <>
Try 'msigd --help' for more information.
msigd: Error querying device on screen_size - got <5b00000>
Try 'msigd --help' for more information.
DEBUG: Error 0 reading from HID device
msigd: Error querying device on night_vision - got <>
Try 'msigd --help' for more information.
msigd: Error querying device on pro_mode - got <5b00003>
Try 'msigd --help' for more information.
msigd: Error querying device on eye_saver - got <5b00000>
Try 'msigd --help' for more information.
msigd: Error querying device on image_enhancement - got <5b00000>
Try 'msigd --help' for more information.
msigd: Error querying device on brightness - got <5b00075>
Try 'msigd --help' for more information.
msigd: Error querying device on contrast - got <5b00050>
Try 'msigd --help' for more information.
msigd: Error querying device on sharpness - got <5b00000>
Try 'msigd --help' for more information.
msigd: Error querying device on color_preset - got <5b00002>
Try 'msigd --help' for more information.
DEBUG: Error 0 reading from HID device
msigd: Error querying device on red - got <>
Try 'msigd --help' for more information.
DEBUG: Error 0 reading from HID device
msigd: Error querying device on green - got <>
Try 'msigd --help' for more information.
DEBUG: Error 0 reading from HID device
msigd: Error querying device on blue - got <>
Try 'msigd --help' for more information.
msigd: Error querying device on rgb - got <5b00���>
Try 'msigd --help' for more information.
DEBUG: Error 0 reading from HID device
msigd: Error querying device on unknown09 - got <>
Try 'msigd --help' for more information.
msigd: Error querying device on input - got <5b00000>
Try 'msigd --help' for more information.
msigd: Error querying device on pip - got <5b00000>
Try 'msigd --help' for more information.
DEBUG: Error 0 reading from HID device
msigd: Error querying device on pip_input - got <>
Try 'msigd --help' for more information.
msigd: Error querying device on pbp_input - got <5b00002>
Try 'msigd --help' for more information.
msigd: Error querying device on pip_size - got <5b00002>
Try 'msigd --help' for more information.
msigd: Error querying device on pip_position - got <5b00001>
Try 'msigd --help' for more information.
msigd: Error querying device on osd_language - got <5b00001>
Try 'msigd --help' for more information.
msigd: Error querying device on osd_transparency - got <5b00000>
Try 'msigd --help' for more information.
msigd: Error querying device on osd_timeout - got <5b00020>
Try 'msigd --help' for more information.
msigd: Error querying device on sound_enable - got <5b00000>
Try 'msigd --help' for more information.
DEBUG: Error 0 reading from HID device
msigd: Error querying device on back_rgb - got <>
Try 'msigd --help' for more information.
msigd: Error querying device on navi_up - got <5b00002>
Try 'msigd --help' for more information.
msigd: Error querying device on navi_down - got <5b00003>
Try 'msigd --help' for more information.
msigd: Error querying device on navi_left - got <5b00004>
Try 'msigd --help' for more information.
msigd: Error querying device on navi_right - got <5b00005>
Try 'msigd --help' for more information.

@couriersud
Copy link
Owner

Commited an update which ignores zero bytes at pos 5,6,7. This should fix most of the above error messages.
Note: you should be able to set monitor osd parameters now.

@Wehin
Copy link
Author

Wehin commented Feb 11, 2020

tip: for fedora

dnf install libusb-devel hidapi-devel

yep, some parameters 👍

# ./msigd --info --debug --query
DEBUG: Initializing HID lib
Unexpected unknown03 : 00?
Unexpected unknown01 : V06
Unexpected unknown04 : DA1A019340045
Unexpected unknown05 : 000
Detected an unknown monitor. Please report the output of
'msigd --info --debug --query' as an issue and also provide
the ID (MAG...) of your monitor. Thank you!
Vendor Id:  0x1462
Product Id: 0x3fa4
Product:    MSI Gaming Controller
Serial:     A02019010700
DEBUG: Special 01 b0 : 01 5a 37 00 00 00 00 00 00 00 00 00 00 00 00 00 
DEBUG: Special 01 b4 : 01 5a 41 00 19 b2 00 00 00 00 00 00 00 00 00 00 
DEBUG: Special 01 35 38 30 30 31 39 30 0d : 01 35 62 30 30 00 00 00 30 30 30 0d 00 00 00 00 
power : on
unknown02 : 001
mode : designer
frequency : 030
DEBUG: Error 0 reading from HID device
msigd: Error querying device on game_mode - got <>
Try 'msigd --help' for more information.
DEBUG: Error 0 reading from HID device
msigd: Error querying device on unknown06 - got <>
Try 'msigd --help' for more information.
response_time : normal
DEBUG: Error 0 reading from HID device
msigd: Error querying device on enable_dynamic - got <>
Try 'msigd --help' for more information.
DEBUG: Error 0 reading from HID device
msigd: Error querying device on hdcr - got <>
Try 'msigd --help' for more information.
DEBUG: Error 0 reading from HID device
msigd: Error querying device on refresh_rate_display - got <>
Try 'msigd --help' for more information.
DEBUG: Error 0 reading from HID device
msigd: Error querying device on refresh_rate_position - got <>
Try 'msigd --help' for more information.
alarm_clock : off
DEBUG: Error 0 reading from HID device
msigd: Error querying device on alarm_clock_index - got <>
Try 'msigd --help' for more information.
DEBUG: Error 0 reading from HID device
msigd: Error querying device on alarm_clock_time - got <>
Try 'msigd --help' for more information.
alarm_clock_position : left_bottom
screen_assistance : 0
DEBUG: Error 0 reading from HID device
msigd: Error querying device on unknown08 - got <>
Try 'msigd --help' for more information.
DEBUG: Error 0 reading from HID device
msigd: Error querying device on zero_latency - got <>
Try 'msigd --help' for more information.
screen_size : 19
DEBUG: Error 0 reading from HID device
msigd: Error querying device on night_vision - got <>
Try 'msigd --help' for more information.
pro_mode : designer
eye_saver : off
image_enhancement : off
brightness : 75
contrast : 50
sharpness : 0
color_preset : warm
DEBUG: Error 0 reading from HID device
msigd: Error querying device on red - got <>
Try 'msigd --help' for more information.
DEBUG: Error 0 reading from HID device
msigd: Error querying device on green - got <>
Try 'msigd --help' for more information.
DEBUG: Error 0 reading from HID device
msigd: Error querying device on blue - got <>
Try 'msigd --help' for more information.
rgb : -1575756
DEBUG: Error 0 reading from HID device
msigd: Error querying device on unknown09 - got <>
Try 'msigd --help' for more information.
input : hdmi1
pip : off
DEBUG: Error 0 reading from HID device
msigd: Error querying device on pip_input - got <>
Try 'msigd --help' for more information.
pbp_input : dp
pip_size : large
pip_position : right_top
osd_language : 1
osd_transparency : 0
osd_timeout : 20
sound_enable : off
DEBUG: Error 0 reading from HID device
msigd: Error querying device on back_rgb - got <>
Try 'msigd --help' for more information.
navi_up : game_mode
navi_down : screen_assistance
navi_left : alarm_clock
navi_right : input

@Wehin
Copy link
Author

Wehin commented Feb 11, 2020

# ./msigd --pro_mode user
Unexpected unknown03 : 00?
Unexpected unknown01 : V06
Unexpected unknown04 : DA1A019340045
Unexpected unknown05 : 000
Detected an unknown monitor. Please report the output of
'msigd --info --debug --query' as an issue and also provide
the ID (MAG...) of your monitor. Thank you!

Supported monitor modes:

  • User (equal "user")
  • Adobe RGB (return by query "reader")
  • Display P3 ("cinema")
  • sRGB ("designer")
  • HDR ( query segfault)
  • Cinema (blank)
  • Reader (blank)
  • Black-White (blank)
  • DICOM (blank)
  • EyeCare (blank)

@couriersud
Copy link
Owner

Cool. We are getting there. I'll include the fedora tip in the readme.md.
The rest needs more consideration. I will not be able to do this today but expect an update till the weekend.

DEBUG: Error 0 reading from HID device
indicates that less than PACKET_SIZE (64) bytes were returned by hid driver. This must not be an error. Unfortunately it triggers non-trivial code changes.
You should be able now to set osd parameters which are supported in the output above.

Thanks a lot for your support. Much appreciated. Your feedback will allow me to now introduce multi-monitor support.
I'll leave a comment here once I made the changes.

@couriersud
Copy link
Owner

Is this the order of modes in monitor OSD?
I need to extend the functionality now to support different parameter options depending on detected monitor.

@Wehin
Copy link
Author

Wehin commented Feb 11, 2020

yep, its from OSD

@couriersud
Copy link
Owner

Ok, 10 modes, in the order given.
As said, I need to extend the code to support per-monitor value lists.
Not a big deal, but needs some time.
In the mean time, any more information/lists from the OSD are appreciated.

@Wehin
Copy link
Author

Wehin commented Feb 11, 2020

already working on it :)

it would be nice to add language support in the output, I can translate into Russian

@Wehin
Copy link
Author

Wehin commented Feb 11, 2020

FW.024

Professional

 - Mode *
    - User
    - Adobe RGB
    - Display P3 **
    - sRGB
    - HDR
    - Cinema
    - Reader
    - Black-White
    - DICOM
    - EyeCare
 - Alarm Clock ***
     - Location 
        - Left Top
        - Right Top
        - Left Bottom
        - Right Bottom
     - OFF
     - 15:00 ****
     - 30:00 ****
     - 45:00 ****
     - 60:00 ****
 - Screen Assistance
    - OFF
    - Ruler:Center
    - Ruler:Edge
    - Scale:Vertical
    - Scale:Horizontal
    - Reference Line:Vertical
    - Reference Line:Horizontal
    - Grid
    - Rule of Thirds
    - 3D motion sickness assistance 

Tip:
* Switching the mode makes some 'Image' parameters inaccessible to change.
** DCI-P3 
*** Alarm have 4 presets.
**** default value for preset, value can be changed. max value is 99:59.

Image

 - Brightness [0..100]
 - Contrast [0..100]
 - Sharpness [0..5]
 - Gray Level [0..20]
 - Image Enhancement
   - OFF
   - Weak
   - Medium
   - Strong
   - Strongest
 - Responce Time
    - Normal
    - Fast
    - Fastest
 - Low Blue Light [on | off]
 - Local Dimming [on | off]
 - Color Temperature
    - Standart
        - 5000K
        - 5500K
        - 6500K
        - 7500K
        - 9300K
        - 10000K
    - Customization
        - Red [0..100]
        - Green [0..100]
        - Blue [0..100]
 - Gamma [1.8 | 2 | 2.2 | 2.4 | 2.6]
 - Saturation
   - Red [0..100]
   - Green [0..100]
   - Blue [0..100]
   - Cyan [0..100]
   - Magenta [0..100]
   - Yellow [0..100]
 - Hue
   - Red [0..100]
   - Green [0..100]
   - Blue [0..100]
   - Cyan [0..100]
   - Magenta [0..100]
   - Yellow [0..100]
 - Zoom In
   - OFF
   - ON
   - Location
     - Center
     - Up-Left
     - Up-Right
     - Down-Left
     - Down-Right
 - Screen Size
    - Auto
    - 4:3
    - 16:9
    - 21:9
    - 1:1

Tip:
* Switching the 'Professional:Mode' makes some parameters inaccessible to change.

Input Source

- HDMI1
- HDMI2
- DP
- Type C

PIP/PBP

- OFF
- PIP
    - Source
      - [list:Input Source]
    - PIP Size
      - Small
      - Medium
      - Large
    - Location
      - Left Top
      - Right Top
      - Left Bottom
      - Right Bottom
    - Display Switch
      - [list:Input Source]
    - Audio Switch
      - [list:Input Source]
- PBP(x2)
    - Source 1
      - [list:Input Source]
    - Source 2
      - [list:Input Source]
    - Display Switch
      - [list:Input Source]
    - Audio Switch
      - [list:Input Source]
- PBP(x3)
    - Source 1
      - [list:Input Source]
    - Source 2
      - [list:Input Source]
    - Source 3
      - [list:Input Source]
    - Display Switch
      - [list:Input Source]
    - Audio Switch
      - [list:Input Source]
- PBP(x4)
    - Source 1
      - [list:Input Source]
    - Source 2
      - [list:Input Source]
    - Source 3
      - [list:Input Source]
    - Source 4
      - [list:Input Source]
    - Display Switch
      - [list:Input Source]
    - Audio Switch
      - [list:Input Source]

Navi Key

- Up
- Down
- Left
- Right

Values:
- OFF 
- Brightness  (Slider “Image:Brightness”)
- Pro Mode  (List of “Professional:Mode”)
- Screen Assistance (List of “Professional:Screen Assistance”)
- Alarm Clock (List of presets “Professional:Alarm Clock”)
- Input Source (List “Input Source”)
- PIP/PBP Mode (List "OFF", "PIP", "PBP(x2)", "PBP(x3)", "PBP(x4)" )
- Zoom In (List “OFF” + “Image:Location”)
- Information On Screen (Switch button “Settings:Information On Screen”)

Tip: There is an additional button on the monitor that is not listed in this menu.

Settings

- Language (29)
- Transparency [0..5]
- OSD Timeout [5..30]
- Audio Source
  - Analog
  - Digital
- Quick Charger [on | off]
- Information On Screen [on | off]
- Reset
  - Yes
  - No

Tip:
It also contains information in the Information On Screen:

- Input Source
- Native Resolution
- Physical Resolution
- Refresh Rate
- Select Mode
- Content Type
- Bit Depth

@Wehin
Copy link
Author

Wehin commented Feb 12, 2020

Done

/etc/udev/rules.d/51-msi-gaming-device.rules

SUBSYSTEM=="usb", ATTRS{idVendor}=="1462", ATTRS{idProduct}=="3fa4", TAG+="uaccess"
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="1462", ATTRS{idProduct}=="3fa4", TAG+="uaccess"

@couriersud
Copy link
Owner

Committed a new version for you to test. This one will identify the monitor series (MAG/PS) and use different osd parameters and value lists. Not all of your feedback has been used yet.
The purpose of this version is to identify query codes (e.g. 004=0) which are used by the PS series.

Please provide the ./msigd --info --debug --query output

@couriersud couriersud self-assigned this Feb 12, 2020
@Wehin
Copy link
Author

Wehin commented Feb 12, 2020

./msigd --info --debug --query
DEBUG: Initializing HID lib
Vendor Id:      0x1462
Product Id:     0x3fa4
Product:        MSI Gaming Controller
Serial:         A02019010700
Monitor Series: PS Series
DEBUG: Special 01 b0 : 01 5a 37 00 00 00 00 00 00 00 00 00 00 00 00 00 
DEBUG: Special 01 b4 : 01 5a 41 00 19 b2 00 00 00 00 00 00 00 00 00 00 
DEBUG: Special 01 35 38 30 30 31 39 30 0d : 01 35 62 30 30 00 00 00 30 30 30 0d 00 00 00 00 
power : on
unknown02 : 000
serial : DA1A019340045
frequency : 030
unknown05 : 000
response_time : normal
alarm_clock : off
DEBUG: Error 0 reading from HID device
msigd: Error querying device on alarm_clock_index - got <>
Try 'msigd --help' for more information.
DEBUG: Error 0 reading from HID device
msigd: Error querying device on alarm_clock_time - got <>
Try 'msigd --help' for more information.
alarm_clock_position : left_bottom
screen_assistance : 0
screen_size : auto
pro_mode : dcpi_p3
eye_saver : off
image_enhancement : off
brightness : 75
contrast : 50
sharpness : 0
color_preset : 6500K
rgb : 100100100
unknown460 : 010
DEBUG: Error 0 reading from HID device
msigd: Error querying device on unknown470 - got <>
Try 'msigd --help' for more information.
unknown480 : 000
unknown490 : 000
unknown4<0 : bbb
unknown4=0 : 000
unknown4;0 : bbb
unknown4:0 : 002
unknown4<1 : bbb
unknown4=1 : 000
unknown4;1 : bbb
input : hdmi1
pip : off
pbp_input : hdmi1
pip_size : large
pip_position : right_top
unknown670 : 000
unknown680 : 000
unknown690 : 000
DEBUG: Error 0 reading from HID device
msigd: Error querying device on unknown69: - got <>
Try 'msigd --help' for more information.
osd_language : 1
osd_transparency : 0
osd_timeout : 30
quick_charge : off
audio_source : analog
navi_up : pro_mode
navi_down : screen_assistance
navi_left : alarm_clock
navi_right : input

@couriersud
Copy link
Owner

Thanks a lot. Most settings are supported now.

  • Setting alarm_index and clock_time seems not to be supported. Perhaps it is a write only feature, try setting an alarm clock using
    /msigd --alarm_clock_index 3 --alarm_clock_time 55 --alarm_clock 3
  • for the "unknownXXX" you need to find out what osd setting is related to them. A value of "bbb" indicates RGB or color values, the 670-690 settings should be PIP/PBP related.
  • "470" and "69:" are not supported (timeout)

@Wehin
Copy link
Author

Wehin commented Feb 12, 2020

Counter

Work:
./msigd --alarm_clock [1..4, off]

Not work

./msigd --alarm_clock_index 1 --alarm_clock_time 4444
msigd: Error setting --alarm_clock_index
./msigd --alarm_clock_index 3 --alarm_clock_time 55 --debug
DEBUG: Initializing HID lib
DEBUG: Setting alarm_clock_index to 003
DEBUG: Error 0 reading from HID device
DEBUG: Got unexpected return <>
msigd: Error setting --alarm_clock_index
Try 'msigd --help' for more information.

@Wehin
Copy link
Author

Wehin commented Feb 12, 2020

power

power on -> display is off

./msigd --power on --debug 
DEBUG: Initializing HID lib
DEBUG: Setting power to 001
DEBUG: Got unexpected return <_______________________________________________________________>
msigd: Error setting --power

power off -> display is off

 ./msigd --power off --debug
DEBUG: Initializing HID lib
DEBUG: Setting power to 000
DEBUG: Got unexpected return <_______________________________________________________________>
msigd: Error setting --power
Try 'msigd --help' for more information.

"power on" when display is off

./msigd --power on --debug
DEBUG: Initializing HID lib
msigd: No usb device found
Try 'msigd --help' for more information.

try to wait auto suspend and resume on command

@couriersud
Copy link
Owner

Only "--power off" is working. Same here. This is expected. When the monitor is off, the usb interface is off as well. I was disappointed as well.
However on MAG321Curv "--power on" doesn't turn off the monitor (what I would expect).
And the unexpected return is not what I would expect.

Alarm setting: Is it possible to set the alarms in the Windows application (CreatorOSD.exe)?

@Wehin
Copy link
Author

Wehin commented Feb 12, 2020

no have Windows sorry.

more results

--power                 ?broken
--response_time         +done
--alarm_clock           +done
--alarm_clock_index     -fail
--alarm_clock_time      -fail
--screen_assistance     *confuse only 9 presets + off, set 10 == 0 (off), 11 == 1, 12 == 2
--eye_saver             *confuse do nothing
--image_enhancement     +done
--brightness            +done
--contrast              +done
--sharpness             +done
--rgb                   *confuse current values is 100100100 > max
--unknown10             =miss
--input                 +done tip: main source in pip mode
--pbp_input             *confuse `pip_source`
--pip_size              +done
--pip_position          +done
--toggle_display        *confuse no effect `off` value, `on` toggle primary
--toggle_sound          *confuse currently toggle to `digital sound` an select audio source 0|1 in pip/pbp. ?Rename to audio_source HDMI1=0, HDMI2=1, DP=2, USBC=3
--osd_language          *confuse have 29 language(0..28) values limit 20
--osd_transparency      +done
--osd_timeout           +!done tip: 1..30 seconds, 0 == infinity :)
--reset                 *confuse no effect `off` value

@couriersud
Copy link
Owner

power: as indicated, only power off working, on PS series looks like touching it means power off
alarm-clock index and time: I have a workaround, this will take time to implement.
screen assistance: on my todo list
eye saver: will limit to MAG series.
rgb: 100100100 means red=100, green=100, blue=100
050050050 means red=50,green=50,blue=50
unknown10: what does "=miss" means?
-pbp_input: need to think about this.

  • toggle_sound: I don't understand your comments. This is a write only setting.
    Both toggle_sound and toggle_display only support "on". Need to document this.
  • reset - another setting which only works with "on".
    I will add these comments to the "--help" output.

@couriersud
Copy link
Owner

request:
result some value for scripting

./msigd --osd_language
-> 2

additional flag -v result values with description for human

Please open another issue for this.

@Wehin
Copy link
Author

Wehin commented Feb 12, 2020

rgb: yep, limit 100100100 > limit 100000000

./msigd --rgb 100100100
msigd: Unknown value <100100100> for option rgb

toggle_sound: toggle Settings:Audio Source to digital (if was selected Analog)and currently off change to source 0(HDMI1) and on change to source 1(HDMI2), we have 2 more sources 2 and 3.

unknown10: works but it’s not known what does

reset and power: better to use without additional arguments

@Wehin
Copy link
Author

Wehin commented Feb 12, 2020

maybe rename rgb to color_rgb? like color_preset or combine them color_temperature with values [5000K,5500K,6500K,7500K,9300K,10000K, (0..100,0..100,0..100)]

Another issue ? :)

@couriersud
Copy link
Owner

maybe rename rgb to color_rgb? like color_preset or combine them color_temperature with values [5000K,5500K,6500K,7500K,9300K,10000K, (0..100,0..100,0..100)]

Another issue ? :)

No, this would introduce endless if statements in the code and make adding further monitors a lot more difficult.

@couriersud
Copy link
Owner

rgb: yep, limit 100100100 > limit 100000000

./msigd --rgb 100100100
msigd: Unknown value <100100100> for option rgb

Fixed.

toggle_sound: toggle Settings:Audio Source to digital (if was selected Analog)and currently off change to source 0(HDMI1) and on change to source 1(HDMI2), we have 2 more sources 2 and 3.

Changed toggle_sound to accept hdm1,hdmi1,dp,usbc

unknown10: works but it’s not known what does

I'll leave this in. Some time we may understand it

reset and power: better to use without additional arguments

That would complicate the logic and scalability a lot. Will reconsider later.

@couriersud
Copy link
Owner

Closing this issue now. Please open a new issue if new bugs surface or new functionality is discovered.

couriersud added a commit that referenced this issue Feb 14, 2020
./msigd --alarm4x 610,620,630,640,4
sets all 4 alarm clocks and activates alarm 4

Added unknown271 for PS series

All color values now are encoded as comma-separated tripples, e.g.
./msigd --color_rgb 50,90,50

Updated readme.md
couriersud added a commit that referenced this issue May 9, 2021
This commit removes a number of potential security risks from msigd.
Please make sure to update to this version.

It also adds a usage warning to README.md and --help.

Issue #1-#28
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