Live data from Hacker News

Hacking the LG Monitor's EDID

gist.github.com

131–140 of 146 posts

Re: Hacking the LG Monitor's EDID

#132
post #129

Earlier quoted context omitted.

Funny... I am trying to learn how to patch my own debian stable kernel with an (incomplete) kernel patch submitted for adjusting the backlight on an Apple Studio Display. The monitor - to my surprise - works really great with my Debian 12 workstation via a displayport->usb-c converter cable. But (in typical Apple fashion) there is not a single button on the display to adjust brightness and the kernel doesn't support…

The latest version of that patch is here: https://lore.kernel.org/lkml/20230820094118.20521-2-julius@z... Also it should be trivial to run this as an out-of-tree module until it's merged. With DKMS or put hid_bl.c into an empty directory and add the following makefile: ``` ifneq ($(KERNELRELEASE),) # kbuild part of makefile obj-m := hid_bl.o else # normal makefile KDIR ?= /lib/modules/`uname -r`/build modules: %: $(M…

this is really helpful - thanks!

Re: Hacking the LG Monitor's EDID

#133

Earlier quoted context omitted.

Funny... I am trying to learn how to patch my own debian stable kernel with an (incomplete) kernel patch submitted for adjusting the backlight on an Apple Studio Display. The monitor - to my surprise - works really great with my Debian 12 workstation via a displayport->usb-c converter cable. But (in typical Apple fashion) there is not a single button on the display to adjust brightness and the kernel doesn't support…

>original author hasn't yet Julius has responded to comments as recently as a week ago and is now working on a (hopefully mergable) v4. You will probably see it in 6.7 and probably backported to stable kernels in a few months. It will support any monitor which uses this USB control scheme (presumably a few other apple monitors). So don't worry about making the time to address the comments. The author seems to be on t…

ah nice - i hadn't seen any additional activity so was gonna try and run with it on my own but thanks for the info

Re: Hacking the LG Monitor's EDID

#134
post #86

Earlier quoted context omitted.

I completely agree with you in principle. It's rarely an actual fault of anything in Linux. However the outside effect to me as a user is that I need to debug my monitor's EDID to get it to work correctly. Inconveniently for me (as much as I love digging into things like that) I really want to just plug in a conference room projector into my laptop and have other people already put in place out those workarounds for…

> I really want to just plug in a conference room projector into my laptop and have other people already put in place out those workarounds for me sometimes. Then you should definitely use Linux more, and buy hardware that explicitly supports Linux.

Ever had use hardware that you didn't buy yourself? I don't have a choice to select Linux friendly projectors at conferences. I still wanted to have the same experience of just plugging a cable into my computer and everything working as MacOS users have.

Re: Hacking the LG Monitor's EDID

#135
post #134

Earlier quoted context omitted.

> I really want to just plug in a conference room projector into my laptop and have other people already put in place out those workarounds for me sometimes. Then you should definitely use Linux more, and buy hardware that explicitly supports Linux.

Ever had use hardware that you didn't buy yourself? I don't have a choice to select Linux friendly projectors at conferences. I still wanted to have the same experience of just plugging a cable into my computer and everything working as MacOS users have.

> Ever had use hardware that you didn't buy yourself?

Yes, of course. The point wasn't that I would buy a device for my own use (though that is kind of appealing these days), but rather that your choices influence what the market provides.

If you want display devices to support Linux, you need to preferentially buy devices that explicitly support Linux, and make that fact known to vendors as well as you can.

Re: Hacking the LG Monitor's EDID

#136
post #41

Apparently there are $5-15 EDID "emulator" devices that are just an HDMI passthrough adapter with a fake EDID ROM that always reports common modes as 4K60/2K60/VGA. Apparent purpose is to get PS5 to work with quirky 4K TVs. A similar device called HDMI "dummy plug" allows GPU acceleration on quirky PCs without having a display, but the latter has no passthrough port at the back. If that's all the author needs, that m…

Yeah, we still have loads of "EDID minders" left over from the RGB/VGA days. Little in-line boxes with DIP switches to set a given resolution and refresh so display hardware always reported the same spec to any laptop/desktop/device plugged in.

Not surprised there are similar for HDMI.

Re: Hacking the LG Monitor's EDID

#137

I'm wondering if the real issue is the user doesn't have a DisplayPort 1.4 supporting cable or equipment. The speeds, color (10bit) and the resolution suggest to me that could be the real problem. I doubt the monitor would intentionally ship with such out of spec edid, especially since the monitor claims support from 48Hz to 144hz, likely for variable refresh rate.

I saw this was noted online as a potential issue so I did try two different cables first and neither of them worked. It's completely possible that neither of those cables were up to spec either, so I've ordered one that is VESA Certified to support DisplayPort 1.4 and I'll have to check and see if they work without the hack when they come in. I'm on my Mac now and it just lists 85 and 50 Hz in the display settings which seems odd.

Re: Hacking the LG Monitor's EDID

#138
post #3

I was expecting a tale of how the author managed to overwrite whatever part of the monitor's firmware was responsible for spitting out the EDID. While interesting, the title is a bit misleading: it's an ugly but effective hack to inject a custom EDID.

Haha, I'm happy to agree to disagree here. In my book doing hex editing on a binary file and overriding what my system thinks the monitor is reporting to ultimately solve the problem feels enough like a hack (http://catb.org/jargon/html/meaning-of-hack.html).

As someone else noted, I'm considering overwriting the EEPROM in the monitor but I'd like to be 100% certain that's correct before I try it (one of the reasons I posted to HN was to see if folks thought I was going down the wrong path). I'm actually going to try a completely new cable first in case it's a bandwidth issue.

Re: Hacking the LG Monitor's EDID

#140
post #24

An EDID override like this would be helpful for macOS as well, where the monitors swapping around after standby is a real annoyance [0] [1] EDID rewrites are 99% of the time blocked by the monitor firmware: https://notes.alinpanaitiu.com/Decoding-monitor-EDID-on-macO... By the way, one helpful tool that helped me navigate the EDID dump was Kaitai Struct [2]. It shows a side by side view with the hex view and the EDID…

I recently went down this rabbit hole and assumed the duplicated serial number in the EDID was playing a role in triggering it but even after switching to different monitors later on MacOS would still do this all the time. Just recently I moved my keyboard and mouse to the primary display that's connected over USB C and so far the problem has not reoccurred. No idea if having them on the secondary display was triggering the bug or if moving to the primary is just a way to mitigate it but FWIW, unless I've hit a string of good luck, it seems that for displays that also have USB combined MacOS takes the HIDs connected into account when deciding to flip your displays around every two seconds.
Post reply on HN