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

LG 29UM69G fails switching input #100

Open
jonpas opened this issue Dec 14, 2019 · 151 comments
Open

LG 29UM69G fails switching input #100

jonpas opened this issue Dec 14, 2019 · 151 comments
Labels
input source VCP feature x60 lg monitor specific problems with particular monitors

Comments

@jonpas
Copy link

jonpas commented Dec 14, 2019

LG 29UM69G fails at switching monitor inputs. I did not try other capabilities. Performing $ ddcutil --display 2 setvcp 60 0x[0f|11] simply flashes the screen, but nothing changes.

$ ddcutil detect
...
Display 2
   I2C bus:             /dev/i2c-6
   EDID synopsis:
      Mfg id:           GSM
      Model:            LG ULTRAWIDE
      Serial number:    
      Manufacture year: 2019
      EDID version:     1.3
   VCP version:         2.1

There is no Supports DDC: [true|false] in the output.

$ ddcutil environment shows all permissions are correct (read & write).

$ ddcutil --display 2 getvcp 60
VCP code 0x60 (Input Source                  ): Invalid value (sl=0x00)

This shows up correctly as VGA-1 (sl=0x01) for display 1 (secondary monitor).

ClickMonitorDDC on Windows has the same issue of reporting 0x00 and not being able to switch.

$ ddcutil capabilities --display 2 --verbose
...
Unparsed capabilities string: (prot(monitor)type(lcd)UM69cmds(01 02 03 0C E3 F3)vcp(02 04 05 08 10 12 14(05 08 0B ) 16 18 1A 52 60( 11 0F 10) AC AE B2 B6 C0 C6 C8 C9 D6(01 04) DF 62 8D F4 F5(01 02 03 04) F6(00 01 02) 4D 4E 4F 15(01 06 11 13 14 15 18 19 20 22 23 24 28 29 32 48) F7(00 01 02 03) F8(00 01) F9 E4 E5 E6 E7 E8 E9 EA EB EF FA(00 01) FD(00 01) FE(00 01 02) FF)mccs_ver(2.1)mswhql(1))
...
   Feature: 60 (Input Source)
      Values (unparsed):  11 0F 10
      Values (  parsed):
         0f: DisplayPort-1
         10: DisplayPort-2
         11: HDMI-1

Both monitors are connected to both an integrated GPU (Intel CPU) and dedicated GPU (GTX 1060) in the following way (VFIO setup):

  • Display 1 (secondary):
    • VGA -> iGPU
    • DVI -> dGPU
  • Display 2 (primary, LG 29UM69G):
    • HDMI -> iGPU
    • DisplayPort -> dGPU

Thank you in advance!

@rockowitz
Copy link
Owner

rockowitz commented Dec 14, 2019 via email

@jonpas
Copy link
Author

jonpas commented Dec 14, 2019

I assume since you mention ClickMonitorDDC that you're running Windows
in a VM. So as a first step, check whether ddcutil setvcp 60 or
ClickMonitorDDC work when used on the currently active input.

Correct, Windows is in a VM, host is Arch Linux. That is why I tried both ddcutil and ClickMonitorDDC, but neither combination worked.

DisplayPort connections are also problematic. Can you configure so that
DVI or HDMI, not DisplayPort, is used for the 29UM69G?

Sadly not possible, as 29UM69G only has 1x HDMI, 1x DisplayPort and 1x USB-C Alt. DP.

So that's the explanation the x00 response you're seeing.

Ah, I read that but didn't quite understand it, thanks for the explanation.

Please run command "ddcutil interrogate" when the input is set to the
source of the command, and send the output as an attachment.

Here you go, ran $ ddcutil interrogate on Linux host (connected with HDMI to iGPU): ddcutil_interrogate.log

@rockowitz
Copy link
Owner

rockowitz commented Dec 15, 2019 via email

@jonpas
Copy link
Author

jonpas commented Dec 15, 2019

Monitor displaying Linux (HDMI to iGPU - ddcutil):

  • getvcp 60 always returns 0 (LG Ultra-Wide issue)
  • setvcp 60 0x<> just blinks the monitor, nothing changes (tried all 3 given options)
  • getvcp 10 correctly returns current brightness
  • setvcp 10 [50|100|...] correctly sets brightness (as well as contrast, volume etc.)

