Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrische/06d949d18af05765868ce7ca1855522a to your computer and use it in GitHub Desktop.
Save chrische/06d949d18af05765868ce7ca1855522a to your computer and use it in GitHub Desktop.
How to update Lenovo ThinkVision P44w-10 to the newest firmware under Linux

The Situation

Connecting a ThinkPad X1 Carbon 7th Generation with a ThinkVision P44w-10 monitor via USB-C on both ends creates power delivery and screen blanking issues. According to Lenovo's support website this issue affects "some ThinkPads including X1 and X1 Yoga and other notebooks by USB Type C" and "P44w-10 and Y44w-10 monitors". Furthermore, it does not need to be applied to monitors manufactured after December 1st 2020. In case the monitor's firmware is below version LT1.5, it is recommended to be updated first. Lenovo published instructions on how to update the monitor on Windows, using WinISP. However, there does not seem to be an applicable guide for Linux yet.

This document is work in progress. Executing the following commands may damage your hardware and/or leave it in an undefined state. The author is not liable for any damage done.

$ dmesg

Research

The following sections describe the findings while researching the different types of connections between the laptop and the monitor.

USB-C (monitor) to USB-C (laptop) connection

$ i2cdetect -l

i2c-3   i2c         i915 gmbus dpb                      I2C adapter
i2c-1   i2c         Synopsys DesignWare I2C adapter     I2C adapter
i2c-8   i2c         AUX B/port B                        I2C adapter
i2c-6   i2c         i915 gmbus dpd                      I2C adapter
i2c-4   i2c         i915 gmbus dpc                      I2C adapter
i2c-2   smbus       SMBus I801 adapter at efa0          SMBus adapter
i2c-0   i2c         Synopsys DesignWare I2C adapter     I2C adapter
i2c-9   i2c         AUX C/port C                        I2C adapter
i2c-7   i2c         AUX A/port A                        I2C adapter
i2c-5   i2c         i915 gmbus misc                     I2C adapter
$ ddcutil detect

Invalid display
   I2C bus:  /dev/i2c-7
   EDID synopsis:
      Mfg id:               LGD
      Model:
      Product code:         1544
      Serial number:
      Binary serial number: 0 (0x00000000)
      Manufacture year:     2018
      EDID version:         1.4
   DDC communication failed
   This is an eDP laptop display. Laptop displays do not support DDC/CI.

Display 1
   I2C bus:  /dev/i2c-8
   EDID synopsis:
      Mfg id:               LEN
      Model:                LEN P44w-10
      Product code:         25045
      Serial number:
      Binary serial number: 1234567 (0x12D687)
      Manufacture year:     2020
      EDID version:         1.4
   VCP version:         2.2

The following command returns more details in regard to the detected displays.

$ ddcutil detect --vv

The relevant excerpt is Display 1 from above. It also prints the Controller, namely Mstar.

Display 1
   I2C bus:  /dev/i2c-8
      I2C address 0x50 (EDID) responsive: true
      Is eDP device:                      false
      Is LVDS device:                     false
      /sys/bus/i2c/devices/i2c-8/name:   AUX B/port B
   Extended information for /sys/bus/i2c/devices/i2c-8...
      PCI device path:     /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-DP-1/i2c-8
      name:                AUX B/port B
      i2c-dev/i2c-8/dev:   89:8
      i2c-dev/i2c-8/name:  AUX B/port B
      Connector:           (null)
      Driver:              i915
      DisplayPort only attributes:
         ddc path:                (null)
         ddc name:                (null)
         ddc i2c-dev/(null)/dev:    (null)
         ddc i2c-dev/(null)/name:   (null)
         DP Aux channel dev:      237:1
         DP Aux channel name:     AUX B/port B
   EDID synopsis:
      Mfg id:               LEN
      Model:                LEN P44w-10
      Product code:         25045
      Serial number:
      Binary serial number: 1234567 (0x12D687)
      Manufacture year:     2020
      EDID version:         1.4
   VCP version:         2.2
   Controller mfg:      Mstar
   Firmware version:    1.3
   Monitor returns DDC Null Response for unsupported features: false
$ ddcutil --bus 8 capabilities
Model: P44w-10
MCCS version: 2.2
Commands:
   Op Code: 01 (VCP Request)
   Op Code: 02 (VCP Response)
   Op Code: 03 (VCP Set)
   Op Code: 07 (Timing Request)
   Op Code: 0C (Save Settings)
   Op Code: E3 (Capabilities Reply)
   Op Code: F3 (Capabilities Request)
