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

AOC Q27P1B input source values #385

Open
denilsonsa opened this issue Feb 27, 2024 · 3 comments
Open

AOC Q27P1B input source values #385

denilsonsa opened this issue Feb 27, 2024 · 3 comments
Labels
aoc input source VCP feature x60 monitor specific problems with particular monitors

Comments

@denilsonsa
Copy link

I'm giving some feedback regarding the AOC Q27P1B monitor. It has four video inputs:

  • VGA (D-SUB)
  • DVI
  • HDMI
  • DP (DisplayPort)

Unfortunately, its implementation of the VCP 0x60 is… well… unique. And it probably behaves similarly to other AOC displays.

It claims to support:

Feature: 60 (Input Source)
   Values:
      01: VGA-1
      03: DVI-1
Full output of capabilities
$ ddcutil capabilities
Model: Q27P1
MCCS version: 2.1
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: 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
   Feature: 16 (Video gain: Red)
   Feature: 18 (Video gain: Green)
   Feature: 1A (Video gain: Blue)
   Feature: 60 (Input Source)
      Values:
         01: VGA-1
         03: DVI-1
   Feature: 62 (Audio speaker volume)
   Feature: 6C (Video black level: Red)
   Feature: 6E (Video black level: Green)
   Feature: 70 (Video black level: Blue)
   Feature: C8 (Display controller type)
   Feature: C9 (Display firmware level)
   Feature: B0 (Settings)
   Feature: B6 (Display technology type)
   Feature: D6 (Power mode)
   Feature: DF (VCP Version)
   Feature: F8 (Manufacturer specific feature)

But obviously it supports more values for VCP 0x60.

I also know this monitor is not yet added to any DDC database, because I get the Feature definition file not found: AOC-Q27P1B-9985.mccs message.

Limitations from my tests

I don't have any Windows system nor any way to sniff the I2C packets from a Windows system, so I cannot reverse-engineer it.

I don't have enough machines to feed both HDMI and DVI simultaneously to the display.

Given this is based on trial-and-error, there may be a few mistakes.

My findings

Here are my findings, based on trial-and-error:

  • x01: VGA
    • I can write this value and it switches to VGA.
    • This value is read whenever the display is in VGA mode.
  • x02: VGA (switch to)
    • I can write this value and it switches to VGA.
    • Even though the display only has one VGA input, it supports the command to switch to the second VGA.
    • This value is never read back; writing this value will read x01 a few seconds later.
  • x03: DVI (switch to)
    • I can write this value and it switches to the only DVI input.
    • This value is never read back.
  • x04: DVI (switch to)
    • I can write this value and it switches to the only DVI input.
    • This value is never read back.
  • x0f: DisplayPort (switch to)
    • I can write this value and it switches to the only DisplayPort input.
    • This value is never read back.
  • x10: Doesn't work
  • x11: HDMI (switch to)
    • I can write this value and it switches to the only HDMI input.
    • This value is never read back.
  • x12: Doesn't work
  • x300: DVI/HDMI (read-only)
    • I did not try to write this value.
    • This value gets read after the display has finished switching successfully to the DVI/HDMI input.
  • x301: DVI/HDMI (read-only)
    • I did not try to write this value.
    • This value gets read while the display is trying to switch to a DVI/HDMI input.
    • Sometimes 0x301, other times 0x302. I don't know the difference. Maybe it's related to the amount of connected devices.
  • x302: DVI/HDMI (read-only)
    • I did not try to write this value.
    • This value gets read while the display is trying to switch to a DVI/HDMI input.
    • Sometimes 0x301, other times 0x302. I don't know the difference. Maybe it's related to the amount of connected devices.
  • x305: DisplayPort (read-only)
    • I did not try to write this value.
    • This value gets read for the DisplayPort input.

To help me quickly test, I'm using this one-liner:

while read v ; do [ -n "$v" ] && ddcutil -v -d 1 setvcp 60 "$v" ; ddcutil -v -d 1 getvcp 60 ; done

Here's the full output log:

Full console output
$ # All lines containing "Feature definition file not found: AOC-Q27P1B-9985.mccs" are ommitted.

$ ddcutil -v -d 1 setvcp 60 1   # Switching to VGA.
Feature 0x60 does not support verification
$ ddcutil -v -d 1 getvcp 60     # Cannot read the value back until the display has finished switching.
Getting data for non-table VCP code 0x60 - Input Source:
VCP code 0x60 (Input Source                  ): Maximum retries exceeded
$ sleep 8
$ ddcutil -v -d 1 getvcp 60     # The value is available after finished switching to VGA.
Getting data for non-table VCP code 0x60 - Input Source:
Raw value: opcode=0x60, mh=0x00, ml=0x04, sh=0x00, sl=0x01, max_val=4 (0x0004), cur_val=1 (0x0001)
VCP code 0x60 (Input Source                  ): VGA-1 (sl=0x01)