Monitor displaying VM Windows (DisplayPort to dGPU - ClickMonitorDDC):

  • Input always shows 0 (LG Ultra-Wide issue)
  • Changing input just blinks the monitor, nothing changes
  • Current brightness is correctly shown
  • Brightness can be set (as well as contrast, volume etc.)

Brightness, contrast, volume etc. can also be set over non-active input and it works perfectly. Input however does nothing.

@rockowitz
Copy link
Owner

rockowitz commented Dec 15, 2019 via email

@jonpas
Copy link
Author

jonpas commented Dec 16, 2019

softMCCS gets all the correct codes but switching also fails with the same blank and return. Everything works correctly with my secondary (old Samsung SyncMaster) screen.

ddcutil_getvcp10_trcfunc.log
ddcutil_getvcp11_trcfunc.log

@rockowitz
Copy link
Owner

rockowitz commented Dec 16, 2019 via email

@jonpas
Copy link
Author

jonpas commented Dec 16, 2019

I assume there is no workaround to make feature x60 work properly?

And no problem!

@rockowitz
Copy link
Owner

rockowitz commented Dec 17, 2019 via email

@jonpas
Copy link
Author

jonpas commented Dec 17, 2019

Thank you for your help. I will post here if I get any more information.

@rockowitz rockowitz added input source VCP feature x60 monitor specific problems with particular monitors labels Jan 2, 2020
@SkyLeite
Copy link

SkyLeite commented Mar 6, 2020

I have this exact same issue with a 6 months old monitor. Seems unlikely that it would be hardware related, but I'm just speculating.

@davemap
Copy link

davemap commented Apr 13, 2020

I have the same issue and would be great if we could find a fix. @jonpas, have you heard anything from LG?

@jonpas
Copy link
Author

jonpas commented Apr 13, 2020

Negative, it was presumably passed to their technical department, but there has been no other reply so far.

@Gimzie
Copy link

Gimzie commented Jul 8, 2020

It seems my LG 34WK500-P ultrawide monitor has the same issue. Changing control 0x60 to any value flashes the screen and returns to the current input. Interestingly, executing the command from my only connected device (my Manjaro PC) while being on the other (unused) HDMI input causes the OSD to pop up directly on the input list.

@rockowitz
Copy link
Owner

rockowitz commented Jul 8, 2020 via email

@Gimzie
Copy link

Gimzie commented Jul 23, 2020

Sorry for the late reply (I sort of forgot about this thread) but I have my PC connected to HDMI 2 (running Manjaro Linux on an Intel UHD Graphics 630), and I have all of my GPU passthrough VMs set to use HDMI 1 (with my Nvidia Geforce GTX 1060 3GB card).

@rockowitz
Copy link
Owner

I'm afraid I have nothing to add here. Seems like another LG idiosyncratic DDC implementation.

@yeahman45
Copy link

I'm afraid I have nothing to add here. Seems like another LG idiosyncratic DDC implementation.

is this something that can be corrected in software/firmware (if that is the case, we can try asking LG technical support) or it is in hardware?

@davemap
Copy link

davemap commented Sep 2, 2020

I'm afraid I have nothing to add here. Seems like another LG idiosyncratic DDC implementation.

is this something that can be corrected in software/firmware (if that is the case, we can try asking LG technical support) or it is in hardware?

Personally I'm not too sure. I think a couple of us have opened cases with LG support but I'm pretty sure my case has got lost because it probably isn't work their time.or effort to investigate. However, if enough people raise the question, we may see some results

@yeahman45
Copy link

ok it is worth trying.

