Retro Terminal Effect really slow in VM #6000

Closed
opened 2026-01-31 00:27:29 +00:00 by claunia · 9 comments
Owner

Originally created by @htmsousa on GitHub (Jan 16, 2020).

Environment

Windows build number: [Version 10.0.19041.21]
Windows Terminal version (if applicable): 0.8.10091.0

Any other software? Running Windows Insider Preview Build within a virtual machine (4 cores at 4.20GHz, 16Gb RAM) on Hyper-V

Steps to reproduce

Activate flag "experimental.retroTerminalEffect":true

Expected behavior

Retro Terminal Effect is applied

Actual behavior

Retro Terminal Effect is indeed applied, but any terminal (powershell, debian, etc) with that flag activated becomes really slow (even just typing). Looking at task manager while typing some command, the CPU goes to near 100% usage on all 4 cores.
Setting the flag to false makes everything to work as usual.
Could it be caused by the fact it is running within a virtual machine? Or maybe because Hyper-V doesn't allow to use Physical GPU in the VM and it has to rely on CPU only to do the rendering?
The main system has the latest Windows Release Build, not the Insider Preview Build and I can't test the terminal outside the VM.

Originally created by @htmsousa on GitHub (Jan 16, 2020). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ```none Windows build number: [Version 10.0.19041.21] Windows Terminal version (if applicable): 0.8.10091.0 Any other software? Running Windows Insider Preview Build within a virtual machine (4 cores at 4.20GHz, 16Gb RAM) on Hyper-V ``` # Steps to reproduce Activate flag ```"experimental.retroTerminalEffect":true``` # Expected behavior Retro Terminal Effect is applied # Actual behavior Retro Terminal Effect is indeed applied, but any terminal (powershell, debian, etc) with that flag activated becomes really slow (even just typing). Looking at task manager while typing some command, the CPU goes to near 100% usage on all 4 cores. Setting the flag to ```false``` makes everything to work as usual. Could it be caused by the fact it is running within a virtual machine? Or maybe because Hyper-V doesn't allow to use Physical GPU in the VM and it has to rely on CPU only to do the rendering? The main system has the latest Windows Release Build, not the Insider Preview Build and I can't test the terminal outside the VM.
claunia added the Needs-TriageNeeds-Tag-Fix labels 2026-01-31 00:27:29 +00:00
Author
Owner

@DHowett-MSFT commented on GitHub (Jan 17, 2020):

If you're running on CPU rendering, this is expected. I don't know if that's the case for a VM.

The main system has the latest Windows Release Build, not the Insider Preview Build and I can't test the terminal outside the VM.

The latest windows release build is 1903 or 1909, which does support Terminal.

@DHowett-MSFT commented on GitHub (Jan 17, 2020): If you're running on CPU rendering, this is expected. I don't know if that's the case for a VM. > The main system has the latest Windows Release Build, not the Insider Preview Build and I can't test the terminal outside the VM. The latest windows release build is 1903 or 1909, which _does_ support Terminal.
Author
Owner

@htmsousa commented on GitHub (Jan 17, 2020):

The latest windows release build is 1903 or 1909, which does support Terminal.

My bad.. didn't realise it was already supported by latest release. I tested in the main SO which has the GPU available and terminal windows are not slow when the retro terminal effect is active.

If you're running on CPU rendering, this is expected. I don't know if that's the case for a VM.

Fair point. Maybe there should be a note somewhere saying that if GPU is not available (which is very unlikely, apart usage within VMs), this is pretty much "useless".

@htmsousa commented on GitHub (Jan 17, 2020): > The latest windows release build is 1903 or 1909, which does support Terminal. My bad.. didn't realise it was already supported by latest release. I tested in the main SO which has the GPU available and terminal windows are not slow when the retro terminal effect is active. > If you're running on CPU rendering, this is expected. I don't know if that's the case for a VM. Fair point. Maybe there should be a note somewhere saying that if GPU is not available (which is very unlikely, apart usage within VMs), this is pretty much "useless".
Author
Owner

@jantari commented on GitHub (Jan 26, 2020):

I don't think a note is needed.

Graphics effects of all kinds are usually very slow when done by CPU software rendering, this has been true and universally known for decades. It doesn't have anything to do with Windows Terminal really, and the effect isn't enabled by default either. You can also pass a GPU through to the VM to mitigate this problem.

