[Laptop Display Hacking] Behold! The first 200Hz backlight strobed laptop display

Talk about overclocking displays at a higher refresh rate. This includes homebrew, 165Hz, QNIX, Catleap, Overlord Tempest, SEIKI displays, certain HDTVs, and other overclockable displays.
Post Reply
kyube
Posts: 24
Joined: 29 Jan 2018, 12:03

[Laptop Display Hacking] Behold! The first 200Hz backlight strobed laptop display

Post by kyube » 09 Oct 2021, 18:36

phpBB [video]


Running this on [email protected], from [email protected] (no frameskips even up until 280hz tho I got bad TCON/scaling issues since I'm running below 1080p, would love if someone could help me out and fix this)
I also tried 360hz but I just couldn't get it to sync up properly (I'm very sure I'm able to do 800x600 on 3xxHz without frameskipping)
I've synchronized the PWM frequency (since I seem to experience it even at 100% brightness for some reason) with the refresh rate somewhat (think the PWM freq is more in the 220-240hz range, but very close nonetheless) to achieve this, as mentioned by Chief in his single-strobe vs multi-strobe post! All of this was accidentally found, on my journey to remove multi-strobe PWM at 100% brightness on my laptop.

Very satisfied with the results!

User avatar
Chief Blur Buster
Site Admin
Posts: 9551
Joined: 05 Dec 2013, 15:44
Location: Toronto / Hamilton, Ontario, Canada
Contact:

[Laptop Display Hacking] Re: Behold! The first 200Hz backlight strobed laptop display

Post by Chief Blur Buster » 11 Oct 2021, 18:28

Wow, you modified and hacked your laptop display for 200 Hz strobing! While we have several display hackers participating in these forums, none have created a 200 Hz strobed laptop display. 200 Hz strobing is probably a sweet spot for a laptop LCD overclockable to roughly ~300 Hz, since you need excess refresh rate headroom to decrease strobe crosstalk.

For convenience, I've embedded your video.

I've put a shadow redirect link to Area 51 Display Engineering, because that's definitely display-hacker league stuff.

Tell me more, even with just 1 of the following:
- The original specs of the display; and/or
- Some before/after images; and/or
- Frameskipping images; and/or
- Do you have a strobe phase adjustment too for your backlight PWM adjustment?

Potential DIY Improvement #1: Strobe Phase Range-Extension Trick For Reducing Strobe Crosstalk

You managed to hack your PWM controller already, so this might be the easiest modification since you're already mostly more than halfway there with DIY PWM. Now you want to enhance your DIY PWM with a phase adjust, if you haven't already yet.

Half of the manufacturers do not realize it, but sometimes LCD GtG lag requires PWM pulse to overlap 2 refresh cycles for ideal minimum crosstalk, as follows:

Image

Image
However, in reality with large VBIs, ideal setting gets very weird phase offsets, depending on LCD GtG lag, creating a situation where 0% needs to be a slightly negative number or a large positive number. Regardless of the PWM offset method your controller supports, both -5% and 95% (with 10% pulse width) are identical VBI-overlapping pulses when modulus'd correctly into a 0%-100% phase offset range).

Image
The bigger the VTs, the more the crosstalk zone can fit completely inside the VBI. Cramming the LCD GtG elephant inside the drinking straw of a VBI. A multimillisecond-long VBI hides a multimillisecond LCD GtG better.

Potential DIY Improvement #2: Community Collaboration on Software Based Overdrive

Also, do you have Windows virtual driver experience? There's now a new open source windows indirect display driver BFI project (github) released by one of our forum members (under MIT license I believe), that can be upgarded to add a NVIDIA-shader-driven overdrive algorithm. We're currently very interested in seeing feature growth to this clean-sheet open source project something completely from scratch -- to add some Blur Busters-esque enhancements eventually.

It already has BFI (which benefits certain panel technologies significantly, especially 8-bit IPS LCDs and OLEDs).

Sometime in 2022, I plan to contribute some open source enhancements to this driver. Either add software-based overdrive to this. And/or software-based virtualized VRR eventually (someday) where I use the www.testufo.com/vrr algorithm on displays without VRR to de-stutter without needing hardware based VRR.

That can be great for 60 Hz LCDs that stutters bad at 40fps to 50fps. Software based VRR can give all 60 Hz gamers a taste of the VRR experience. Or non-VRR panels such as older 144 Hz panels like ViewSonic XG2402 or BenQ XL2411. And there's no VRR-overdrive problems with software-based overdrive, so manufacturers would need to add good VRR overdrive to become superior in motion quality to my software-based VRR interpolation algorithm.

Anybody could upgrade to hardware-based VRR which is generally superior. But not all of them -- some have very bad overdrive that even software based interpolated VRR is superior in motion quality to hardware based VRR. Software-based VRR interpolation can de-stutter games at all frame rates, on monitors that do not support VRR. Or as a replacement to hardware VRR that has very bad VRR overdrive. Obviously, I'll honor the MIT license by releasing my changes under MIT too, for anyone to freely use.

But if you can get a head start to improve your 200 Hz strobing further, if you want -- go nuts, download the open source project and add software-based overdrive to it. Even a simple math formula to begin with (the math formulas posted in the ScepticMatt thread), but ideally I prefer an OD LUT, with A(B)=C with a 64 kilobyte lookup table. Where A is previous refresh cycle color, and B is next refresh cycle color, and C is the pixel color we want to send to the monitor to achieve a pixel transition from A to B faster.

Depending on how good the GPU shader and the OD LUT is, Overdrive of existing desktop displays can be improved by displaying the native overdrive (turn overdrive off) and then give it to the GPU shader instead. I've done some tests with just a very crazy-simple math formula in a hidden TestUFO test, and I'm able to surpass the worst desktop monitor overdrive. So the bar of beating native overdrive is shockingly low, low, low. And even easier if the display has nothing at all.

Tl;DR: Even rudimentary overdrive formula is better than nothing, when it comes to laptop LCDs.

Software-Based Overdrive Gain Adjustment As a Shader In Windows Indirect Display Driver

Some of us (myself included) have photodiodes and algorithms needed to create the 64 kilobyte lookup table, the virtual display driver is simply executing it per subpixel for all pixels of all refresh cycles -- modern GTX/RTX cards can do an A(B)=C lookup in less than 5% of GPU utilization, and typical gaming laptops thus can do this shader based overdrive with low overheads.

Sometimes it's a delta value, e.g. A(B)=D (delta) where you need to add D to A in order to generate C. You clamp it to 0-255 range; any values below 0 is clamped to 0, any values above 255 is clamped to 255.

Overdrive Gain is simply a multiplier on the lookup table. You're multiplying D by units of overdrive gain, where a 0-to-128 range is sometimes units of 1/64 decimal. So a value of 64 overdrive gain in a range of 0-128 OD Gain, would mean the OD LUT is unmodified (no gain multiplier added).

Overdrive needs to be executed per-refresh cycle independently of the underlying framerate content. Essentially a refresh-cycle-based SweetFX or Reshade reprocessor, executing an overdrive shader program. If you want to reduce strobe crosstalk on overdriveless laptop LCDs. Like the metaphorical equivalent of ATI Radeon Overdrive of yesteryear, but executed by your laptop GPU's shader.

This can be useful for overdriveless laptop LCDs, especially on gaming laptops with fast GPUs that can effortlessly execute an overdrive shader program.

Adjusting overdrive gain has this very approximate effect on desktop LCDs when adjusting overdrive Gain on desktop LCDs. Overdrive Gain is implementable as a GPU shader program, but it has to be refresh-cycle granularity (windows indirect display driver) rather than framerate-granularity (not a Present hook)

Image

Overdrive-disabled looks worse than all of these, so a bit of amount of overdrive gain (usually about ~30/128 on 144Hz LCDs, and ~80/128 on 240Hz 1ms LCDs) creates the "Very Good Crosstalk".

GPU algorithms will add a bit of lag, but at 280Hz, that's only 1/280sec framedelay lag, which can be acceptable when you're prioritizing quality over latency. Software-based GPU shader processing for many display algorithms is enabled via a Windows indirect display driver.

Most desktop monitor scalers use 17x17 LUTs which is interpolated. But none of that garbage here; strobing ideally needs 256x256 OD LUT for more precise control of the LCD GtG heatmap which is much more critical for strobing.

Many laptop LCDs have no OD LUTs in order to save power but that turns 300 Hz Razer IPS LCDs into 3ms GtG instead of 1ms GtG. Software-based shader-driven overdrive would bring some parity to gaming laptop LCDs to desktop LCDs. In this case, huge strobe crosstalk reductions are possible with a shader-based OD LUT running on a gaming laptop's GPU via a Windows indirect display driver.

--- stop reading here if you only want to match desktop LCD strobing quality ---

The below is optional further extra enhancements to beat today's desktop strobing.

Overdrive Gain As Temperature Compensation For Strobe Crosstalk

Also, LCD temperature also influences the amount of OD Gain. Cold LCDs requires a slightly stronger OD Gain to go crosstalk free, while hot LCDs require a slightly weaker OD Gain to go crosstalk gain. All our recent Strobe Utilities (ViewSonic, Eve, and soon 1 more big-name manufacturer) includes strobe pulse length, strobe pulse width, and overdrive gain as the bare-minimum trio of adjustments for high-quality strobing.

I also mention the temperature-sensitivity of strobing (warm up your LCD for 30 minutes for the fastest GtG's to reduce strobe crosstalk), but it also makes it easier to hide crosstalk via OD Gain too, since lack of OD Gain is a big limiting factor on how low crosstalk a LCD becomes at high refresh rates (>100Hz). In my experience, for an LCD panel of 1/240sec scanout velocity, Overdrive with tunable OD Gain allows 180 Hz overdriveable LCD to have lower average crosstalk than the same LCD at 120 Hz with overdrive missing/disabled.

Optional Further Enhancements: Zone-Based Overdrive Gain

Now if you're enterprising, consider time differential between seqeuential scanout and global strobe. This means zoned overdrive helps strobing. The improvement factor becomes even bigger if there's zoned overdrive gain for each pixel row, or blocks of pixel rows (e.g. 10 pixel row groups). The first row of pixels might need an OD Gain of 50, while the last pixel row at bottom might need an OD Gain of 80. Sometimes it's a sharp gradient like (50,50,50,50,50,51,52,55,60,70,80) so each zone needs to be calibrated independently by photodiode per zone, so it can just be a simple 1D array (of 1080 elements) for the needed overdrive gain per pixel row. So you'd have two lookup tables, a 2D LUT (indexed by original / dest subpixel value) and a 1D LUT (indexed by pixel row) that becomes a multiplier of the delta in the original 2D LUT. All of this, pull off a dramatic doubling of refresh rate at same amount of strobe crosstalk -- approximately.

It's that BIG an improvement, which is why I am very interested in these new clean-sheet open source indirect display drivers (people let me know of two independently in development unbeknowst to my knowledge until recently).

Modern $1000 GPUs can outperform overdrive built into scalers/TCONs

A lot of strobing improvements are awaiting in the wings in just a mere DIY refresh-cycle-granularity shader-based reprocessor. The computing power of a modern gaming laptop GPU now allows a laptop LCD to have less crosstalk than a desktop LCD -- (once somebody marries a windows indirect display driver with reshade/sweetfx) -- since most desktop LCDs only use 17x17 LUTs and no zones along the vertical dimension of the screen.

There are now-outdated research papers such as this these and others in Google Scholar. This is why the industry standardized on puny 17x17 OD LUTs only good for 60 Hz non-strobed. To reduce power, to reduce cost of LCDs, etc.

High-Hz strobing pretty much almost mandatorily require bigger OD LUTs than 17x17 as the diminishing curve of returns are now pushed higher (approximately ~64x64 minimum, preferably 256x256). Since modern GPUs have gigabytes of memory, let's just go full hog, and have a complete 8-bit non interpolated OD LUT. Or heck, 10-bit OD LUT (1 megabyte of GPU RAM) for 10 bit displays).

A $1000 GPU can do overdrive gain algorithms vastly superior to today's scaler/TCONs. It's amazing we're leaving all that overdrive power on the table, unused except by the elite LCD developers (like the Valve Index LCD and Oculus Quest 2 LCD, etc) despite some generic overdrive science and physics that can easily be coded with just a few lines of shader. The hard work is the photodiode oscilloscoping, but once that is done, the overdrive gain shader program is shockingly tiny.

Manually Creating an OD LUT By Eye Without a Photodiode

You can outsource the OD LUT creation task to someone else (such as me, or to someone else), or simply use somebody's opensource OD LUT for an average panel (e.g. average 240 Hz IPS panel that somebody else created an OD LUT for), to give you a big jumpstart. THe person who creates the indirect display driver based overdrive system doesn't have to be the same person who creates the overdrive lookup table. And it can be done hobbyist on the cheap without any extra hardware.

One can avoid a photodiode oscilloscope and manually create an OD LUT! It's possible to approximately eyeball an OD LUT and manually interpolate it (use www.testufo.com/crosstalk type tests with www.testufo.com/blurtrail#thickness=8 while in strobed mode and create an Excel Spreadsheet with 2 numbers per box. Horiziontals is original color, verticals is destination color. Configure TestUFO Blur Trail with those foreground/background colors while you're strobing your screen at the refresh rate you want the best possible OD LUT basis for; most OD LUT are calibrated for 60Hz as the basis and OD Gain to "fix" the LUT for higher Hz. But you don't have to use 60 Hz as your reference point). Once TestUFO blur trail is configured with original/dest color as background/foreground, watch for crosstalk ghosting behind the movign line with the original/destination. Now try to adjust destination color (foreground) until the crosstalk trail disappears as much as you're able to for clearest part (pre-strobe-phase calibrated to screen middle). That's the manually eyeballed C of your A(B)=C. Enter new destination color into that cell of Excel. Stick to monochrome colors for easiest by-eye calibration (e.g. set subpixel colors to same value).

Now you've manually eyeball plotted A(B)=C with your eyes without an oscillscope -- and gave your laptop LCD vastly superior overdrive, without a photodiode! Maybe not as good as using an oscilloscope, but probably 80-90% as good, if you're very good at eyeballing for strobe crosstalk.

Doing (65536-256) measurements by eye might be a bit much, but you can still manually interpolate a 17x17 LUT (289 minus 17 = 272 eyeball TestUFO tests, which can be done within a day. I subtract 17 because of the no-operation, like black transitioning to black, which is a do-nothing operation). Execute a manual interpolation by perhaps an Excel formula (or any method) to generate a 256x256 LUT which you enter into your windows indirect display driver. Then test the manually interpolated 256x256 OD LUT until you see problem colors and manually surgically recalibrate only the problem areas of the GtG. A great surgical-recalibrate example) is the hot GtG areas of dim VA colors). So basically a 17x17 manual measure, interpolate to 256x256 either bilinear (most common) or bicubic (probably better), retest.