$ sleep 8

$ ddcutil -v -d 1 setvcp 60 15  # Switching back to DP before the next test.
Feature 0x60 does not support verification
$ ddcutil -v -d 1 getvcp 60     # DP always reads back as 0x0305.
Getting data for non-table VCP code 0x60 - Input Source:
Raw value: opcode=0x60, mh=0x00, ml=0x04, sh=0x03, sl=0x05, max_val=4 (0x0004), cur_val=773 (0x0305)
VCP code 0x60 (Input Source                  ): Composite video 1 (sl=0x05)
$ sleep 8
$ ddcutil -v -d 1 getvcp 60     # DP always reads back as 0x0305.
Getting data for non-table VCP code 0x60 - Input Source:
Raw value: opcode=0x60, mh=0x00, ml=0x04, sh=0x03, sl=0x05, max_val=4 (0x0004), cur_val=773 (0x0305)
VCP code 0x60 (Input Source                  ): Composite video 1 (sl=0x05)

$ sleep 8

$ ddcutil -v -d 1 setvcp 60 2   # Switching to the (non-existent) second VGA.
Feature 0x60 does not support verification
$ ddcutil -v -d 1 getvcp 60     # Cannot read the value back until the display has finished switching.
Getting data for non-table VCP code 0x60 - Input Source:
VCP code 0x60 (Input Source                  ): Maximum retries exceeded
$ sleep 8
$ ddcutil -v -d 1 getvcp 60     # The value of the first VGA is read back.
Getting data for non-table VCP code 0x60 - Input Source:
Raw value: opcode=0x60, mh=0x00, ml=0x04, sh=0x00, sl=0x01, max_val=4 (0x0004), cur_val=1 (0x0001)
VCP code 0x60 (Input Source                  ): VGA-1 (sl=0x01)

$ sleep 8

$ ddcutil -v -d 1 setvcp 60 3   # Switching to DVI.
Feature 0x60 does not support verification
$ ddcutil -v -d 1 getvcp 60     # Reads back as 0x302 while switching.
Getting data for non-table VCP code 0x60 - Input Source:
Raw value: opcode=0x60, mh=0x00, ml=0x04, sh=0x03, sl=0x02, max_val=4 (0x0004), cur_val=770 (0x0302)
VCP code 0x60 (Input Source                  ): VGA-2 (sl=0x02)
$ sleep 8
$ ddcutil -v -d 1 getvcp 60     # Reads back as 0x300 after finished switching.
Getting data for non-table VCP code 0x60 - Input Source:
Raw value: opcode=0x60, mh=0x00, ml=0x04, sh=0x03, sl=0x00, max_val=4 (0x0004), cur_val=768 (0x0300)
VCP code 0x60 (Input Source                  ): Invalid value (sl=0x00)

$ sleep 8

$ ddcutil -v -d 1 setvcp 60 1  # Switching back to VGA before the next test.
Feature 0x60 does not support verification
$ ddcutil -v -d 1 getvcp 60    # Somehow, this time it swtiched quickly enough.
Getting data for non-table VCP code 0x60 - Input Source:
Raw value: opcode=0x60, mh=0x00, ml=0x04, sh=0x00, sl=0x01, max_val=4 (0x0004), cur_val=1 (0x0001)
VCP code 0x60 (Input Source                  ): VGA-1 (sl=0x01)

$ sleep 8

$ ddcutil -v -d 1 setvcp 60 4   # Switching to DVI.
Feature 0x60 does not support verification
$ ddcutil -v -d 1 getvcp 60    # Reads back as 0x302 while switching.
Getting data for non-table VCP code 0x60 - Input Source:
Raw value: opcode=0x60, mh=0x00, ml=0x04, sh=0x03, sl=0x02, max_val=4 (0x0004), cur_val=770 (0x0302)
VCP code 0x60 (Input Source                  ): VGA-2 (sl=0x02)
$ sleep 8
$ ddcutil -v -d 1 getvcp 60     # Reads back as 0x300 after finished switching.
Getting data for non-table VCP code 0x60 - Input Source:
Raw value: opcode=0x60, mh=0x00, ml=0x04, sh=0x03, sl=0x00, max_val=4 (0x0004), cur_val=768 (0x0300)
VCP code 0x60 (Input Source                  ): Invalid value (sl=0x00)

$ sleep 8