For my monitor lg 29um68-p, switching to hdmi 1 works but all other inputs (hdmi 2 and displayport) do not work. :(

@marcosscriven
Copy link

Came here looking for help with this on an LG 38WN95C - same thing, changing control 60 does nothing, whereas other things like brightness works. Was hoping for a workaround, but clearly there isn't one at the moment.

@marcosscriven
Copy link

@rockowitz - can something like ddcutil watch help here? I tried it and this is the only output I get, over and over:

sudo ddcutil watch      
Watching for VCP feature changes on display [i2c: fd=3, busno=7]
Type ^C to exit...
(new_control_values_exist      ) New control values exist. x02 value: 0x02
(reset_vcp_x02                 ) reset feature x02 (new control value) successful

Every time the reset line is logged, the OSD disappears. I was trying to change the input while running watch.

@TaiSHiNet
Copy link

@marcosscriven strangely, that one lists DDC/CI in the specs (unlike others, including mine)

@rockowitz
Copy link
Owner

rockowitz commented Sep 9, 2020 via email

@marcosscriven
Copy link

marcosscriven commented Sep 9, 2020

From an OSD menu perspective, PBP is a separate mode. In regular mode, one can choose an input from the top level. When in PBP mode, the menu changes, and then one has options for what goes on which side.
All that said - does this means potentially there’s still something that can be sent over I2C would do it, albeit nonstandard? And could this be determined empirically in a safe manner?
Or is the only safe option (I.e not bricking your monitor) to beg LG to help somehow (which we all know means somehow getting past requests like “reinstall Windows” etc.)?

@marcosscriven
Copy link

marcosscriven commented Sep 10, 2020

Another thought - I see running ddcutil capabilities shows a number of "manufacturer specific features". Could any of these potentially be used to change inputs? I can't find any explanation of this.

   Feature: F4 (manufacturer specific feature)
   Feature: F5 (manufacturer specific feature)
      Values: 01 02 03 04 (interpretation unavailable)
   Feature: F6 (manufacturer specific feature)
      Values: 00 01 02 (interpretation unavailable)
   Feature: 4D (unrecognized feature)
   Feature: 4E (unrecognized feature)
   Feature: 4F (unrecognized feature)
   Feature: 15 (unrecognized feature)
      Values: 01 06 11 13 14 15 18 19 20 22 23 24 28 29 32 48 (interpretation unavailable)
   Feature: F7 (manufacturer specific feature)
      Values: 00 01 02 03 (interpretation unavailable)
   Feature: F8 (manufacturer specific feature)
      Values: 00 01 (interpretation unavailable)
   Feature: F9 (manufacturer specific feature)
   Feature: EF (manufacturer specific feature)
   Feature: FA (manufacturer specific feature)
      Values: 00 01 (interpretation unavailable)
   Feature: FD (manufacturer specific feature)
      Values: 00 01 (interpretation unavailable)
   Feature: FE (manufacturer specific feature)
      Values: 00 01 02 (interpretation unavailable)
   Feature: FF (manufacturer specific feature)

Just looking at the value of the first one, for example:

sudo ddcutil getvcp F4  
VCP code 0xf4 (Manufacturer Specific         ): mh=0xff, ml=0xff, sh=0x00, sl=0x06

I have no idea what this means? Or how dangerous it would be to randomly start setting values.

@marcosscriven
Copy link

Further to the above, I noticed one can get all manufacturer code values:

sudo ddcutil getvcp MANUFACTURER 
VCP code 0xe2 (Manufacturer Specific         ): mh=0xff, ml=0xff, sh=0x00, sl=0x01
VCP code 0xe4 (Manufacturer Specific         ): mh=0x00, ml=0xff, sh=0x00, sl=0x00
VCP code 0xe5 (Manufacturer Specific         ): mh=0x00, ml=0xb3, sh=0x00, sl=0x00
VCP code 0xe7 (Manufacturer Specific         ): mh=0xff, ml=0xff, sh=0x00, sl=0x00
VCP code 0xe8 (Manufacturer Specific         ): mh=0x00, ml=0xff, sh=0x00, sl=0x00
VCP code 0xe9 (Manufacturer Specific         ): mh=0x00, ml=0xff, sh=0x00, sl=0x02
VCP code 0xea (Manufacturer Specific         ): mh=0x00, ml=0xff, sh=0x00, sl=0x00
VCP code 0xeb (Manufacturer Specific         ): mh=0x00, ml=0x01, sh=0x00, sl=0x00
VCP code 0xef (Manufacturer Specific         ): mh=0xff, ml=0xff, sh=0x5a, sl=0x60
VCP code 0xf4 (Manufacturer Specific         ): mh=0xff, ml=0xff, sh=0x00, sl=0x06
VCP code 0xf5 (Manufacturer Specific         ): mh=0x00, ml=0xff, sh=0x00, sl=0x02
VCP code 0xf6 (Manufacturer Specific         ): mh=0x00, ml=0xff, sh=0x00, sl=0x00
VCP code 0xf7 (Manufacturer Specific         ): mh=0x00, ml=0xff, sh=0x00, sl=0x02
VCP code 0xf8 (Manufacturer Specific         ): mh=0x00, ml=0xff, sh=0x00, sl=0x01
VCP code 0xf9 (Manufacturer Specific         ): mh=0x00, ml=0xff, sh=0x00, sl=0x32
VCP code 0xfa (Manufacturer Specific         ): mh=0x00, ml=0xff, sh=0x00, sl=0xff
VCP code 0xfb (Manufacturer Specific         ): mh=0x00, ml=0x0f, sh=0x00, sl=0x02
VCP code 0xfe (Manufacturer Specific         ): mh=0x00, ml=0xff, sh=0x00, sl=0x03

I noticed that 0xf9 changed from 0x32 to 0x46 when I swapped which side of PBP it was.

I thought therefore setting it by ddcutil might change it back, but I get a validation error:

sudo ddcutil setvcp f9 46   
Verification failed for feature f9

Sorry to bug @rockowitz - but do you have any guidance here please?

@marcosscriven
Copy link

marcosscriven commented Sep 11, 2020

Sorry for the stream - one other thing I tried is sudo ddcutil getvcp SCAN before and after swapping between HDMI 1 and HDMI 2 inputs. The only thing I see changing is the sh part of 0xAF:

HDMI 1

VCP code 0xaf (Unknown feature               ): mh=0x00, ml=0xff, sh=0x00, sl=0x00

HDMI 2

VCP code 0xaf (Unknown feature               ): mh=0x00, ml=0xff, sh=0xff, sl=0x00

So I tried setting this, to see if it would switch between HDMI 1 & 2.

However, it doesn't work directly with getvcp or setsvcp:

sudo ddcutil getvcp 0xaf
Unrecognized VCP feature code: 0xaf

sudo ddcutil setvcp 0xaf 0x0000  
Unrecognized VCP feature code: 0xaf

Is there any way @rockowitz to set an Unknown feature that can be read with sudo ddcutil getvcp SCAN?

@drzony
Copy link

drzony commented Aug 30, 2023

Unfortunately, the main API for DDC in Windows is SetVCPFeature, which does not allow to use a different I2C address. I've seen some APIs for I2C, but I'm not sure they are accessible from user space, and they might be "graphics card specific".

@sylveon
Copy link

sylveon commented Aug 31, 2023

Yes, the only way to implement this in Windows is to use proprietary extension SDKs (ADL, NVAPI, IGCL). I've been working on a tool specific for my own LG monitor using ADL and IGCL (I don't have a Nvidia GPU to test with)

