microsoft / microsoft/terminal

Shader using Time causes high CPU usage and laggy input, after running hours.

Open
#20,226 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area-Rendering Issue-Bug Needs-Attention Product-Terminal
Dominant language
C++
Stars
105k
Forks
9.6k
Avg merge
3d 17h
Merged PRs (30d)
29

Description

### Windows Terminal version

1.24.10921.0

### Windows build number

_No response_

### Other Software

_No response_

### Steps to reproduce

1. download https://github.com/Hammster/windows-terminal-shaders
2. enable shaders with `Time` used, e.g., hueshift.hlsl, crt.hlsl(with GRAIN or REFRESHLINE on)
(how to enable shaders: https://github.com/microsoft/terminal/blob/main/samples/PixelShaders/README.md
3. run a new Windows Terminal window, ensure the shader is applied.
4. [BUG REPRODUCED!!!] keep this window running, after hours or one day, this windows consumes lots of CPU and input is very laggy
5. and then, while this window still running, disable the shader by deleting `pixelShaderPath` in the json config, bug is gone, CPU and input recovers

### Expected Behavior

regular cpu usage and smooth input

### Actual Behavior

huge cpu usage and laggy input

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the long-running issue with the shaders and configuration described in the report, starting with samples/PixelShaders/README.md and the pixelShaderPath setting. Trace the terminal's pixel-shader handling and compare CPU and input behavior before and after disabling the shader; done means sustained shader use no longer causes excessive CPU usage or laggy input.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-graphics, desktop, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.