$ ddcutil -v -d 1 setvcp 60 x0f # Switching to DP
Feature 0x60 does not support verification
$ ddcutil -v -d 1 getvcp 60     # DP always reads back as 0x0305.
Getting data for non-table VCP code 0x60 - Input Source:
Raw value: opcode=0x60, mh=0x00, ml=0x04, sh=0x03, sl=0x05, max_val=4 (0x0004), cur_val=773 (0x0305)
VCP code 0x60 (Input Source                  ): Composite video 1 (sl=0x05)
$ sleep 8
$ ddcutil -v -d 1 getvcp 60     # DP always reads back as 0x0305.
Getting data for non-table VCP code 0x60 - Input Source:
Raw value: opcode=0x60, mh=0x00, ml=0x04, sh=0x03, sl=0x05, max_val=4 (0x0004), cur_val=773 (0x0305)
VCP code 0x60 (Input Source                  ): Composite video 1 (sl=0x05)

$ sleep 8

$ ddcutil -v -d 1 setvcp 60 x11 # Switching to HDMI
Feature 0x60 does not support verification
$ ddcutil -v -d 1 getvcp 60    # Reads back as 0x302 while switching.
Getting data for non-table VCP code 0x60 - Input Source:
Raw value: opcode=0x60, mh=0x00, ml=0x04, sh=0x03, sl=0x02, max_val=4 (0x0004), cur_val=770 (0x0302)
VCP code 0x60 (Input Source                  ): VGA-2 (sl=0x02)
$ sleep 8
$ ddcutil -v -d 1 getvcp 60     # Reads back as 0x300 after finished switching.
Getting data for non-table VCP code 0x60 - Input Source:
Raw value: opcode=0x60, mh=0x00, ml=0x04, sh=0x03, sl=0x00, max_val=4 (0x0004), cur_val=768 (0x0300)
VCP code 0x60 (Input Source                  ): Invalid value (sl=0x00)
$ sleep 8

System

  • Hardware
    • HP EliteDesk 800 G2 DM 65W
    • Intel i7-6700
    • Intel HD Graphics 530
    • 2x AOC Q27P1B connected via DisplayPort (direct cables, no adapters)
  • Software
    • ddcutil version 2.1.3
    • OS: Manjaro Linux x86_64
    • Kernel: 6.6.16-2-MANJARO

Action points

Can this kind of info be added to some database somewhere?

Do you need any additional information?

See also

denilsonsa added a commit to denilsonsa/dotfiles that referenced this issue Feb 27, 2024
@rockowitz
Copy link
Owner

There is no central database of monitor feature definitions. Given the huge and expanding range of monitors, creating and maintaining one would be a hopeless task. The message "Feature definition file not found: AOC-Q27P1B-9985.mccs" indicates that you have not created a local feature definition file for the monitor. See User Defined Features.

I suggest that you add your findings to the wiki page Notes on Specific Monitors or perhaps add a new page for AOC displays. This is also an appropriate location for people to report feature definition (mccs) file they have created.

@digitaltrails
Copy link

digitaltrails commented Apr 3, 2024

I've made this situation worse by making ddcutil-service treat SNC features strictly - after the fix for digitaltrails/vdu_controls#84, I discard the high byte.

Sanford: do you have anything to add on whether it's a good idea to generally discard the high-byte of SNC features? Discarding the high-byte fixes the SNC case where the high byte contrans a "junk" value (as in the ddcutil-service issue), but it seems that this is an example where the high-byte contains useful info.

My current proposal for ddcutil-service and vdu_controls is to allow a special qualifier in the vdu_controls metadata that would result in a flag being passed to ddcutil-service so that it returns both bytes of a particular SNC feature.

@digitaltrails
Copy link

digitaltrails commented Apr 4, 2024

Could this feature be handled by a ddcutil user defined feature, would it be CNC?

MFG_ID       AOC
MODEL        AOC Q27P1B
PRODUCT_CODE 12345
MCCS_VERSION 2.2
FEATURE_CODE 60  Input selection
    ATTRS NC RW
    VALUE 01 VGA
	VALUE 02 VGA (switch to)
	VALUE 03 DVI (switch to)
	VALUE 04 DVI (switch to)
	VALUE 0f DisplayPort (switch to)
	VALUE 11 HDMI (switch to)
	VALUE 300 DVI/HDMI (read-only)
	VALUE 301 DVI/HDMI (read-only)
	VALUE 302 DVI/HDMI (read-only)
	VALUE 305 DisplayPort (read-only)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aoc input source VCP feature x60 monitor specific problems with particular monitors
Projects
None yet
Development

No branches or pull requests

3 participants