@rockowitz
Copy link
Owner

Can someone clarify the status of ADL on Windows? On Linux it applies only to the old proprietary fglrx driver, and support for it was pulled from ddcutil. Poking around, it appears that AMD continues to maintain it for Windows, not on their web site, but on https://github.com/GPUOpen-LibrariesAndSDKs.

@sylveon
Copy link

sylveon commented Aug 31, 2023

ADL still works on Windows and is being updated semi regularly

@drzony
Copy link

drzony commented Aug 31, 2023

I managed to use NVAPI to send input change: https://gist.github.com/drzony/1744b4f72dcd4fde309a125445c474a1
Unfortunately I'm getting the same results as @moviuro . The monitor (38WN95C) just blinks to black for a second and does not switch the input. The good news is that I was able to enable PBP using the code above. I'll release the code with fallback to Windows APIs as soon as I'm finished with it.

@yeahman45
Copy link

yeahman45 commented Sep 1, 2023 via email

@shinyquagsire23
Copy link

@yeahman45 yes, it only responds to DDC when it's the 'focused' input. The best way to handle it via RPi would be over USB, which I think my script might have gotten buried a bit but that's actually part of the reason I never bothered using I2C, whatever is plugged into USB can always control DDC.

Script is at https://gist.github.com/shinyquagsire23/f6b2adef253c6c3ab557a4852bf3abad for switching inputs, I also have nicer abstractions in https://github.com/shinyquagsire23/lg_display_manager/blob/main/display_manager.py but I also did a lot of (!!monitor specific!!) firmware patches to get fine-grained control of the PBP.

