What It Is and Why It’s Useful


Summary

  • GPU-accelerated terminals offer smoother scrolling and higher refresh rates than traditional terminals.
  • Using the GPU can improve overall performance by displaying text faster, which speeds up command completion.
  • Even using integrated graphics, GPU-powered terminals offload work from the CPU, allowing for more graphical effects without sacrificing speed.

A Linux terminal does a few things, but mainly, it shows line after line of text. While that isn’t exactly the first thing you’d think would make great use of your GPU, these terminals can harness that power in some interesting ways.

What Makes a GPU-Accelerated Terminal Different?

You might expect that a GPU-accelerated terminal would feature flashy animations and sleek effects. While this is certainly possible, these sorts of effects would be easy enough to add without relying on the GPU.

There are flashier terminals out there, like the GhosTTY terminal, with its flashy built-in tabs, but these tend to be the exception, not the rule. In many cases, a GPU-accelerated terminal doesn’t look much different from a “standard” terminal. It may feel slightly different, thanks to factors we’ll explore later on in the article, but you can expect your shell to look more or less the same as it would in any other terminal.

Viewing all tabs opened in Ghostty.

On the other hand, while adding the GPU to the equation certainly has plenty of upsides, it’s not without its downsides. For example, you may notice a slight lag in startup time on dual-GPU systems like laptops that you simply wouldn’t encounter with a more traditional terminal. This isn’t especially common, but it can happen, as explained in the Kitty terminal FAQ.

Of course, a GPU-accelerated terminal also requires a GPU to work in the first place. In most cases, even integrated graphics will offer enough horsepower to easily handle this workload, but if you’re running on an old laptop, you may want to stick to your desktop’s default terminal app.

We tend to think of frame rates for games and other visually intensive software. With text, until recently, smooth motion wasn’t sitting at the top of the list of priorities. Considering how often terminals sit idle, this was especially true for terminal apps.

Because of this, many traditional terminal apps don’t even scroll at the refresh rate of the screen. Some older terminal apps default to 30 frames per second, even if the monitor is capable of a higher refresh rate. This is often configurable, but still, it’s an odd default.

GPU-accelerated terminals update with the screen in most cases, and nearly always update more smoothly. This means that scrolling back through your command history feels smoother.

While this can certainly help to enhance your overall terminal experience, so far, we haven’t seen anything GPU-accelerated terminals have to offer in terms of raw speed. For that, we’ll need to take a closer look at what happens when you run a command with a lot of output.

Related


15 Useless Linux Commands Everyone Needs to Know

Any real Linux pro should know these 15 useless commands!

Faster Performance Overall

Two things happen in a terminal when you run a command: the command you typed runs, and the output displays in the terminal. These typically happen in quick succession, to the point that we consider them to be effectively instantaneous, but they are two distinct actions happening either in series or parallel.

This is another area where GPU-accelerated terminals can save you a bit of time. For commands that generate a lot of output (think any command with the -v or --verbose flags), your terminal’s rate of output can be a bottleneck for the command. This is because the command won’t appear to complete until it’s done printing its output.

GPU-accelerated terminals, mainly for reasons we’ve already considered, can display this text much faster than traditional software terminals. The faster the output is done printing, the faster the command completes.

You can test this by simply running the find command on your root directory, as follows:

        find /
Screenshot of Alacritty and Konsole print the output of the find command.

Running this command in Alacritty versus the (typically fairly performant) KDE Konsole, the command completed for me in Alacritty noticeably faster, even if I ran it after the command in Konsole. Typically, you’re only looking at saving a second or two. While this is certainly nice, the performance boost due to faster terminal output is rarely the reason people switch to a GPU-accelerated terminal.

GPU Terminals Offload Work From the CPU

Finally, any demand that a GPU-accelerated terminal is making on the GPU means it isn’t making that demand on the CPU. This difference may be tiny in many cases, but if you’re compiling a large package, for example, you may want to give as much CPU time to that process as possible.

Of course, there are also two sides to this. For more graphically intensive terminal apps with flashy cursor effects or CRT-style blur around the text, this would use more CPU in a traditional terminal. Relying on the GPU, even with integrated graphics, frees these terminals up to have a little more fun in the presentation department, without making you sacrifice speed to pay for it.

GPU-Powered Terminal Apps to Try

Now that you’re aware of some of the advantages of GPU-accelerated terminals, how do find them in a sea of Linux terminal emulators? There are plenty of popular options, including GhostTTY, which we’ve already mentioned.

Screenshot of selecting a theme for the Kitty terminal.

Kitty is a feature-rich option, with built-in tab and window support, support for graphics and font ligatures, and threaded rendering for minimal latency. The terminal is highly configurable, though the configuration file—written in Python—may be daunting for some. Fortunately, if you’re only looking to change the theme, you can easily do this with the included kitten themes command.

Another popular option is Alacritty, which focuses less on features and more on pure speed. Out of the box, the terminal is fast and lean, but you can configure it to be more feature-rich, at least, to an extent. For example, you won’t find tabs or splits, nor are there plans to add them.

If you try any of these, or another GPU-accelerated terminal, and find that you’ve met your new favorite terminal app, it’s easy to change your default terminal. Our guide to changing the default terminal on Ubuntu should point you in the right direction on several distros.

Related


This Linux Terminal Tool Supercharges the history Command

Total recall.



Source link

Previous articleSenator Lummis Proposes U.S. Sell Gold to Buy 200,000 Bitcoin Annually for Five Years, Totaling 1 Million Bitcoin – "The Defiant" – The Defiant – DeFi News
Next articleGoogle Is Picking a Fight With Steam That It Can’t Win