One might do 17x17, interpolate to 34x34, then surgically recalibrate the most problematic colors (e.g. dim colors of VA panels), then re-interpolate to 256x256. There are many possible manual by-eye-only workflows of generating an OD LUT by eye alone, without needing a photodiode oscilloscope, using only existing TestUFO animations.

There are early experiments in overdrive already done by filters (reshade/sweetfx style) but they are frame based. That never works well because overdrive needs to work on a refresh cycle granularity, and never frame granularity. Overdrive must execute completely independently of the frame rate of the underlying content, paying attention to the pixel colors of two adjacent refresh cycles.

Far more advanced overdrive algorithms more complex than A(B)=C are also possible (algebra formula overdrive created using regression formulas as the method of interpolation) -- even based off a history of 4 refresh cycles, AND their frametimes (to turn a laptop LCD into VRR superior to the G-SYNC native chip!). All the necessary power in a modern GPU exists to make VRR overdrive approximately as good as a native G-SYNC chip, but the math formulas are hard.

But we only need simple 256x256 OD LUTs (with simple A(B)=C) to make laptop strobing roughly as good as a Blur Busters Approved desktop strobing. Easy peasy programing stuff (the display driver is the hard part, but multiple codebases are now available opensource). Enhancing further with OD zones and advanced overdrive is just icing on the cake.