@yeahman45
Copy link

yeahman45 commented Sep 1, 2023 via email

@drzony
Copy link

drzony commented Sep 1, 2023

@shinyquagsire23 Thanks for all your work. I'm still unable to get USB working. Can you point me as to where you got the "wrapping" values for HID? I can figure out some values from your code, but it would be nice to have some more info, so I could try to figure out what goes wrong on my monitor.

@HarshalKudale
Copy link

@aeleus not sure honestly, the easiest way would be via USB instead of i2c though, since i2c apparently has to go through GPU drivers which is its own mess. I've got a basic python script if anyone wants to try on Windows:

https://gist.github.com/shinyquagsire23/f6b2adef253c6c3ab557a4852bf3abad

Do you mean the service port USB on back of monitor or USB type c monitors. I have 24GN650N which apparently has service USB port on back.

@radaelilucca
Copy link

radaelilucca commented Nov 26, 2023

My LG UltraGear 27GP850P-B reacts poorly to all recommendations here so far. If I'm using the DP cable on my Linux machine, Windows on HDMI2 and try those:

for code in 90 91 d0; do
  ddcutil -d 3 setvcp xF4 0x${code} --i2c-source-addr=x50 --noverify
done

The monitor simply blinks to black then comes back without switching inputs.

I basically used this, which takes a few minutes to cycle through everything:

for a in 9 a b c d e f
do
    for b in 0 1 2 3
    do
        set -x
        ddcutil -b 25 setvcp xf4 x00$a$b --i2c-source-addr=x50 --noverify
        set +x
        sleep 6
    done
done

which iterated through up to 28 values to identify which ones mapped to which inputs. However, on my monitor, those values that did not map to an input source basically had no effect on the monitor, so perhaps your monitor's controller is somehow different from the monitor controllers of most of the other LG monitors discussed here.

On my 27UP850 it was sufficient to repeatedly pull the control joystick towards myself as the commands were invoked to identify the current selected input source.

Amazing, this is the mapping for model 34GL750. Now I just have to fix the Display not found problem when trying to switch back to HDMI1.

0x90 - HDMI 1
0x91 - HDMI 2
0xd0 - DP 1

@erenard
Copy link

erenard commented Feb 3, 2024

Hello,

I post here to report that this also works on my LG ULTRAGEAR 32GP850-B, manufactured in the week 12 of 2023.

ddcutil -d 1 setvcp xF4 x0090 --i2c-source-addr=x50 --noverify

0x0090 switches to HDMI-1
0x0091 switches to HDMI-2
0x00D0 switches to DP-1

@wigust
Copy link

wigust commented Feb 4, 2024

Hi.

Thank you for the tip, folks!

I post here to report that this also works on my LG ULTRAGEAR 32GP850-B, manufactured in the week 12 of 2023.

ddcutil -d 1 setvcp xF4 x0090 --i2c-source-addr=x50 --noverify

0x0090 switches to HDMI-1
0x0091 switches to HDMI-2
0x00D0 switches to DP-1

Works for LG 34WN650-W 34" 21:9 monitor with /bin/ddcutil from ddcutil-2.1.2.

The --i2c-source-addr flag is not recognized by /bin/ddcutil from ddcutil-1.4.5 package. So I updated client binary /bin/ddcutil to ddcutil-2.1.2 on my GNU/Linux system.

@alimoezzi
Copy link

alimoezzi commented Apr 2, 2024

Hi,

The following works perfectly for me on LG monitor 35WN75C-B when I'm connected through HDMI but not when I'm connected from USB-C.

ddcutil -d 1 setvcp xF4 x0090 --i2c-source-addr=x50 --noverify

Also xd7 split the screen

Does anyone have any idea why it doesn't work on USB-C?

@Slothinger
Copy link

Slothinger commented Apr 8, 2024