VCP Features:
   Feature: 02 (New control value)
   Feature: 04 (Restore factory defaults)
   Feature: 05 (Restore factory brightness/contrast defaults)
   Feature: 08 (Restore color defaults)
   Feature: 10 (Brightness)
   Feature: 12 (Contrast)
   Feature: 14 (Select color preset)
      Values:
         01: sRGB
         05: 6500 K
         06: 7500 K
         08: 9300 K
         0b: User 1
         0c: User 2
         0d: User 3
   Feature: 16 (Video gain: Red)
   Feature: 18 (Video gain: Green)
   Feature: 1A (Video gain: Blue)
   Feature: 52 (Active control)
   Feature: 60 (Input Source)
      Values:
         0f: DisplayPort-1
         11: HDMI-1
         12: HDMI-2
         13: Unrecognized value
         14: Unrecognized value
   Feature: 86 (Display Scaling)
      Values:
         01: No scaling
         02: Max image, no aspect ration distortion
         05: Max vertical image with aspect ratio distortion
         0b: Unrecognized value
         0f: Unrecognized value
         10: Unrecognized value
   Feature: 95 (Window Position(TL_X))
   Feature: 96 (Window Position(TL_Y))
   Feature: A4 (Window mask control)
   Feature: A5 (Change the selected window)
   Feature: AC (Horizontal frequency)
   Feature: AE (Vertical frequency)
   Feature: B2 (Flat panel sub-pixel layout)
   Feature: B6 (Display technology type)
   Feature: C6 (Application enable key)
   Feature: C8 (Display controller type)
   Feature: C9 (Display firmware level)
   Feature: CC (OSD Language)
      Values:
         02: English
         03: French
         04: German
         05: Italian
         06: Japanese
         09: Russian
         0a: Spanish
         0d: Chinese (simplified / Kantai)
   Feature: D6 (Power mode)
      Values:
         01: DPM: On,  DPMS: Off
         04: DPM: Off, DPMS: Off
         05: Write only value to turn off display
   Feature: DC (Display Mode)
      Values:
         00: Standard/Default mode
         01: Productivity
         06: Sports
         03: Movie
         05: Games
   Feature: DF (VCP Version)
   Feature: E0 (Manufacturer specific feature)
      Values: 00 01 02 (interpretation unavailable)
   Feature: EA (Manufacturer specific feature)
      Values: 00 01 (interpretation unavailable)
   Feature: EC (Manufacturer specific feature)
      Values: 00 01 (interpretation unavailable)
   Feature: ED (Manufacturer specific feature)
      Values: 00 01 (interpretation unavailable)
   Feature: EF (Manufacturer specific feature)
      Values: 00 01 (interpretation unavailable)
   Feature: F0 (Manufacturer specific feature)
      Values: 01 02 03 05 06 (interpretation unavailable)
   Feature: F1 (Manufacturer specific feature)
      Values: 01 0C 0D (interpretation unavailable)
   Feature: F2 (Manufacturer specific feature)
      Values: 00 01 (interpretation unavailable)
   Feature: F4 (Manufacturer specific feature)
   Feature: F5 (Manufacturer specific feature)
      Values: 00 01 02 (interpretation unavailable)
   Feature: FD (Manufacturer specific feature)
$ ddcutil getvcp known --bus 8


