zed icon indicating copy to clipboard operation
zed copied to clipboard

Incorrect text display in the editor (nvidia 650M, 750M)

Open sfclub opened this issue 1 year ago • 29 comments

Check for existing issues

  • [X] Completed

Describe the bug / provide steps to reproduce it

In Zed 0.119.20(7773c7d1ca36b595e2e385a5678b8b69c6a0c3d6)(intel mac) Incorrect text display in the editor. For details, see the attached video: [

https://github.com/zed-industries/zed/assets/7209477/45bee645-5dca-47d7-9ddb-266c08e1f940

](url)

Environment

MacOs Big Sur 11.7.10, MacBook Pro Retina, 15-inch, late 2013) Cpu intel I7 4 core, Memory 16Gb, Gpu Intel Iris Pro 1536Mb

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

If you only need the most recent lines, you can run the zed: open log command palette action to see the last 1000.

No response

sfclub avatar Jan 27 '24 11:01 sfclub

Hi, thanks for reporting this issue. Does this reproduce for you reliably on some particular file/project? If so, could you share that? It would also be great to see if there's anything in your logs.

osiewicz avatar Jan 27 '24 12:01 osiewicz

Hi, yes, the problem is constant, because of this I can't use your wonderful editor on my laptop. How do I upload logs? Nothing changes on the latest versions.

sfclub avatar Feb 03 '24 14:02 sfclub

Zed.log

sfclub avatar Feb 03 '24 14:02 sfclub

https://github.com/zed-industries/zed/assets/7209477/d6081fc0-bf49-49a0-b34d-06ab208824c1

sfclub avatar Feb 03 '24 14:02 sfclub

I really want to use your great editor, but it doesn't work because of this bug:( What can be done to speed up the solution of this problem?

sfclub avatar Feb 12 '24 19:02 sfclub

I really want to use your great editor, but it doesn't work because of this bug:( What can be done to speed up the solution of this problem?

