alacritty icon indicating copy to clipboard operation
alacritty copied to clipboard

Cropped output on large monitor

Open sbihel opened this issue 5 years ago • 15 comments
trafficstars

Issue

On a large 4k monitor, if I open a program that takes the whole screen like Vim, Mutt, or Tmux, the bottom of the screen stays black (my background colour).

It doesn't seem to be related to #824 as key presses will not do a complete redraw and the number of lines displayed is consistent.

The interesting thing is, if I reduce the window vertically (i.e. reduce the number of lines) the same number of lines will be displayed, but if I reduce the window horizontally, more and more lines are displayed. If I increase the font size, more lines are displayed.

I did a test by filling the screen with y and it seems that the maximum number of ys displayed is 65536 (2^16).

So it makes me think that it went past the maximum number of characters (cells? glyphs?) to be displayed. I tried to look in the code to see if there was a type that wasn't big enough but to no avail. If you have any hint, I'm happy to invest more time.

Or maybe it is intended to be like this? It's too bad because I like to have Tmux in fullscreen, maybe a warning in the README or in the program would be nice.

Any way, thanks a lot for Alacritty! ❤️

System

OS: macOS Version: alacritty 0.4.2 (f68de37) and alacritty 0.5.0-dev (81ce935)

Logs

Font/Terminal size:

Device pixel ratio: 1
Cell Size: 5 x 11
Padding: 0 x 0
New num_cols is 768 and num_lines is 196
Width: 3840, Height: 2160
Font size changed to Size(18) with DPR of 1

sbihel avatar May 07 '20 08:05 sbihel

I did a test by filling the screen with y and it seems that the maximum number of ys displayed is 65536 (2^16).

I can use 3840x2160 grid on my monitor just fine (1 pixel per terminal cell). Which is way larger than what you're testing here. It'll be really strange that we have u16 limit somewhere, which can only be reached by you.

kchibisov avatar May 07 '20 12:05 kchibisov

Could you share a screenshot of your problem? It almost just sounds like you're describing the differences in padding at the top/bottom, which is normal.

chrisduerr avatar May 07 '20 22:05 chrisduerr

Screenshot 2020-05-08 at 09 34 16

For the window settings, I only set decorations: none but the issue also occurs without a config file.

sbihel avatar May 08 '20 08:05 sbihel

@sbihel Is Alacritty frozen? Can you select the text or the empty space below the text?

chrisduerr avatar May 08 '20 09:05 chrisduerr

It's not frozen no. I can select text, move the window, type, etc. Everything is working... it's just not showing the bottom.

sbihel avatar May 08 '20 09:05 sbihel

I feel like macOS just breaks at some point and no-ops on OpenGL calls, idk.

kchibisov avatar May 08 '20 09:05 kchibisov

Maybe a memory/VRAM issue? Though I cannot imagine that you have less than the ~20MB or something required to run Alacritty.

What happens when you have multiple terminals of that size open @sbihel? Does it get worse?

chrisduerr avatar May 09 '20 13:05 chrisduerr

Thanks for the help!

Having multiple windows/terminals doesn't have any effect. And I have 16GB of memory, which seems to be healthy in my experience.

I did a git bisect and it seems that 40237b213a847cb3fabaa4da0ef2f295e9bf56a9 introduced the bug. I had a look but couldn't identify the problematic change. I'll try to spend more time if no one beats me to it.

sbihel avatar May 10 '20 23:05 sbihel

Could you share additional system information like GPU and macOS version?

chrisduerr avatar May 11 '20 20:05 chrisduerr

MacBook Pro (13-inch, 2017, Two Thunderbolt 3 ports) OS: macOS Catalina 10.15.4 Processor: 2.5 GHz Dual-Core Intel Core i7 Memory: 16 GB 2133 MHz LPDDR3 Graphics: Intel Iris Plus Graphics 640 1536 MB

sbihel avatar May 11 '20 21:05 sbihel

I'll have to test this out on my macbook to see if it might be macOS specific.

Maybe @casperstorm also wants to give it a try?

chrisduerr avatar May 12 '20 01:05 chrisduerr

I can reproduce and this really looks like a driver bug.

chrisduerr avatar May 14 '20 10:05 chrisduerr

Apple deprecated the use of OpenGL in favour of Metal. Do you think it's related?

sbihel avatar May 31 '20 23:05 sbihel

No, there was no active removal of OpenGL functionality. They just marked the API as deprecated. Apple's support for OpenGL was never great though.

chrisduerr avatar May 31 '20 23:05 chrisduerr

Hi, just dropping by to say I'm currently facing the same on MacOS Sonoma 14.5

My spec

MacOS Sonoma 14.5 (23F79)
Processor: 2,3 GHz Quad-Core Intel Core i7
Graphics: Intel Iris Plus Graphics 1536 MB
Memory: 32 GB 3733 MHz LPDDR4X

running Alacritty version 0.13.2

This happens only on my large display however LG HDR 4K

Graphics/Displays:

    Intel Iris Plus Graphics:

      Chipset Model: Intel Iris Plus Graphics
      Type: GPU
      Bus: Built-In
      VRAM (Dynamic, Max): 1536 MB
      Vendor: Intel
      Device ID: 0x8a53
      Revision ID: 0x0007
      Metal Support: Metal 3
      Displays:
        Color LCD:
          Display Type: Built-In Retina LCD
          Resolution: 2560 x 1600 Retina
          Framebuffer Depth: 30-Bit Color (ARGB2101010)
          Mirror: Off
          Online: Yes
          Automatically Adjust Brightness: Yes
          Connection Type: Internal
        LG HDR 4K:
          Resolution: 3840 x 2160 (2160p/4K UHD 1 - Ultra High Definition)
          UI Looks like: 3840 x 2160 @ 60.00Hz
          Framebuffer Depth: 30-Bit Color (ARGB2101010)
          Display Serial Number: XXXXXXXXXX
          Main Display: Yes
          Mirror: Off
          Online: Yes
          Rotation: Supported
          Connection Type: Thunderbolt/DisplayPort

dminca avatar Jun 28 '24 19:06 dminca