Collaboration Welcome

I've been looking at overdrive years and see a problematic overdrive situation as the refresh rate race uses a lawnmower engine of 17x17 OD LUT in a ferrari of a 360 Hz desktop monitor... And having no overdrive engine at all, when it comes to laptop LCDs -- the laptop electronics literally has to get out of the car and push those pixels a hell lot more manually.

For any readers, if you learned something new and decide to modify an open source refresh cycle granularity GPU shader processor of any kind -- please follow up!

If you decide to do some programming research to enhance a windows indirect display driver, these threads are a great jump-off point:

Forum Search: "overdrive" in topic titles of Area 51 forum
Very educational reading about LCD overdrive algorithms, and why it's easily done via a GPU shader.
Head of Blur Busters - BlurBusters.com | TestUFO.com | Follow @BlurBusters on Twitter

       To support Blur Busters:
       • Official List of Best Gaming Monitors
       • List of G-SYNC Monitors
       • List of FreeSync Monitors
       • List of Ultrawide Monitors

kyube
Posts: 24
Joined: 29 Jan 2018, 12:03

Re: [Laptop Display Hacking] Behold! The first 200Hz backlight strobed laptop display

Post by kyube » 12 Oct 2021, 13:53

This was a amazing read, thank you very much for this knowledge you've shared! it's incredible that shader-based PWM is a thing.
However, I think you're giving me more praise than I deserve Chief. :P
I haven't done any kind of hacking, my backlight panel has a PWM frequency (by default, ever since I bought it) of around 220-240hz. I've measured this using TFTCentral's method of counting pulses.
On my journey in fighting this PWM-related eyestrain I have (due to multi-strobe PWM, the bad kind as you've mentioned) I have stumbled upon your threads regarding strobing and PWM. So, I've attempted overclocking my laptop's refresh rate to maybe somehow match the PWM frequency loosely, to essentially achieve single-strobe PWM (the good kind!)
As 1920x1080 @ 100hz was my limit (I squeezed 105hz but I just kinda liked 100 more as it's even, though I was hitting the 240MHz pixel clock limit of my LVDS interface on my motherboard), I've tried playing around lower resolutions.
This led me to the discovery of 800x600 at +300hz displaying properly!! (I have not been able to verify if I frameskip above 300hz, I do have frameskip shots at 240hz, which I was able to do at 1152x648)
However, I am lacking a proper scaler/tcon board to display the resolution properly across the whole panel (as seen in the video)
ToastyX (the author of CRU - custom resolution utility) recommended me to try 1920x540 (and it looks much more usable, as shown in the video above!)

The panel is the AUO13ED (AUO B156HW01 V3), specs can be found here: https://www.panelook.com/B156HW01%20V3_ ... w_685.html

Frameskip tests and some (possibly bad) testufos I did:
https://mega.nz/file/WbgGUDwJ#B05A35mfD ... rsavyob_5U

I'm very sorry for the confusion and for disappointing you, Chief! I feel bad now, as I'm not worthy of your praises of being a mastermind that hacked a laptop's PWM controller to adjust PWM pulses and frequency... :(
The main reason I shared this to blurbusters was because I wanted to share the capabilities of laptop panels (and encourage people to try out higher refresh rates custom resolutions if possible) and possibly find a way to salvage it into a proper desktop monitor replacement by using something akin to the DP2LVDS converter Zisworks did.
Perhaps someone's multi-strobe PWM (what everyone touts as PWM) journey ends here by some overclock (and thus alleviates his eyestrain issue) they did.

User avatar
Chief Blur Buster
Site Admin
Posts: 9551
Joined: 05 Dec 2013, 15:44
Location: Toronto / Hamilton, Ontario, Canada
Contact:

Re: [Laptop Display Hacking] Behold! The first 200Hz backlight strobed laptop display

Post by Chief Blur Buster » 12 Oct 2021, 15:08

kyube wrote:
12 Oct 2021, 13:53
The main reason I shared this to blurbusters was because I wanted to share the capabilities of laptop panels (and encourage people to try out higher refresh rates custom resolutions if possible) and possibly find a way to salvage it into a proper desktop monitor replacement by using something akin to the DP2LVDS converter Zisworks did.
Aha! Do not be disappointed or embarassed,

I'm not dissapointed. I really like these posts no matter what the skill levels are. Other people will still have the needed skills, still. This is still useful information for other tweakers. Many people read my posts, and so my reply is not useless -- there are others that get inspired by all kinds of clever display tweaking we never think about!

You intentionally adjusted the refresh rate to more closely match the PWM limitations of the panel, to turn PWM dimming into something closer to motion blur reduction (framerate=Hz PWM).

Instead of bringing PWM to Hz, you brought Hz to PWM to commandeer poor PWM dimming into better PWM blur reduction strobing! That's a useful trick in a war-chest of easier display hacking. I did not even myself think of this, but it would work too if the venn diagram of available frequencies overlaps!

Adjusting the PWM directly is better obviously, but adjusting the refresh rate to match a native PWM is a clever idea too, if the PWM limitations falls within the overclocking Hz range of the panel!

Sometimes the backlight PWM is controlled by an independent board other than scaler/TCON, and can be modified/tweaked/hacked/overridden independently. Elexor has succeeded with this on some monitors by bypassing the monitor's existing backlight controller's PWM. It's one of the easiest form of hardware-based hacking of a panel actually since only a simple Arduino is needed to add backlight strobing with strobed VRR support superior to factory ELMB SYNC.

_____

For others interested in attempting to override the PWM, maybe Elexor may be willing to share you the Arduino source code of this VG279QM Ardunio-based PWM controller that replaces the monitor's native PWM controller.

Arduino Hacked VG279QM Backlight

This is a 280Hz gaming monitor with ELMB SYNC, but his Arduino-powered VRR strobing has superior motion quality to the original VG279QM ELMB SYNC.

It does require a small electronics box added to the back of your product, with a couple of wires into the panel, so that may not be ideal for people who want to keep hardware untouched, but it's another possible method of experimentation -- use an Arduino with your custom PWM driver to replace the original PWM. One does need to monitor VSYNC either from the hardware, or over the USB cable from software (timestamped + dejittered to compensate for USB jitter).
Head of Blur Busters - BlurBusters.com | TestUFO.com | Follow @BlurBusters on Twitter

       To support Blur Busters:
       • Official List of Best Gaming Monitors
       • List of G-SYNC Monitors
       • List of FreeSync Monitors
       • List of Ultrawide Monitors

Post Reply