Live data from Hacker News

Hacking the LG Monitor's EDID

gist.github.com

111–120 of 146 posts

Re: Hacking the LG Monitor's EDID

#111

Earlier quoted context omitted.

My favorite use case is Looking Glass. Want to play video games that only run in Windows, but don't want to leave Linux? You can run Windows in a virtual machine and "passthrough" your GPU's PCIe slot. The advantage is that Windows can get the full performance of your GPU. The disadvantage is that it took the whole GPU away from your Linux host, along with whatever display it's attached to. You can use a second GPU f…

Can you commit that to the looking glass readme.md - having skimmed their GitHub, it was unclear what it actually did. Out of curiosity, what is the performance like? Presumably good for desktop use, but how about fps sensitive games?

Latency is like a couple milliseconds i believe. Looking glass uses shared memory between the host and guest for the framebuffer.

Re: Hacking the LG Monitor's EDID

#112
post #80
post #76

Sounds exactly like the things that made me switch from Linux to MacOS 13 years ago. There's value in things just working and not having to learn about how my hardware actually works. Learned a lot though!

This has nothing to do with "Linux". The monitor is exposing a bad ID in its configuration block. Monitor says "I support 140Hz at 4k", so Linux (strictly the kernel framebuffer driver in use) says "OK then, that's the best one, give me that". And it doesn't work, because the Monitor lied. And the reason it works on Windows or (sometimes) MacOS is just that those systems have arbitrarily different default choices (e.…

OP is using an LG Ultragear gaming monitor which support the preferred resolution reported in the EDID "3440x1440 143.923 Hz", so this definitely has something to do with linux doing something different than windows/macos.

Re: Hacking the LG Monitor's EDID

#113

Earlier quoted context omitted.

My favorite use case is Looking Glass. Want to play video games that only run in Windows, but don't want to leave Linux? You can run Windows in a virtual machine and "passthrough" your GPU's PCIe slot. The advantage is that Windows can get the full performance of your GPU. The disadvantage is that it took the whole GPU away from your Linux host, along with whatever display it's attached to. You can use a second GPU f…

Can you commit that to the looking glass readme.md - having skimmed their GitHub, it was unclear what it actually did. Out of curiosity, what is the performance like? Presumably good for desktop use, but how about fps sensitive games?

I'd expect vsync-to-host to be the default, though something more like triple buffering should also work (with the host atomically grabbing the latest completed buffer to compose just-in-time for composing to finish before the RAMDAC starts the first line... so roughly grabbing at the start of blank, spending vblank compositing, and no tearing after vblank).

So in total, on the order of a millisecond additional latency if you pass vsync timing alignment down, and no variable refresh rate.

But the latter is barely compatible with compositing in general. All techniques for handling a VFR video stream in a window should also apply to the uncompressed/shared memory looking glass stream.

Re: Hacking the LG Monitor's EDID

#114
post #60
post #4

1. This is impressive debugging work by the author. No individual step is rocket science - especially when the story is the success path and not the forking paths of possible failures - but they kept their eyes on the prize and figured it out. 2. This reminds me why I no longer use linux on the desktop

This debuging and hacking kind of remind me of Windows, and dealing with various versions of drivers, service packs, and so on. Normal sane Linux user would just force resolution into bootloader, and create global xorg.conf. There are like 10 far easier ways to solve this problem.

Point is - I don't want to do any of this on my personal computer after work. I just want to plug a monitor in and... It works. Don't care why, don't care if windows/Mac has some quirks table. I debug enough stuff at work.

Re: Hacking the LG Monitor's EDID

#115
post #80

Earlier quoted context omitted.

This has nothing to do with "Linux". The monitor is exposing a bad ID in its configuration block. Monitor says "I support 140Hz at 4k", so Linux (strictly the kernel framebuffer driver in use) says "OK then, that's the best one, give me that". And it doesn't work, because the Monitor lied. And the reason it works on Windows or (sometimes) MacOS is just that those systems have arbitrarily different default choices (e.…

OP is using an LG Ultragear gaming monitor which support the preferred resolution reported in the EDID "3440x1440 143.923 Hz", so this definitely has something to do with linux doing something different than windows/macos.

