kitty icon indicating copy to clipboard operation
kitty copied to clipboard

Mac Ventura - external monitor - Kitty not showing properly if kitty launch on monitor connected via display-port.

Open anieruddha opened this issue 2 years ago • 5 comments

Describe the bug Mac I have 3 monitors connected to my laptop using docking station. 1 laptop connected on HDMI & other 2 on DP port. If I launch kitty on monitor connected on HDMI, it works fine. But if I launch kitty on monitor connected on DP port, it just goes blank.

This issue is specific to Mac Ventura. It started after I update mac to latest ventura. It was working on mac before update. My other programs, IDE, iTerm2 working as expected.

To Reproduce Steps to reproduce the behavior:

  1. To reproduce, connect external monitor on DisplayPort
  2. Launch Kitty on monitor connected on display port
  3. See error

Screenshots Monitor connected on DisplayPort

Screenshot 2022-12-26 at 11 22 14 AM

Monitor connected on HDMI

Screenshot 2022-12-26 at 11 25 39 AM

Environment details

kitty 0.25.0 created by Kovid Goyal
Darwin C02C331VMD6R 22.1.0 Darwin Kernel Version 22.1.0: Sun Oct  9 20:14:54 PDT 2022; root:xnu-8792.41.9~2/RELEASE_X86_64 x86_64
ProductName:        macOS ProductVersion:       13.0.1 BuildVersion:        22A400
Frozen: True
Paths:
  kitty: /Applications/kitty.app/Contents/MacOS/kitty
  base dir: /Applications/kitty.app/Contents/Resources/kitty
  extensions dir: /Applications/kitty.app/Contents/Resources/Python/lib/kitty-extensions
  system shell: /usr/local/bin/fish

Config options different from defaults:

Important environment variables seen by the kitty process:
    PATH                                /Users/aniruddha/.jenv/shims:/Users/aniruddha/.nvm/versions/node/v16.14.2/bin:/Users/aniruddha/.jenv/bin:/usr/local/bin:/Users/aniruddha/.local/bin:/Users/aniruddha/.local/share/gems/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/usr/local/munki:/Users/aniruddha/dev/bin:/Users/aniruddha/dev/homebrew/bin:/usr/local/mysql/bin:.
    LANG                                en_CA.UTF-8
    SHELL                               /usr/local/bin/fish
    USER                                aniruddha
    LC_TERMINAL_VERSION                 3.4.18
    LC_TERMINAL                         iTerm2


anieruddha avatar Dec 26 '22 17:12 anieruddha

./kitty --debug-gl output

Polling for monitors: 4 found
Cell height calculation:
	line height from line origins: 13.000000
	line bounds: origin-y: -2.594238 height: 12.804688
	line bounds-no-leading: origin-y: -2.594238 height: 12.804688
	bounds metrics: ascent: 10.210449
	line metrics: ascent: 10.210449 descent: 2.594238 leading: 0.000000
	font metrics: ascent: 10.210449 descent: 2.594238 leading: 0.000000 underline_position: -0.698242
	cell_height: 13 baseline: 10 underline_position: 11 strikethrough_position: 6
GL version string: '4.1 INTEL-20.2.44' Detected version: 4.1
[360 11:45:10.709052] OpenGL error: The framebuffer object is not complete (GL_INVALID_FRAMEBUFFER_OPERATION) (calling function: glClear)

anieruddha avatar Dec 26 '22 17:12 anieruddha

First of all you are running an outdated version of kitty, update.

kovidgoyal avatar Dec 27 '22 02:12 kovidgoyal

Updated kitty now. Unfortunately same behavior

anieruddha avatar Dec 27 '22 17:12 anieruddha

Hmm well I dont have the hardware to test this so it's difficult for me to debug. Seems like a driver issue to me. Try reporting it to Apple. kitty has no displayport specific code in it.

kovidgoyal avatar Dec 28 '22 02:12 kovidgoyal

Oh and does moving a kitty window from one monitor to another monitor also crash?

kovidgoyal avatar Dec 28 '22 09:12 kovidgoyal

Current behavior : when launch kitty on DP monitors, I see screens as shown in first screenshot. If I launch kitty with --debug-input, it print mouse movement & key events. But I dont see anything. Dragging kitty to HDMI monitor, do nothing difference. Same behavior. When launch kitty on HDMI monitor or on laptop screen, I can see terminal window, run commands normally. Once I dragged kitty to DP monitor, it sort of froze. I can't see keys I typed.

I put small script in path which create file & add current timestamp in file. And execute that script from kitty. That script executes whether kitty is on DP monitor or HDMI. So seems kitty is executing command. Only on DP monitor, it not drawing or updating terminal window.

I will reinstall drivers & will update. Thanks for looking into this.

anieruddha avatar Dec 28 '22 22:12 anieruddha

Ah, if the issue is that the window is not being drawn, not that kitty is crashing, then this is likely a duplicate of #3519

Reporting it to Apple is the best way to get it fixed.

kovidgoyal avatar Dec 29 '22 02:12 kovidgoyal

I was able to resolve this now. I reinstall displaylink drivers & disable dynamic graphics switching (one of my colleague suggested ). I did that following this post. Restarted mac just to be sure. Now its working. It works with integrated as well as discreet graphics.

Polling for monitors: 3 found
Cell height calculation:
	line height from line origins: 19.000000
	line bounds: origin-y: -4.057617 height: 18.764648
	line bounds-no-leading: origin-y: -4.057617 height: 18.764648
	bounds metrics: ascent: 14.707031
	line metrics: ascent: 14.707031 descent: 4.057617 leading: 0.000000
	font metrics: ascent: 14.707031 descent: 4.057617 leading: 0.000000 underline_position: -2.695312
	cell_height: 19 baseline: 15 underline_position: 17 strikethrough_position: 9
GL version string: '4.1 INTEL-20.2.48' Detected version: 4.1

Thanks.

anieruddha avatar Dec 29 '22 12:12 anieruddha