When i run "ddcutil capabilities" with my display attached via displayport it only gives me the Values for HDMI1, HDMI2, DP1 and DP2.

Feature: 52 (Active control)
Feature: 60 (Input Source)
Values:
11: HDMI-1
12: HDMI-2
0f: DisplayPort-1
10: DisplayPort-2
Feature: AC (Horizontal frequency)
Feature: AE (Vertical frequency)

@alimoezzi https://www.ddcutil.com/usb/

Would be great if i can switch the inputs via shortcut because the osd is really slow.

@kaleb422
Copy link

kaleb422 commented May 12, 2024

I was able to get input switching working on Windows with my LG ULTRAGEAR 27GP850-B with these values:
0x90 switches to HDMI-1
0x91 switches to HDMI-2
0xD0 switches to DP-1

I adapted some sample code in the NVIDIA API for sending i2c commands
https://github.com/kaleb422/NVapi-write-value-to-monitor

@ba114
Copy link

ba114 commented May 14, 2024

I was able to get input switching working on Windows with my LG ULTRAGEAR 27GP850-B with these values: 0x90 switches to HDMI-1 0x91 switches to HDMI-2 0xD0 switches to DP-1

I adapted some sample code in the NVIDIA API for sending i2c commands https://github.com/kaleb422/NVapi-write-value-to-monitor