VCP code 0x02 (New control value             ): No new control values (0x01)
VCP code 0x0b (Color temperature increment   ): Invalid value: 0
VCP code 0x0c (Color temperature request     ): 3000 + 2 * (feature 0B color temp increment) degree(s) Kelvin
VCP code 0x0e (Clock                         ): current value =    50, max value =   100
VCP code 0x10 (Brightness                    ): current value =     0, max value =   100
VCP code 0x12 (Contrast                      ): current value =    75, max value =   100
VCP code 0x14 (Select color preset           ): User 1 (0x0b), Tolerance: Unspecified (0x00)
VCP code 0x16 (Video gain: Red               ): current value =   100, max value =   100
VCP code 0x18 (Video gain: Green             ): current value =   100, max value =   100
VCP code 0x1a (Video gain: Blue              ): current value =   100, max value =   100
VCP code 0x1e (Auto setup                    ): Auto setup not active (sl=0x00)
VCP code 0x20 (Horizontal Position (Phase)   ): current value =     0, max value =   100
VCP code 0x30 (Vertical Position (Phase)     ): current value =     0, max value =   100
VCP code 0x3e (Clock phase                   ): current value =    50, max value =   100
VCP code 0x52 (Active control                ): Value: 0x00
VCP code 0x60 (Input Source                  ): Invalid value (sl=0x14)
VCP code 0x62 (Audio speaker volume          ): Volume level: 100 (00x64)
VCP code 0x6c (Video black level: Red        ): current value =    50, max value =   255
VCP code 0x6e (Video black level: Green      ): current value =    50, max value =   255
VCP code 0x70 (Video black level: Blue       ): current value =    50, max value =   255
VCP code 0x86 (Display Scaling               ): Max image, no aspect ration distortion (sl=0x02)
VCP code 0x95 (Window Position(TL_X)         ): current value =     0, max value =  1920
VCP code 0x96 (Window Position(TL_Y)         ): current value =     0, max value =   600
VCP code 0xa5 (Change the selected window    ): Full display image area selected except active windows (sl=0x00)
VCP code 0xac (Horizontal frequency          ): 8564 hz
VCP code 0xae (Vertical frequency            ): 60.00 hz
VCP code 0xb2 (Flat panel sub-pixel layout   ): Red/Green/Blue vertical stripe (sl=0x01)
VCP code 0xb6 (Display technology type       ): LCD (active matrix) (sl=0x03)
VCP code 0xc0 (Display usage time            ): Usage time (hours) = 699 (0x0002bb) mh=0xff, ml=0xff, sh=0x02, sl=0xbb
VCP code 0xc6 (Application enable key        ): 0x0043
VCP code 0xc8 (Display controller type       ): Mfg: Mstar (sl=0x05), controller number: mh=0x00, ml=0x00, sh=0x56
VCP code 0xc9 (Display firmware level        ): 1.3
VCP code 0xca (OSD/Button Control            ): OSD enabled, button events enabled (sl=0x02), Host control of power unsupported (sh=0x00)
VCP code 0xcc (OSD Language                  ): English (sl=0x02)
VCP code 0xd6 (Power mode                    ): DPM: On,  DPMS: Off (sl=0x01)
VCP code 0xdc (Display Mode                  ): Standard/Default mode (sl=0x00)
VCP code 0xdf (VCP Version                   ): 2.2
$ i2cdetect 8

WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-8.
I will probe address range 0x08-0x77.
Continue? [Y/n]
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
     00:                         -- -- -- -- -- -- -- --
     10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
     20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
     30: 30 -- -- -- -- -- -- 37 -- -- -- -- -- -- -- --
     40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
     50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
     60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
     70: -- -- -- -- -- -- -- --

Three I2C addresses are responding. 0x37 and 0x50 are the "well known addresses" for DDC/CI and the EDID EEPROM, according to an old BenQ Z Series flash guide. This blog post is one of the rare sources about flashing Mstar chips. Furthermore, via this guide the info was found that communication with the Mstar chip requires address 0x49 on I2C. It does not seem to be available via USB-C.

HDMI to HDMI

$ ddcutil detect
Display 1
   I2C bus:  /dev/i2c-3
   EDID synopsis:
      Mfg id:               LEN
      Model:                LEN P44w-10
      Product code:         25045
      Serial number:
      Binary serial number: 1234567 (0x12D687)
      Manufacture year:     2020
      EDID version:         1.3
   VCP version:         2.2

Invalid display
   I2C bus:  /dev/i2c-7
   EDID synopsis:
      Mfg id:               LGD
      Model:
      Product code:         1544
      Serial number:
      Binary serial number: 0 (0x00000000)
      Manufacture year:     2018
      EDID version:         1.4
   DDC communication failed
   This is an eDP laptop display. Laptop displays do not support DDC/CI.

Checking for the adresses on HDMI's I2C bus, comes up with the following results. It seems like there are more available. Also, the beforehand mentioned 0x49, to address the Mstar chip, is listed.

$ i2cdetect 3

WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-3.
I will probe address range 0x08-0x77.
Continue? [Y/n]
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: 30 31 32 33 34 35 36 37 -- -- 3a -- -- -- -- --
40: 40 -- -- -- -- -- -- -- -- 49 4a -- -- -- -- --
50: 50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

To cross check the capabilities listed via HDMI ddcutil is used once more on bus 3.

$ ddcutil capabilities -b 3