We don't know that. OP never states what monitor he has, and "LG Ultragear" isn't a model. There's a range of models under that moniker, and if you look at LG's website, the max refresh tops out at 240Hz on some of them … and at 120 Hz on others.

Re: Hacking the LG Monitor's EDID

#116

Well… this monitor and its EDID are actually correct. The monitor supports 3440x1440 @ 144hz and in the EDID it’s setting that mode as preferred. I checked online and LG market the monitor with those specs, so it’s not an error. It would probably have been easier to flip the bit in the EDID that says the 60hz rate is preferred rather than messing about with the timings - since there is a perfectly good 60hz timing in…

> The monitor supports 3440x1440 @ 144hz and in the EDID it’s setting that mode as preferred. I checked online and LG market the monitor with those specs, so it’s not an error.

… so did I. There's several models all under the same "brand" name, or whatever hardware manufacturers call the idiocy of sell 8 products under the same name.

Some of them have max refresh rates of 120 Hz. Some can do higher. But the OP never states (unless I am missing it) what model monitor he has.

(There is a model number in the EDID dump but it doesn't seem to correspond in format to LG's model numbers…)

Re: Hacking the LG Monitor's EDID

#117

Related, I have to use BetterDisplay to force a custom EDID since my xiaomi gaming monitor goes into YCbCr colour space and blacks become gray when connected to macOS. (Ironically the fix I was using before finding out about EDID patching and the cause of the problem, which I thought was bad calibration on my end, was to switch input source back and forth which somehow fixed the issue until the monitor was shut down)

I too use betterdisplay on macOS after something in an OS update made my laptop decide that my second monitor can only support 30Hz instead of 144.

Re: Hacking the LG Monitor's EDID

#118
post #109
post #93

Earlier quoted context omitted.

Almost certainly the most common use case for multiple screens on Macs at this point is notebooks connected to an external monitor, some of the time. On modern Macbooks it's mostly all just Thunderbolt ports too, which are supposed to be interchangeable, people can plug in whatever wherever without thinking about. People may also run a monitor via a TB dock, which again may plug in wherever. Though even with desktops…

That's a poor excuse for shuffling screens that, like rather many (so not a rare bug), don't have unique serial numbers in their EDIDs, just because the user folded the laptop to sleep, and unfolded it the next day after breakfast to continue working/using. Resolving assignments of cloned screens in the absence of physical-plugging-involving hotplug (that thus only comes from the monitor(s) also turning off when the…

Docks with numbered ports make me want to have all things aligned. First monitor left to right needs to connect to port 1 and have number 1 in the system. I know this is not required but feels untidy if not done.

Re: Hacking the LG Monitor's EDID

#119
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…

Indeed they are for Hdmi. I even saw some claiming to support hdmi 2.0 (4k @60Hz), but I have never seen one for Hdmi 2.1.

Unfortunately despite huge progress with resolutions, refresh rates and ability to use one cable for lots of stuff (usb-c) we went significantly backwards in KVMs. If all your devices speak hdmi 2.1 there are one or two 4way devices that claim 8K-hdmi 2.1 (made by easycoo?), but if you have usb-c or newer displayport devices that don't support passive hdmi dongles your out of luck.

As far as I know there is one device on the market (made by delock) that claims to support DP1.4 (4k@60hz),but it has no edid emulation and there are no pass through edid emulators for displayport 1.4... So every time you switch kvm your displays will act as if they're disconnected/reconnected. If you do actual work on two pcs and you switch a lot that's horrible.

So the tldr is: great modes, but why did nobody think of the kvm users when making those standards (by for example making monitor hot plug detect being able to be disabled from monitor menu?).

Re: Hacking the LG Monitor's EDID

#120
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…

My favorite use case is Looking Glass. Want to play video games that only run in Windows, but don't want to leave Linux? You can run Windows in a virtual machine and "passthrough" your GPU's PCIe slot. The advantage is that Windows can get the full performance of your GPU. The disadvantage is that it took the whole GPU away from your Linux host, along with whatever display it's attached to. You can use a second GPU f…

So this is what those non-pass through "displayport edid emulators" are for!
Post reply on HN