+1 :( I'm also facing the same issue on MacBook Pro (Mid 2012). My specs: Processor: 2.7 GHz Quad-Core Intel Core i7 Memory: 16 GB 1600 MHz DDR3 Graphics: NVIDIA GeForce GT 650M 1 GB + Intel HD Graphics 4000 1536 MB

Akshat-Jain avatar Feb 14 '24 03:02 Akshat-Jain

Came here to log I have the same issue - thinking the recent updates would have fixed the issue.

Specs are: MacOS 10.15.7 MacBook Pro (Retina, 15-inch, Early 2013) Processor: 2.7 GHz Quad-Core Intel Core i7 Memory: 16 GB 1600 MHz DDR3 Graphics: NVIDIA GeForce GT 650M 1 GB, Intel HD Graphics 4000 1536 MB

jlabs avatar Feb 14 '24 20:02 jlabs

This is probably the same as #5062.

CurbaiCode avatar Feb 16 '24 19:02 CurbaiCode

I'm suffering with the same bug

lhps avatar Feb 21 '24 21:02 lhps

Same issue, old mac

bennjjii avatar Feb 28 '24 08:02 bennjjii

It seems to me that this does not apply to old macs, but to nvidia graphics cards. But since nvidia is only available in older mac models, this is why this problem pops up on older macs.

sfclub avatar Mar 09 '24 19:03 sfclub

Please fix it asap, I am looking forward to use Zed without this problem, because it is really annoying.

lhps avatar Mar 13 '24 12:03 lhps

Same issue for me. Late '13 MacBook Pro, OS: Big Sur (11.7.10), and yes it has a dedicated nvidia graphics card too.

I don't know if this is relevant, but IntelliJ IDEA also produces some similar glitches (not in the editor but on buttons and popups)

sassrobi avatar Mar 17 '24 13:03 sassrobi

I don't know if this is relevant, but IntelliJ IDEA also produces some similar glitches (not in the editor but on buttons and popups)

Yeah, that's relevant; thanks for sharing =)

I wonder, do these glitches occur when you're only battery/connected? I wonder if power management could be at play anyhow.

osiewicz avatar Mar 17 '24 18:03 osiewicz

Yes, I have rendering issues on battery and connected too. I have double-checked that the discrete GPU wasn't enabled. Even if I enforce to use the discrete GPU, or if I enforce to use the integrated GPU the result is the same.

sassrobi avatar Mar 22 '24 07:03 sassrobi

I have created a video of the glitch. It's strange but now I have rendering issue in the sidebar and in the editor area only if I open the yaml file shown on the video. If I open a Rust file, there is no glitch neither in the editor nor in the sidebar!

As far as I remember last time (when I wrote my first comment) the Rust files was bad too. Perhaps something has changed, because I have installed the newest release of Zed (0.127.3) before testing.

https://github.com/zed-industries/zed/assets/3763226/ea7a42bc-cb97-4c8a-b0e2-bc9da463f15a

sassrobi avatar Mar 22 '24 08:03 sassrobi

Update:

  • There are some rendering issues in .rs files too, but much fewer
  • There are constant, reproducible glitches in .yml and Cargo.lock files
  • Even in .rs files, if i put a - or _ character in the filename, the glitches become more frequent
  • There is no "end of the file is hidden" issue anymore that can be seen in the video of the original issue (but it was with the previous version)

sassrobi avatar Mar 22 '24 08:03 sassrobi

it seems to me that the behavior has changed because of the bug fix https://github.com/zed-industries/zed/issues/8341

sfclub avatar Mar 22 '24 13:03 sfclub

Update:

  • There are some rendering issues in .rs files too, but much fewer
  • There are constant, reproducible glitches in .yml and Cargo.lock files
  • Even in .rs files, if i put a - or _ character in the filename, the glitches become more frequent
  • There is no "end of the file is hidden" issue anymore that can be seen in the video of the original issue (but it was with the previous version)

it does not depend on the type of files at all, the bug happens on different types of files. Depends on the nvidia card on board the computer

sfclub avatar Mar 22 '24 13:03 sfclub

Same problems here on macOS Big Sur 11.7.10.

MacBook Pro (Retina, 15-inch, Mid 2014) Processor: 2.5 GHz Quad-Core Intel Core i7 Graphics: Intel Iris Pro 1536 MB

WayneBechstein avatar Jun 03 '24 09:06 WayneBechstein

Here is a list of the machine types which seem to be impacted:

  • NVIDIA GeForce GT 650M 1 GB + Intel HD Graphics 4000 1536 MB - MacBook Pro (Retina, 15-inch Mid 2012)
  • NVIDIA GeForce GT 650M 1 GB + Intel HD Graphics 4000 1536 MB - MacBook Pro (Retina, 15-inch, Early 2013)
  • NVIDIA GeForce GT 750M 2 GB + Intel Iris Pro 5200 1536 MB - MacBook Pro (Retina, 15-inch, Mid 2014)
  • NVIDIA GeForce GT 750M 2 GB + Intel Iris Pro 5200 1536 MB - MacBook Pro (Retina, 15-inch, Late 2013)
  • NVIDIA GeForce GT 720M - Hackintosh I think
  • NVIDIA GeForce GT 750M 1 GB - iMac (21.5-inch, Late 2013)

I know these are old machines (all 10+ years old) but maybe we (Zed) should see if we can get our hands on one and see if we can reproduce the issue.

notpeter avatar Jun 20 '24 20:06 notpeter

I'm wondering whether this issue is being caused by the Nvidia card, the Intel card or by the dynamics switching between them. There is a third part tool gfxCardStatus which allows explicitly controlling this switching.

Could someone with an affected mac try that tool and report whether the graphics glitches occur in any/all of the following modes:

  • Dynamic Switching (normal MacOS auto switch)
  • Integrated Only (disables nvidia, more battery friendly)
  • Discrete Only (forces nvidia, less battery friendly)

notpeter avatar Jun 21 '24 14:06 notpeter

Here is a list of the machine types which seem to be impacted:

As far as I know, iMacs don't use graphics switching, and I'm having the same problem with my setup:

  • NVIDIA GeForce GT 750M 1 GB - iMac (21.5-inch, Late 2013)

Labrium avatar Jun 22 '24 23:06 Labrium

@Labrium Interesting. This definitely points the finger at the Nvidia side of things but the 650M/750M were designed to be operated in a switching graphics setup.

Looking at MacTracker and Intel Ark the 21.5inch Late 2013 shipped with three different processors:

  • Core i5 4570S (2.7/3.2) - Intel Iris Pro 5200 (no nvidia)
  • Core i5 4570R (2.9/3.6) - Intel® HD Graphics 4600 + nvidia 750m
  • Core i7 4770S (3.1/3.9) - Intel® HD Graphics 4600 + nvidia 750m

Apple specs never mention the 4600 for that iMac, but I'm pretty sure it was still on-CPU. MacOS definitely shipped Intel HD Graphics 4600 compatible drivers (see: hackintosh forums), but maybe the driver/system preferences hid this switching option except on Macbooks with the better Iris Pro 5200 (instead of your HD 4600).

I dug a little deeper and there are some discussions that Metal2 didn't perform well on the Nvidia 750M and that in many cases the Iris 5200 was faster. Hopefully someone with that configuration can try switching integrated graphics only (disabling the nvidia) and see if that helps.

Anyways, thanks for sharing an additional data point. Very much appreciate it.

notpeter avatar Jun 23 '24 01:06 notpeter

A change went out in Zed Preview today (0.143.x) to force use of lower power Intel graphics over the discrete card when both are available. Only tested on newer Macbooks, but would love for someone to test this on their older Macbook to see if this fixes the visual bugs.

  • https://github.com/zed-industries/zed/issues/5124

notpeter avatar Jul 03 '24 18:07 notpeter

@notpeter Hi! Thanks for the update! I tested it on my older Macbook Pro (specs posted in an earlier comment).

Zed Version: Zed Preview 0.143.2

The above version fixes the rendering issues for me, but it seems to have introduced significant latency when typing or scrolling. There's a noticeable delay in these actions, which wasn't happening before.

Appreciate your inputs on this. Please let me know if there's anything I can help with to enable you to take it further. Thanks!

Akshat-Jain avatar Jul 07 '24 18:07 Akshat-Jain

@Akshat-Jain Glad to hear it's no longer rendering gibberish and sorry to hear about the latency. There is some linux-related work which may improve performance on older hardware that cannot sustain high-frame rates (like a 10yr old macbook), can't promise anything but I'll let you know if that work gets merged.

notpeter avatar Jul 08 '24 18:07 notpeter

same issue on latest release. so sad. hope fix as soon as possibile

iBongiornor avatar Jul 11 '24 10:07 iBongiornor