zed icon indicating copy to clipboard operation
zed copied to clipboard

Moving cursor in an active window significantly increases GPU usage

Open RomanPro100 opened this issue 8 months ago • 1 comments

Summary

When you move a cursor in an active Zed window, the GPU consumes more power.

Description

I noticed that when I use Zed on my laptop, the battery discharges faster. I suspected it was the editor that drained my battery and it was true. I checked and the problem is not with the settings I set — the issue still remains with defaut Zed settings. And it doesn't matter what speed I move the cursor with — the increase is the same.

Steps to reproduce:

  1. Open any GPU monitoring app/tool/program
  2. Open any project/file in Zed (or just open Zed with no project/file)
  3. Make the window active by clicking in it
  4. Move the cursor inside the window and look at the GPU monitor

Expected Behavior: (almost) no increase in GPU usage Actual Behavior: GPU uses 2-3 times more power than with the cursor standing still.

https://github.com/user-attachments/assets/e94d4db6-ee7a-4b9b-bf09-b93ff5a6f685

Zed Version and System Specs

Zed: v0.182.11 (Zed) OS: Linux X11 linuxmint 22.1 Memory: 15 GiB Architecture: x86_64 GPU: AMD Radeon Graphics (RADV RENOIR) || radv || Mesa 24.2.8-1ubuntu1~24.04.1

RomanPro100 avatar Apr 18 '25 21:04 RomanPro100

I have the same problem, but my GPU spike is much higher , bringing my GPU usage to 64% vs 4% standing still

Zed Version and System Specs

Zed: v0.182.11 (Zed) OS: macOS 15.4.1 Memory: 16 GiB Architecture: aarch64 Device: Macbook Pro 21 M1

kylelau519 avatar May 01 '25 18:05 kylelau519

Same on macOS

https://github.com/user-attachments/assets/9f7b66dd-c799-4953-83ca-ae4e0b5959c0

v57 avatar May 20 '25 15:05 v57

Seems to be a duplicate of https://github.com/zed-industries/zed/issues/32210 which was fixed in https://github.com/zed-industries/zed/pull/32408

Can you recheck Zed's latest versions and see if the issue is reproducible still?

SomeoneToIgnore avatar Jun 17 '25 15:06 SomeoneToIgnore

Seems to be a duplicate of #32210 which was fixed in #32408

Can you recheck Zed's latest versions and see if the issue is reproducible still?

It definitely got some improvement. The spike still exist but keep goes down and goes up while I keep moving the mouse, the peak is sitting around the same. So overall I'd say it is an improvement.

kylelau519 avatar Jun 17 '25 20:06 kylelau519

Had to install the preview version to check. And no, the increase is still there.

RomanPro100 avatar Jun 21 '25 17:06 RomanPro100

On 0.192.6 on running MacOS 15.5 (Sequoia) on an MacBook Pro M4.

I'm still seeing the GPU jump to about 30% and hold there if I move the mouse cursor over a zed window when zed is the foreground app.

If the window is just sitting there with the cursor flashing the GPU is at 0-2%. If I hold the down arrow key and move the cursor through the file, the GPU bumps to about the same level (approx 27%).

The mouse behavior is better than before (when I was seeing close to 50%), but it's still high enough that zed isn't really usable on battery.

stevenchanin avatar Jun 26 '25 22:06 stevenchanin

$ zed --version
Zed 0.192.8 – /Applications/Zed.app

On the M1 Pro Apple Silicon, GPU usage soared from 4% at rest to 78% when the mouse was moving in full-screen (non-full-screen mode).

x1a2h1 avatar Jul 01 '25 10:07 x1a2h1

Same issue here. GPU spikes and fans ramp up when moving the mouse in a Zed window.

Zed version: Zed 0.197.3 MacOS version: 15.5 CPU: 2,6 GHz 6-Core Intel Core i7 GPU: AMD Radeon Pro 5300M 4 GB + Intel UHD Graphics 630 1536 MB RAM: 16 GB 2667 MHz DDR4

edit: added screenshot for example. Peak is when mouse is moved.

Image

RobinVooijs avatar Jul 31 '25 11:07 RobinVooijs

Same issue for me on main (Zed 0.200.0). GPU usage in an active window spikes to about 80% for pretty much any action.

AMD Radeon 7800 XT, KDE (Wayland), NixOS.

mascully avatar Aug 12 '25 14:08 mascully

Same issue here. I'm using Zed 0.199.10.

# System Details Report
---

## Report details
- **Date generated:**                              2025-08-20 11:37:06

## Hardware Information:
- **Hardware Model:**                              HP Victus by HP Gaming Laptop 16-r1xxx
- **Memory:**                                      32.0 GiB
- **Processor:**                                   Intel® Core™ i7-14650HX × 24
- **Graphics:**                                    Intel® Graphics (RPL-S)
- **Graphics 1:**                                  NVIDIA GeForce RTX™ 4060 Laptop GPU
- **Disk Capacity:**                               1.0 TB

## Software Information:
- **Firmware Version:**                            F.03
- **OS Name:**                                     Ubuntu 25.04
- **OS Build:**                                    (null)
- **OS Type:**                                     64-bit
- **GNOME Version:**                               48
- **Windowing System:**                            Wayland
- **Kernel Version:**                              Linux 6.14.0-28-generic

marianobianchi avatar Aug 20 '25 14:08 marianobianchi

Hi there! 👋 We're working to clean up our issue tracker by closing older bugs that might not be relevant anymore. If you are able to reproduce this issue in the latest version of Zed, please let us know by commenting on this issue, and it will be kept open. If you can't reproduce it, feel free to close the issue yourself. Otherwise, it will close automatically in 14 days. Thanks for your help!

github-actions[bot] avatar Nov 19 '25 11:11 github-actions[bot]

This is still happening. Just having Zed up and sitting there (not doing anything but blinking the cursor), the GPU % sits at about 8%. If I move the cursor over the Zed window (no clicking), the GPU jumps to about 50%. The "Energy Impact" in Activity Monitor on Mac also jumps way up (e.g. 0.5 when Zed is in the background -> 120 when I'm moving the cursor).

stevenchanin avatar Nov 19 '25 19:11 stevenchanin