Doesnt work on 34GN850-B unfortunately :(

@aslangencer
Copy link

For my LG 27UP850, indeed setvcp x60 does not function, much like all the other newer LG monitors described on this issue. It flickers off then back on without switching inputs. And indeed getvcp x60 reports x00.

The new --i2c-source-addr=x50 option for setvcp xf4 x00nn works pretty well. The inputs on my 27UP850 are mapped to the following values:

Input Value
HDMI 1 x0090
HDMI 2 x0091
DisplayPort x00D0
USB Type-C (DisplayPort Alt-Mode) x00D1
Thanks for all your work on this @rockowitz, @shinyquagsire23 and others.

(It's a pity I can't really do this on Windows using e.g. winddcutil given Win32 only seems to expose DDC/CI via the monitor control API.)

This monitor doesn't seem to support PBP -- using --i2c-source-addr=x51 with setvcp xd7 x000n where n is 1, 2, 3, 5 doesn't do anything.

My monitor's i2c interface disappears once the input is switched away. Switching input back using OSD sometimes does not restore it -- I have to unplug and replug the DisplayPort connector.

This works for LG HDR WQHD as well. Thanks heaps!

@lilipeipei
Copy link

I was able to get input switching working on Windows with my LG ULTRAGEAR 27GP850-B with these values: 0x90 switches to HDMI-1 0x91 switches to HDMI-2 0xD0 switches to DP-1

I adapted some sample code in the NVIDIA API for sending i2c commands https://github.com/kaleb422/NVapi-write-value-to-monitor

This works for my LG 32un880-b 👍

@Synvani
Copy link

Synvani commented Jun 23, 2024

I was able to get input switching working on Windows with my LG ULTRAGEAR 27GP850-B with these values: 0x90 switches to HDMI-1 0x91 switches to HDMI-2 0xD0 switches to DP-1

I adapted some sample code in the NVIDIA API for sending i2c commands https://github.com/kaleb422/NVapi-write-value-to-monitor

Yo thanks for sharing!
I'm getting an error: "NvAPI_EnumNvidiaDisplayHandle() failed with status -6"
Apologies if this is a newbie query, I didn't manage to make any sense of it from the code.
If it helps, I'm connected to a single LG 29WN600-W monitor via USB-C docking stations.

@SlimmaB
Copy link

SlimmaB commented Jul 19, 2024

Hi,

I have the same monitor LG ULTRAGEAR 27GP850-B and trying to change value in VSC to display 1, mine is 1 here and not 0 it seems like.
But when i try to update the .exe though VSC like this early in the code:

int display_index = 1;
BYTE input_value = 0x90;
BYTE command_code = 0xF4; //VCP code or equivalent
BYTE register_address = 0x50;

And trying to run it it changes the .exe to an .obj and says that it can´t find the .exe file, what am I doing wrong? (I´m a beginner in VSC and starting it though "delevoper command prompot for VS"

@yeahman45
Copy link

I was able to get input switching working on Windows with my LG ULTRAGEAR 27GP850-B with these values: 0x90 switches to HDMI-1 0x91 switches to HDMI-2 0xD0 switches to DP-1

I adapted some sample code in the NVIDIA API for sending i2c commands https://github.com/kaleb422/NVapi-write-value-to-monitor

unfortunately does not seem to work on my lg 29um68 :(

@gzougianos
Copy link

gzougianos commented Jul 22, 2024

Did anyone manage to make it work in LG UltraGear 32GR93U-B ? (Windows 11)

In ControlMyMonitor the monitor has this values. xF4 does not seem to change when I manually change from DisplayPort to Hdmi2. Thus, I am a bit afraid to try change it to any of these values:
HDMI 1 x0090
HDMI 2 x0091
DisplayPort x00D0

imgxx

@kaleb422
Copy link

I was able to get input switching working on Windows with my LG ULTRAGEAR 27GP850-B with these values: 0x90 switches to HDMI-1 0x91 switches to HDMI-2 0xD0 switches to DP-1
I adapted some sample code in the NVIDIA API for sending i2c commands https://github.com/kaleb422/NVapi-write-value-to-monitor

Yo thanks for sharing! I'm getting an error: "NvAPI_EnumNvidiaDisplayHandle() failed with status -6" Apologies if this is a newbie query, I didn't manage to make any sense of it from the code. If it helps, I'm connected to a single LG 29WN600-W monitor via USB-C docking stations.

@Synvani Looks like you're getting the return value NVAPI_NVIDIA_DEVICE_NOT_FOUND which means "No NVIDIA device found in the system". This solution uses the NVIDIA API are you running an NVIDIA gpu?

@kaleb422
Copy link

Hi,

I have the same monitor LG ULTRAGEAR 27GP850-B and trying to change value in VSC to display 1, mine is 1 here and not 0 it seems like. But when i try to update the .exe though VSC like this early in the code:

int display_index = 1; BYTE input_value = 0x90; BYTE command_code = 0xF4; //VCP code or equivalent BYTE register_address = 0x50;

And trying to run it it changes the .exe to an .obj and says that it can´t find the .exe file, what am I doing wrong? (I´m a beginner in VSC and starting it though "delevoper command prompot for VS"

@SlimmaB try running the exe with command line arguments like this "writeValueToScreen.exe 1 0x90 0xF4 0x50". Otherwise you can try compiling the source code unaltered then run it the same way

@gzougianos
Copy link

gzougianos commented Jul 23, 2024

@kaleb422 Your "script" works on LG-UltraGear-32GR93U-B with the exact same numbers exist on README: https://github.com/kaleb422/NVapi-write-value-to-monitor

Which is really interesting, because I forgot to change display-id and used "0" as you did.

But check here the ddcutil-detect output on my PC:

>>>>>C:\Users\xx\Downloads>winddcutil.exe detect
1 Dell S2721DGF (DP) (Another monitor I use)
2 glgl (That's my UltraGear, just renamed)
3 Generic PnP Monitor (Laptop's display I guess...

As long it works, I won't ask for more. Thank you.

@ashbork
Copy link

ashbork commented Jul 23, 2024

Any luck with 32MP60G?

@aijunzhao
Copy link

I was able to get input switching working on Windows with my LG ULTRAGEAR 27GP850-B with these values: 0x90 switches to HDMI-1 0x91 switches to HDMI-2 0xD0 switches to DP-1

I adapted some sample code in the NVIDIA API for sending i2c commands https://github.com/kaleb422/NVapi-write-value-to-monitor

thank you very much for your great work . it worked for me half of it.what i mean is i used hdmi2 for the monitor with one computer and hdmi1 for another latop, then i used the command code is: writeValueToDisplay.exe 0 0x90 0xF4 0x50, it works fine to swicth to hdmi1,but when i used codes: writeValueToDisplay.exe 0 0x91 0xF4 0x50, it cannot switch back.

how do i switch back to hdmi2??? many thanks.

@aijunzhao
Copy link

the error prompt is like these:
NUAPI I2cWrite(revise brightness)failed with status -1 ,Changing input failed

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

No branches or pull requests