Live data from Hacker News

"Fix" MacBook Neo Cursor Lag: Record 1 Pixel of the Screen Every 10 Seconds

gist.github.com

71–80 of 115 posts

Re: "Fix" MacBook Neo Cursor Lag: Record 1 Pixel of the Screen Every 10 Seconds

#72
post #70

Before reading the background info, I was going to recommend a much simpler fix, but they actually already mention it in there: "Also the mouse cursor size can be changed." This was going to be my suggestion because it also fixed a similar CPU/GPU related issue many years ago: Apple's own TV.app would have minuscule color handling differences whenever subtitles would show during a movie. This was driving me nuts whil…

Do you have links to what you found? That solution sounds plausible in this case.

Re: "Fix" MacBook Neo Cursor Lag: Record 1 Pixel of the Screen Every 10 Seconds

#73
post #70

Before reading the background info, I was going to recommend a much simpler fix, but they actually already mention it in there: "Also the mouse cursor size can be changed." This was going to be my suggestion because it also fixed a similar CPU/GPU related issue many years ago: Apple's own TV.app would have minuscule color handling differences whenever subtitles would show during a movie. This was driving me nuts whil…

Yes, however, a small change of the cursor size doesn't work for me for the Neo lag (idk about the TV app). I have to set it to a size that is significantly bigger, to trigger the fix. (edit: Added that side note to the gist)

Re: "Fix" MacBook Neo Cursor Lag: Record 1 Pixel of the Screen Every 10 Seconds

#74
post #70

Before reading the background info, I was going to recommend a much simpler fix, but they actually already mention it in there: "Also the mouse cursor size can be changed." This was going to be my suggestion because it also fixed a similar CPU/GPU related issue many years ago: Apple's own TV.app would have minuscule color handling differences whenever subtitles would show during a movie. This was driving me nuts whil…

Do you have links to what you found? That solution sounds plausible in this case.

Not sure if this is the exact same one, but here's one thread I found: https://discussions.apple.com/thread/6026454?answerId=327318...

The cursor size adjustment is mentioned further down on the page.

Re: "Fix" MacBook Neo Cursor Lag: Record 1 Pixel of the Screen Every 10 Seconds

#75
post #70

Before reading the background info, I was going to recommend a much simpler fix, but they actually already mention it in there: "Also the mouse cursor size can be changed." This was going to be my suggestion because it also fixed a similar CPU/GPU related issue many years ago: Apple's own TV.app would have minuscule color handling differences whenever subtitles would show during a movie. This was driving me nuts whil…

Yes, however, a small change of the cursor size doesn't work for me for the Neo lag (idk about the TV app). I have to set it to a size that is significantly bigger, to trigger the fix. (edit: Added that side note to the gist)

Odd, I wonder if it has to do with modern macOS resolution scaling (how there basically is no "native physical resolution" setting anymore). i.e. maybe up to a certain point it's also simply scaling the hardware-rendered cursor, if that's even possible?

Re: "Fix" MacBook Neo Cursor Lag: Record 1 Pixel of the Screen Every 10 Seconds

#76
post #60

Earlier quoted context omitted.

Alan Dye would disagree. https://daringfireball.net/2025/12/bad_dye_job

I think you forgot the /s Anyway, interesting story. I didn't know what a key window is. I googled. It's the active window.

It's an old NeXTism!

Re: "Fix" MacBook Neo Cursor Lag: Record 1 Pixel of the Screen Every 10 Seconds

#78
post #8

I’m not sure what the bug is, but this is a terrible fix. What this is doing is forcing the WindowServer to composite the cursor rather than treat it as a hardware overlay. I suppose the issue must be pretty bad for OP if this helps, but … ugh.

Reminds me of a fix I wrote a decade ago. My Laptop would sometimes start emitting a high frequency whine when on battery. I figured out it only happened when the CPU went into performance states lower than P2 for power saving. So I wrote a bash script that auto-started on battery mode and then calculated a hash every few seconds. Boom, whine solved. Terrible fix, but I never measured how much battery it cost me, so…

That reminds me a lot of this xkcd comic where a user depends on an application overheating when the space-bar is pressed.

https://xkcd.com/1172

Re: "Fix" MacBook Neo Cursor Lag: Record 1 Pixel of the Screen Every 10 Seconds

#79

Earlier quoted context omitted.

guard is an inverted if statement, with the additional requirement that the branch must exit the parent scope. It's useful sometimes for readability, particularly for avoiding the "pyramid of doom" when you have a lot of preconditions that need to be checked: if fooOK if barOK { if bazOK { // do something } } } can be written as: guard fooOK else { return } guard barOK else { return } guard bazOK else { return } // d…

Already in 1963, the language CPL introduced "unless ... do ...", besides the "if ... do ..." inherited from ALGOL 60. Perl has just followed the example of CPL and BCPL, decades later. Using "if" or "unless", whichever is more appropriate, is far more readable than "guard". Moreover, there are many languages where an assignment or an initialization can appear in any place where an expression can appear. Such general…

> Using "if" or "unless", whichever is more appropriate, is far more readable than "guard".

How is a different (and longer) keyword "far more readable"? That's just a matter of preference and familiarity. The reason for choosing a different keyword is that it's not quite equivalent to an unless as the {} block must exit the surrounding scope. You read it like an assert statement with a custom handler.

> Moreover, there are many languages where an assignment or an initialization can appear in any place where an expression can appear. Such general rules are always better than special rules like allowing new bindings in a "guard", but not in an "if".

You can introduce bindings in an if too. The special thing about guard is that you can introduce a binding which is valid for the remainder of the scope outside the {} block (where the condition is true) but not inside (where the condition is false).

Re: "Fix" MacBook Neo Cursor Lag: Record 1 Pixel of the Screen Every 10 Seconds

#80
post #29

Embedded Swift in a script. That seems like a useful concept for small scripts on macOS. I will definitely steal this idea.

Swift also has an interpreted mode, you can just

  #!/usr/bin/evn swift
  import Foundation
  print("Hello, world")
and chmod +x hello.swift and execute it.

Instead of doing swift in bash and calling swiftc, you can always shell out to Process() from inside a Swift script instead.

Post reply on HN