• Other
  • Disable Color Dither method collection

diop

Can I use this code with older versions of MacOS?

I think yes. But the final answer depends on the Kext in use. You can list Intel kext's to see if we are using same version. If there are different framebuffers, you can send me framebuffer kext and I can take a look if it has this hidden parameter.

when did you notice symptoms

I got eye strain after 3-4 months of using MacBook pro. It became worse when I changed lights in my apartment to PWM led strips. Now I do not use LED lightings, just old lightbulb, and desk lamp. Also, I switched my primary screen from MacBook screen to external Displays (Dell UP2414q). Not starring all day into MacBook screen seems to give me relief.

Never had any problems with most screens for 20 years. Only some crappy glossy PWM displays made me uncomfortable, but I avoided them with success.

how did you find out this kext information?

You need some sort of decompiler. I Use IDA64 with hex-rays plugin.
Then I went into each suspicious Kext (Show content) and pulled binary into IDA64. You are interested to decompile Unix Executable in *.kext/Contents/MacOS/:
https://ibb.co/JCRx1TY

Then in IDA - View->Open Subview->Strings (Shift+F12)
And try to search for Dither there. x key on the string will show all code usages for this string. Go there and press F5 for hex-rays C-like decompiled code

  • diop replied to this.

    Gleb Are you running Catalina? I can upgrade this Mini to the latest MacOS (as it's a late 2012 machine) before attempting this.

    • Gleb replied to this.

      martin Yesterday I screw up with AMD driver modification (every time I set CFG_NO_DITH - I can't restart machine anymore, stuck on logo, about 70%)

      The way to fix is to load in recovery mode (holding command+R) and copy unmodified kexts from recovery partiyion to your /System/Library/Extensions/

      Here I did screenshot of commands I use for restoring original kext:
      https://ibb.co/Gt0X1YH

        diop I'm still on Mojave 10.14.6 (18G95) - didn't upgrade for 32bit reasons.

        I believe after updating I would need to do config modifications again.

        Gleb I cant even get the first command in terminal running - kextstat | grep Intel

        Martin-MacBook-Pro:~ martinjanas$ kexstat | grep Intel
        -bash: kexstat: command not found

        You are probably very experienced and so certain things seem as given, is there more dumbed down version of how to do this?

        Also how about installing windows 10 via bootcamp and trying to disable all of it there to see if it indeed helps your eyes? Could you do that and share the process? Its good testing ground as its easy to wipe it if it goes wrong and still keep macos intact. If it works there, then its good motivation to figure it out for macos.

        kextstat | grep Intel

        That was a typo somewhere

        Windows

        I do not have much free space currently for it. But even in MacOS flipping integrated\discrete card switch makes a HUGE difference in how fonts and colors looks. Also now it is relaxing on eyes (my gf also see a difference with and without dithering)

        • diop replied to this.

          diop Unfortunately I do not see this hidden parameter for FramebufferCapri:

          https://ibb.co/5RtdNR8

          You may try to set Dither instead of mine DitherDisable

          number = 0 to disable it, if I understood Framebuffer code correctly

          But I can't promise results. Still worth trying.

          • diop replied to this.

            Gleb I am running Mojave 10.14.3 - would upgrading OS to Catalina change the drivers installed?

            • Gleb replied to this.

              diop

              In the meantime, I wonder if you install SwitchResX https://www.madrau.com/srx_download/download.html
              And reduce colors to Millions of color, instead of billions https://ibb.co/44P4CDQ

              AND, more important, in System Preferences -> Display -> Color, select Generic RGB Profile instead of Color LCD https://ibb.co/hXz3JmG

              Then it seems to disable (or at least reduce) dithering effects.

              You can verify it on gradient image http://www.lagom.nl/lcd-test/gradient.php
              It should look banded, not linear gradient as here: https://ibb.co/PY4PZ71

              Can you try it and share the experience?

              diop

              would upgrading OS to Catalina change the drivers installed?

              Not likely, they seem to bind specific Framebuffer implementation to specific device
              But worth a try. You can then send me your framebuffer kext so I can look into. Maybe, they added setting there.

              • diop replied to this.

                Gleb So initially after trying to follow the instructions I realised I didn't have Xcode installed. I tried to download from the App Store but it required that I upgraded AppleOS. So I've upgraded the system to latest Catalina.

                The Grep | Intel list looks the same > https://imgur.com/jjJorY8
                However when trying to allow permissions to the Directory/plist file it said something to the effect of 'read only directory'. I ran csr disable in recovery after the Catalina upgrade, so maybe there's another security feature that needs to be disabled first?

                I opened the plist file direct in Xcode here > https://imgur.com/HwYyZkD - but I couldn't find any FeatureControl option.

                I did change the colour profile to Standard RGB, but didn't install SwitchResX.

                Here is a pic of the test page > https://imgur.com/JLWqC1B - I can see a gradient which is strange.

                If there's anything you can suggest I will give it a shot - thanks for your help so far. (Glad to know it's working for you at least).

                • Gleb replied to this.

                  diop
                  You need to navigate deep in that plist file: IOKitPersonalities->AppleIntelFramebufferController->FeatureControl

                  FeatureControl is a sub-section 3 layer depth from the root. See my picture again: https://ibb.co/dgqK0MS

                  For the file permissions, you may try right-clicking on plist in finder->get info

                  And add your account to this list

                  • diop replied to this.

                    fyi.. with AMD+Displayport you can turn off dithering in the control panel (select 6 bit color)

                      reaganry
                      Is this for windows only? Or there is some kind of AMD control-panel for macos?

                        Gleb After a bit of searching online it appears that from Catalina onwards kexts have to be signed by Apple in order to work, also I think the file system changes mean system files are permanently read-only regardless of SIP being switched off.

                        I downgraded to Mojave and installed Xcode - I made a slight mistake editing the plist and couldn't see a way to undo changes (doh) so will start over tomorrow and try again. Presumably I right-click FeatureControl and 'Add Row'? Then enter the details like you mentioned 'Dither' value '0'.

                        Do the changes happen immediately after adding the line or does the system need to be restarted first?

                        • JTL replied to this.

                          diop

                          diop Do the changes happen immediately after adding the line or does the system need to be restarted first?

                          I presume the later, I believe the kext plist is only loaded into memory when the kext is loaded, which a reboot would do.

                          I updated to Catalina (10.15).
                          I checked decompiled code for AppleIntelCFLGraphicsFramebuffer, and they still have DitherDisable hidden option

                          For Catalina there is additional step needed before they allow editing Plist inside kext:
                          sudo mount -uw /

                          I checked logs with command
                          log show --predicate 'processID == 0' --last 1h | grep Intel

                          https://ibb.co/TmCqKRb
                          and

                          log show --predicate 'processID == 0' --last 20h | grep Dither
                          https://ibb.co/WzjyHGH

                          BUT
                          I think things are looking a bit different.
                          Previously (on 10.14) when I was switching to High-Performance, I was noticing immediate changes in font rendering and color balance (they looked very strange on AMD).

                          Now there is no visual difference between Intel and Amd graphics. There are 3 possible reasons:

                          1. DitherDisable option is no longer working in my Framebuffer
                          2. Dithering is disabled for both AMD and Intel in the new upgrade
                          3. DitherDisable flag now controls BOTH integrated Intel and AMD.

                          I will need to look at my screen for a day to see how it works.

                          ever visited a good optometrist?

                          In the end, martin may be right about this, and I just have aging symptoms (I'm 28 now, work on computers since 6). The reason why I think this might be an issue: I booted Windows PC (with AMD 280x card), disabled\enabled Dithering in registry, and didn't notice any effect. Only thing I see is kind of visual snow (and that is the first symptom for CVS).

                          Also I wonder if @JTL is able to connect the capture card to one of DP output? And record video of signal from mac.

                          Also, if anyone here does have android eink reader, https://youtu.be/lWAsfZTUrJs?t=560 it might be possible to test screens for dithering using VNC (in theory, without buying expensive dasung). I will try to do such tests, but currently, I do not have eink on android.

                            Gleb Its not related to aging as much. Id still like tech solution but the vision therapy helped a lot too.
                            In switchresx, it seems millions of colors is actually a basic macos setting, and billions is something thats extra in that program. So switching to millions doesnt do anything different from the base macos setup - https://discussions.apple.com/thread/3614614
                            therefore wouldnt probably do anything with the dithering.

                            dev