Model: P44w-10
MCCS version: 2.2
Commands:
   Op Code: 01 (VCP Request)
   Op Code: 02 (VCP Response)
   Op Code: 03 (VCP Set)
   Op Code: 07 (Timing Request)
   Op Code: 0C (Save Settings)
   Op Code: E3 (Capabilities Reply)
   Op Code: F3 (Capabilities Request)
VCP Features:
   Feature: 02 (New control value)
   Feature: 04 (Restore factory defaults)
   Feature: 05 (Restore factory brightness/contrast defaults)
   Feature: 08 (Restore color defaults)
   Feature: 10 (Brightness)
   Feature: 12 (Contrast)
   Feature: 14 (Select color preset)
      Values:
         01: sRGB
         05: 6500 K
         06: 7500 K
         08: 9300 K
         0b: User 1
         0c: User 2
         0d: User 3
   Feature: 16 (Video gain: Red)
   Feature: 18 (Video gain: Green)
   Feature: 1A (Video gain: Blue)
   Feature: 52 (Active control)
   Feature: 60 (Input Source)
      Values:
         0f: DisplayPort-1
         11: HDMI-1
         12: HDMI-2
         13: Unrecognized value
         14: Unrecognized value
   Feature: 86 (Display Scaling)
      Values:
         01: No scaling
         02: Max image, no aspect ration distortion
         05: Max vertical image with aspect ratio distortion
         0b: Unrecognized value
         0f: Unrecognized value
         10: Unrecognized value
   Feature: 95 (Window Position(TL_X))
   Feature: 96 (Window Position(TL_Y))
   Feature: A4 (Window mask control)
   Feature: A5 (Change the selected window)
   Feature: AC (Horizontal frequency)
   Feature: AE (Vertical frequency)
   Feature: B2 (Flat panel sub-pixel layout)
   Feature: B6 (Display technology type)
   Feature: C6 (Application enable key)
   Feature: C8 (Display controller type)
   Feature: C9 (Display firmware level)
   Feature: CC (OSD Language)
      Values:
         02: English
         03: French
         04: German
         05: Italian
         06: Japanese
         09: Russian
         0a: Spanish
         0d: Chinese (simplified / Kantai)
   Feature: D6 (Power mode)
      Values:
         01: DPM: On,  DPMS: Off
         04: DPM: Off, DPMS: Off
         05: Write only value to turn off display
   Feature: DC (Display Mode)
      Values:
         00: Standard/Default mode
         01: Productivity
         06: Sports
         03: Movie
         05: Games
   Feature: DF (VCP Version)
   Feature: E0 (Manufacturer specific feature)
      Values: 00 01 02 (interpretation unavailable)
   Feature: EA (Manufacturer specific feature)
      Values: 00 01 (interpretation unavailable)
   Feature: EC (Manufacturer specific feature)
      Values: 00 01 (interpretation unavailable)
   Feature: ED (Manufacturer specific feature)
      Values: 00 01 (interpretation unavailable)
   Feature: EF (Manufacturer specific feature)
      Values: 00 01 (interpretation unavailable)
   Feature: F0 (Manufacturer specific feature)
      Values: 01 02 03 05 06 (interpretation unavailable)
   Feature: F1 (Manufacturer specific feature)
      Values: 01 0C 0D (interpretation unavailable)
   Feature: F2 (Manufacturer specific feature)
      Values: 00 01 (interpretation unavailable)
   Feature: F4 (Manufacturer specific feature)
   Feature: F5 (Manufacturer specific feature)
      Values: 00 01 02 (interpretation unavailable)
   Feature: FD (Manufacturer specific feature)

And the known VCP's, as shown in the following.