@jantari commented on GitHub (Jan 26, 2020): I don't think a note is needed. Graphics effects of all kinds are usually very slow when done by CPU software rendering, this has been true and universally known for decades. It doesn't have anything to do with Windows Terminal really, and the effect isn't enabled by default either. You can also pass a GPU through to the VM to mitigate this problem.
Author
Owner

@wartoz commented on GitHub (Dec 19, 2020):

this option eats a lot of GPU resources 😥

@wartoz commented on GitHub (Dec 19, 2020): this option eats a lot of GPU resources 😥
Author
Owner

@teaalltr commented on GitHub (Mar 1, 2021):

Still present in Terminal version 1.5.10411.0

@teaalltr commented on GitHub (Mar 1, 2021): Still present in Terminal version 1.5.10411.0
Author
Owner

@zadjii-msft commented on GitHub (Mar 1, 2021):

@Piruzzolo Yep. As noted above:

Graphics effects of all kinds are usually very slow when done by CPU software rendering, this has been true and universally known for decades. It doesn't have anything to do with Windows Terminal really, and the effect isn't enabled by default either. You can also pass a GPU through to the VM to mitigate this problem.

@zadjii-msft commented on GitHub (Mar 1, 2021): @Piruzzolo Yep. As noted above: > Graphics effects of all kinds are usually very slow when done by CPU software rendering, this has been true and universally known for decades. It doesn't have anything to do with Windows Terminal really, and the effect isn't enabled by default either. You can also pass a GPU through to the VM to mitigate this problem.
Author
Owner

@teaalltr commented on GitHub (Mar 1, 2021):

@Piruzzolo Yep. As noted above:

Graphics effects of all kinds are usually very slow when done by CPU software rendering, this has been true and universally known for decades. It doesn't have anything to do with Windows Terminal really, and the effect isn't enabled by default either. You can also pass a GPU through to the VM to mitigate this problem.

Yep, I'm now in GPU rendering and it's slow too. I think this shader is the problem. It may be simplified/optimized in some way

@teaalltr commented on GitHub (Mar 1, 2021): > @Piruzzolo Yep. As noted above: > > > Graphics effects of all kinds are usually very slow when done by CPU software rendering, this has been true and universally known for decades. It doesn't have anything to do with Windows Terminal really, and the effect isn't enabled by default either. You can also pass a GPU through to the VM to mitigate this problem. Yep, I'm now in GPU rendering and it's slow too. I think [this shader](https://github.com/microsoft/terminal/blob/7c42ed4cc3d76a60b9182897fe3e12ac90f2040e/samples/PixelShaders/Retro.hlsl) is the problem. It may be simplified/optimized in some way
Author
Owner

@zadjii-msft commented on GitHub (Mar 1, 2021):

Yep, that is the shader responsible for retro effects. We'd be happy to review any PRs to help optimize the effect if you can find something 😄

Note that the biggest cause of slowdown while using shaders is the fact that we can't use differential drawing while shaders are enabled. Differential drawing lets us only update the parts of the screen that have changed from one frame to the next, and is a massive perf improvement for the Terminal. #7147 is the closest thing we have to tracking "re-enable differential drawing when pixel shaders are enabled".

@zadjii-msft commented on GitHub (Mar 1, 2021): Yep, that is _the_ shader responsible for retro effects. We'd be happy to review any PRs to help optimize the effect if you can find something 😄 Note that the biggest cause of slowdown while using shaders is the fact that we can't use differential drawing while shaders are enabled. Differential drawing lets us only update the parts of the screen that have changed from one frame to the next, and is a _massive_ perf improvement for the Terminal. #7147 is the closest thing we have to tracking "re-enable differential drawing when pixel shaders are enabled".
Author
Owner

@teaalltr commented on GitHub (Mar 1, 2021):

Maybe it would be easier of we don't use shaders for this effect and use a CRT-like font and a proper background, instead. This retro effect is so common that It would make sense to someway hardcode it. Or maybe precompute the visual rendering per-character and show the bitmap as the user types.

@teaalltr commented on GitHub (Mar 1, 2021): Maybe it would be easier of we don't use shaders for this effect and use a CRT-like font and a proper background, instead. This retro effect is so common that It would make sense to someway hardcode it. Or maybe precompute the visual rendering per-character and show the bitmap as the user types.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#6000