$ ddcutil getvcp known --bus 3
VCP code 0x02 (New control value             ): No new control values (0x01)
VCP code 0x0b (Color temperature increment   ): Invalid value: 0
VCP code 0x0c (Color temperature request     ): 3000 + 2 * (feature 0B color temp increment) degree(s) Kelvin
VCP code 0x0e (Clock                         ): current value =    50, max value =   100
VCP code 0x10 (Brightness                    ): current value =     0, max value =   100
VCP code 0x12 (Contrast                      ): current value =    75, max value =   100
VCP code 0x14 (Select color preset           ): User 1 (0x0b), Tolerance: Unspecified (0x00)
VCP code 0x16 (Video gain: Red               ): current value =   100, max value =   100
VCP code 0x18 (Video gain: Green             ): current value =   100, max value =   100
VCP code 0x1a (Video gain: Blue              ): current value =   100, max value =   100
VCP code 0x1e (Auto setup                    ): Auto setup not active (sl=0x00)
VCP code 0x20 (Horizontal Position (Phase)   ): current value =     0, max value =   100
VCP code 0x30 (Vertical Position (Phase)     ): current value =     0, max value =   100
VCP code 0x3e (Clock phase                   ): current value =    50, max value =   100
VCP code 0x52 (Active control                ): Value: 0x00
VCP code 0x60 (Input Source                  ): HDMI-1 (sl=0x11)
VCP code 0x62 (Audio speaker volume          ): Volume level: 100 (00x64)
VCP code 0x6c (Video black level: Red        ): current value =    50, max value =   255
VCP code 0x6e (Video black level: Green      ): current value =    50, max value =   255
VCP code 0x70 (Video black level: Blue       ): current value =    50, max value =   255
VCP code 0x86 (Display Scaling               ): Max image, no aspect ration distortion (sl=0x02)
VCP code 0x95 (Window Position(TL_X)         ): current value =     0, max value =  1920
VCP code 0x96 (Window Position(TL_Y)         ): current value =     0, max value =   600
VCP code 0xa5 (Change the selected window    ): Full display image area selected except active windows (sl=0x00)
VCP code 0xac (Horizontal frequency          ): 8564 hz
VCP code 0xae (Vertical frequency            ): 60.00 hz
VCP code 0xb2 (Flat panel sub-pixel layout   ): Red/Green/Blue vertical stripe (sl=0x01)
VCP code 0xb6 (Display technology type       ): LCD (active matrix) (sl=0x03)
VCP code 0xc0 (Display usage time            ): Usage time (hours) = 702 (0x0002be) mh=0xff, ml=0xff, sh=0x02, sl=0xbe
VCP code 0xc6 (Application enable key        ): 0x0043
VCP code 0xc8 (Display controller type       ): Mfg: Mstar (sl=0x05), controller number: mh=0x00, ml=0x00, sh=0x56
VCP code 0xc9 (Display firmware level        ): 1.3
VCP code 0xca (OSD/Button Control            ): OSD enabled, button events enabled (sl=0x02), Host control of power unsupported (sh=0x00)
VCP code 0xcc (OSD Language                  ): English (sl=0x02)
VCP code 0xd6 (Power mode                    ): DPM: On,  DPMS: Off (sl=0x01)
VCP code 0xdc (Display Mode                  ): Standard/Default mode (sl=0x00)
VCP code 0xdf (VCP Version                   ): 2.2

Flashrom "is a utility for detecting, reading, writing, verifying and erasing flash chips", according to its man page entry. The mentioned BenQ Z Series flash guide also describes the special Mstar module, written for flashrom. It is called mstarddc and is not activated by default. Hence, the following command builds a flashrom version which enables mstarddc.

$ git clone https://github.com/flashrom/flashrom.git flashrom
$ cd ./flashrom
$ make CONFIG_MSTARDDC_SPI=yes

Thereafter, it is possible to use flashrom to identify the Mstar chip. The module requires the i2c bus and address to be defined. The address (in that case 0x49 and according to the research on the old BenQ Z series guide) is where the mstar chip may be found via the i2c bus. Testing it comes up with the following output.

$ ./flashrom -p mstarddc_spi:dev=/dev/i2c-3:49

flashrom  on Linux 5.10.15-arch1-1 (x86_64)
flashrom is free software, get the source code at https://flashrom.org

Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).
Info: Will try to use device /dev/i2c-3 and address 0x49.
Info: Will reset the device at the end.
Found Macronix flash chip "MX25L3205(A)" (4096 kB, SPI) on mstarddc_spi.
Found Macronix flash chip "MX25L3205D/MX25L3208D" (4096 kB, SPI) on mstarddc_spi.
Found Macronix flash chip "MX25L3206E/MX25L3208E" (4096 kB, SPI) on mstarddc_spi.
Found Macronix flash chip "MX25L3273E" (4096 kB, SPI) on mstarddc_spi.
Multiple flash chip definitions match the detected chip(s): "MX25L3205(A)", "MX25L3205D/MX25L3208D", "MX25L3206E/MX25L3208E", "MX25L3273E"
Please specify which chip definition to use with the -c <chipname> option.

Following Lenovo's support website, describing the upgrade procedure on Windows, a chip name such as MST9U (seen on screenshots here) or MX25L1005 (seen on screenshots here in the pdf file for the instructions) was expected. As a side note, the official update procedure's description states in step 7 to press a button named TI FW Update instead of MStar FW Update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment