Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kitty does not start more #80936

Open
shyim opened this issue Feb 24, 2020 · 74 comments
Open

Kitty does not start more #80936

shyim opened this issue Feb 24, 2020 · 74 comments
Labels
0.kind: bug Something is broken

Comments

@shyim
Copy link
Member

shyim commented Feb 24, 2020

Describe the bug
Kitty does not start more

To Reproduce
Steps to reproduce the behavior:

  1. Run nixos-unstable
  2. Start Kitty
  3. Does not start

Expected behavior
Its working

Screenshots

[055 09:05:46.416468] [glfw error 65542]: GLX: No GLXFBConfigs returned
[055 09:05:46.416497] [glfw error 65545]: GLX: Failed to find a suitable GLXFBConfig
[055 09:05:46.416512] Failed to create GLFW temp window! This usually happens because of old/broken OpenGL drivers. kitty requires working OpenGL 3.3 drivers.

Additional context
Add any other context about the problem here.

Metadata

  • system: "x86_64-linux"
  • host os: Linux 5.5.5, NixOS, 20.09pre214390.ea79a830dcf (Nightingale)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.3.3
  • channels(shyim): "nixos-20.03pre208171.2e8fc97dbfa"
  • channels(root): "nixos-20.09pre214390.ea79a830dcf"
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute: kitty
# a list of nixos modules affected by the problem
module:
@shyim shyim added the 0.kind: bug Something is broken label Feb 24, 2020
@rnhmjoj
Copy link
Contributor

rnhmjoj commented Feb 24, 2020

What does nix run nixpkgs.glxinfo -c glxinfo | grep OpenGL says?

@shyim
Copy link
Member Author

shyim commented Feb 24, 2020

OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) HD Graphics 630 (Kaby Lake GT2) 
OpenGL core profile version string: 4.6 (Core Profile) Mesa 19.3.3
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 19.3.3
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 19.3.3
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:

@rnhmjoj
Copy link
Contributor

rnhmjoj commented Feb 24, 2020

Try running kitty with env MESA_GL_VERSION_OVERRIDE=3.3 kitty

@shyim
Copy link
Member Author

shyim commented Feb 24, 2020

Still don't running

❯ env MESA_GL_VERSION_OVERRIDE=3.3 kitty
[055 16:02:21.181352] [glfw error 65542]: GLX: No GLXFBConfigs returned
[055 16:02:21.181372] [glfw error 65545]: GLX: Failed to find a suitable GLXFBConfig
[055 16:02:21.181380] Failed to create GLFW temp window! This usually happens because of old/broken OpenGL drivers. kitty requires working OpenGL 3.3 drivers.

@rnhmjoj
Copy link
Contributor

rnhmjoj commented Feb 24, 2020

Are you using wayland/sway? Did a previous version of kitty work?

There are a couple issues upstream with this same error. One is about sway, which should have already been fixed in unstable. The other is simply saying that you really need OpenGL 3.3.
If it used to work I guess the lowest requried version has been raised in a recent release.

@shyim
Copy link
Member Author

shyim commented Feb 24, 2020

I am using I3. I guess it happend with Kernel update I will downgrade to test that 🤔

@shyim
Copy link
Member Author

shyim commented Feb 24, 2020

Same with 5.4 kernel 🙈

@vcunat
Copy link
Member

vcunat commented Feb 24, 2020

Could this be the same as #75868 ?

@rnhmjoj
Copy link
Contributor

rnhmjoj commented Feb 24, 2020

It may be but I can't reproduce it on the same machine where I tested #75868.

@vcunat
Copy link
Member

vcunat commented Feb 25, 2020

I think it's worth trying LIBGL_DEBUG=verbose in any case (for those who can reproduce the issue).

@shyim
Copy link
Member Author

shyim commented Feb 25, 2020

❯ LIBGL_DEBUG=verbose kitty
[056 11:43:24.816491] [glfw error 65542]: GLX: No GLXFBConfigs returned
[056 11:43:24.816512] [glfw error 65545]: GLX: Failed to find a suitable GLXFBConfig
[056 11:43:24.816535] Failed to create GLFW temp window! This usually happens because of old/broken OpenGL drivers. kitty requires working OpenGL 3.3 drivers.

Similar issue happends also with alacritty. I guess it's a general problem

@fionera
Copy link
Member

fionera commented Feb 29, 2020

I have the same issue after an upgrade. The whole gl context is missing and glxinfo also screams
name of display: :1
Error: couldn't find RGB GLX visual or fbconfig

This doesnt happen on the 19.09 channel

@rht
Copy link
Member

rht commented Mar 6, 2020

Bump. I have accidentally spotted this issue, I also use kitty and have been hesitant in updating my unstable channel until this is resolved.

@shyim
Copy link
Member Author

shyim commented Mar 6, 2020

It's not only kitty. The whole gl context is broken in 20.03 / unstable.

@timokau
Copy link
Member

timokau commented Mar 9, 2020

I tried to bisect the problem, but for some reason it just vanished. Now I cannot reproduce it anymore on the same machine with the same configuration and the same pinned nixpkgs. Very weird.

@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/nix-bisect-bisect-nix-builds/5584/10

@fionera
Copy link
Member

fionera commented Mar 10, 2020

@timokau I just upgraded to master again but the issue is still there. I am trying your bisect package now

@rnhmjoj
Copy link
Contributor

rnhmjoj commented Mar 10, 2020

If it's hard to reproduce and seems to appear/disappear randomly maybe it has to do with the /run/opengl-driver impurity of the system and not much with nixpkgs itself.

@vcunat
Copy link
Member

vcunat commented Mar 10, 2020

Right, I would not expect these issues to happen if you have this path matching (i.e. booted NixOS version) with the package version you are using. I suspect the culprit is glibc update done during the 20.03 cycle.

@timokau
Copy link
Member

timokau commented Mar 10, 2020

Right, I would not expect these issues to happen if you have this path matching (i.e. booted NixOS version) with the package version you are using. I suspect the culprit is glibc update done during the 20.03 cycle.

In an effort to test this, I wanted to go back to a revision before this error occurred (8130f3c), reboot into that and then switch back to a more recent one to see if the problem re-appears.

It turns out that the problem now actually occurs after rebooting into 8130f3c. That revision was definitely good before, and I did reboot. So that confirms that there is some impurity going on (that goes both directions), but rebooting does not fix it. Not sure what does, but apparently at some point some switch was flipped for me.

timokau added a commit to timokau/dotfiles that referenced this issue Mar 11, 2020
There is the caveat of NixOS/nixpkgs#80936
here, but I can't reproduce it anymore and its high time for an update.
@fatpat
Copy link
Contributor

fatpat commented Mar 26, 2020

I have the same issue here with kitty (but with others packages like glxinfo, compton, ...)

the solution was to remove the package and to reinstall it ... don't ask me why

@Fresheyeball
Copy link
Contributor

@fatpat that worked for me as a work around. I removed kitty from my configuration.nix, and instead installed it with nix-env now it works. Go figure.

@shyim
Copy link
Member Author

shyim commented May 18, 2020

Same for me :)

@shyim shyim closed this as completed May 18, 2020
@Fresheyeball
Copy link
Contributor

@shyim please don't close this. We still need to be able to install it without nix-env. A workaround is not a bug fix!

@shyim shyim reopened this May 18, 2020
@maxkrieger
Copy link

FWIW my kitty actually was failing in my ~/.config/nixpkgs/config.nix (installed with nix-env) but worked when I installed it in my user packages (/etc/nixos/configuration.nix).

@dustinlacewell
Copy link

On unstable, no matter how I install it, I get

fast_data_types.FreeTypeError: Failed to load face, with error: cannot open resource
[251 06:40:21.964670] Failed to convert descriptor to face for symbol_map font

@lapp0
Copy link

lapp0 commented Feb 16, 2022

I tried a mostly plain configuration as well as nvidia_x11 and nvidia_x11_beta. Thanks for trying, I'm going to ask on discourse.

@lapp0
Copy link

lapp0 commented Feb 17, 2022

Issues with the same problem (at least I'm not alone)
#85866
#66755
#132045
#82959
#94958
#101202
#55191
#84692

Hopefully they can see your solution to the issue from the linkback if anything. It might work for some people even if it doesn't work on my end.

Is there any way to escalate this?

@jonringer (nvidia-x11) @primeos @vcunat (mesa) any thoughts on how this might be resolved?

@vcunat
Copy link
Member

vcunat commented Feb 17, 2022

(Note: I am forwarding X11. I have tried with ssh -X, ssh -Y, ssh -XY, and vglconnect, all resulting in the above error)

X11 forwarding with OpenGL? I don't expect that's even meant to work.

@jonringer
Copy link
Contributor

The nvidia package doesn't contain a lib/dri/swrast_dri.so failed, the only way I can think of handling this would be to add mesa to hardware.opengl.extraPackages, so that you inherit some of the missing directories like /lib/dri

@lapp0
Copy link

lapp0 commented Feb 18, 2022

Thanks for responding.

@vcunat virtualgl (via vglconnect and vglrun) is supposed to handle 3D rendering on the server, and then the 2D stuff is rendered on the clients forwarded X server.

@jonringer I did that, but I still have the same error. (hardware.opengl.extraPackages = [ pkgs.mesa ];)

Mesa doesn't appear to have that library:

 find /nix/store/5j7k2nrgvl6vnichkg4c1fwj1907nvgg-mesa-21.3.5/
/nix/store/5j7k2nrgvl6vnichkg4c1fwj1907nvgg-mesa-21.3.5/
/nix/store/5j7k2nrgvl6vnichkg4c1fwj1907nvgg-mesa-21.3.5/share
/nix/store/5j7k2nrgvl6vnichkg4c1fwj1907nvgg-mesa-21.3.5/share/drirc.d
/nix/store/5j7k2nrgvl6vnichkg4c1fwj1907nvgg-mesa-21.3.5/share/drirc.d/00-mesa-defaults.conf
/nix/store/5j7k2nrgvl6vnichkg4c1fwj1907nvgg-mesa-21.3.5/lib
/nix/store/5j7k2nrgvl6vnichkg4c1fwj1907nvgg-mesa-21.3.5/lib/libglapi.so
/nix/store/5j7k2nrgvl6vnichkg4c1fwj1907nvgg-mesa-21.3.5/lib/libglapi.so.0.0.0
/nix/store/5j7k2nrgvl6vnichkg4c1fwj1907nvgg-mesa-21.3.5/lib/libgbm.so.1
/nix/store/5j7k2nrgvl6vnichkg4c1fwj1907nvgg-mesa-21.3.5/lib/libgbm.so
/nix/store/5j7k2nrgvl6vnichkg4c1fwj1907nvgg-mesa-21.3.5/lib/libgbm.so.1.0.0
/nix/store/5j7k2nrgvl6vnichkg4c1fwj1907nvgg-mesa-21.3.5/lib/libglapi.so.0
/nix/store/5j7k2nrgvl6vnichkg4c1fwj1907nvgg-mesa-21.3.5/etc

Anything you would recommend to find the missing library?

@jonringer
Copy link
Contributor

oh sorry, it's pkgs.mesa.drivers

@lapp0
Copy link

lapp0 commented Feb 18, 2022

Thanks! That resolved the error when I simply run glxgears on my server.

Do you have any insights into why I might get the "fbconfig" error when I run it in vglrun?

$ TVNC_WM=/run/current-system/sw/bin/twm vncserver

Desktop 'TurboVNC: host:2 (remote)' started on display host:2

Starting applications specified in /home/user/.vnc/xstartup.turbovnc
Log file is /home/user/.vnc/host:2.log

$ cat /home/user/.vnc/host:2.log | grep running
18/02/2022 03:15:45 VNC extension running!

$ vglrun -d :2 glxgears
[VGL] NOTICE: Automatically setting VGL_CLIENT environment variable to
[VGL]    192.168.1.12, the IP address of your SSH client.
Error: couldn't get an RGB, Double-buffered visual

Seems turbovnc has the drivers linked already

nix-store -q --references $(which vncviewer) | grep drivers
/nix/store/2gl456ql1g1pj9qwkgkpjajknc1j702h-mesa-21.3.5-drivers

However virtualgl doesn't

$ nix-store -q --references $(which vglrun) | xargs nix-store -q --references | uniq
/nix/store/4s21k8k7p1mfik0b33r2spq5hq7774k1-glibc-2.33-108
/nix/store/6pdb0rz2w2hsfsy66kwrbz67jd424wv7-libX11-1.7.2
/nix/store/a3yw11i2iskvr1zx2za4mwrj9sawq7hz-libXext-1.3.4
/nix/store/5lzlfgrc37wqj400b4qgpaa6kc9d2wr1-libglvnd-1.4.0
/nix/store/ndnqiz3nnifj1blhg9q626xlmkqq1nmh-gcc-10.3.0-lib
/nix/store/04yj0nllw5bqzzlay5m6zzbmyw7csgnk-glu-9.0.2
/nix/store/a6i6c7hkfn5s9bbgc1x6j1cnd5dppzkv-libjpeg-turbo-2.1.2
/nix/store/pi2h6nky70gww75w05zq1ch9fmycrvvy-libGL-1.4.0
/nix/store/0yb5b9wq3y7wn5l9akcz7hcyyk2bc6rk-fltk-1.3.8
/nix/store/1dw67iap73klp5rqcvqpf8sadrvr8y8d-ocl-icd-2.3.1
/nix/store/n8k71gd1a759s9mmi85iinfdb0ckkzkv-glibc-2.33-108
/nix/store/fp08p7c881knk9h135vj1acb47q218id-gcc-10.3.0-lib
/nix/store/1l82d038523bapkkc0qkgjyzdblfxbri-gcc-10.3.0
/nix/store/290xnrwys55hbnv9xggcc98q2sfgqf6g-libXtst-1.2.3
/nix/store/2dv93bbc06c7zg866qid73j3r36zz3jx-gcc-10.3.0
/nix/store/4k40gdgf7ckimb3hlwywx76dj5435ack-libXv-1.0.11
/nix/store/cmq9rapgxx18h99r0yp6vvzk1fkwjs3j-libX11-1.7.2
/nix/store/nca9ls2cla27qal0p01k2g17agmd62bf-libXext-1.3.4
/nix/store/64hrj9wbf9yvqwkjwr2r7qsdl99f8wcm-libXtst-1.2.3
/nix/store/hrc96ak11li2czfqj0xf2fc1clpn6gvx-libglvnd-1.4.0
/nix/store/aqj8zmgxvx44r5kf7jnqyyiwwfpbhj0x-libGL-1.4.0
/nix/store/bqkimn04bkknc2ngl01ipmjlq782d7m6-libjpeg-turbo-2.1.2
/nix/store/zhh1ppg81ahlvbf7qlfirj1pzlm8gizr-glu-9.0.2
/nix/store/aa5m1mpvsamdx7pi92fbkfhwh19q62z3-fltk-1.3.8
/nix/store/rycnmssyan6nd1dzas6v6b886qvk663m-ocl-icd-2.3.1
/nix/store/vnm9fwc6hj2igr5as9x2bjwx5nm8g0w8-libXv-1.0.11
/nix/store/nicc84inpa08zi5m52l30nfbp411apnw-virtualgl-lib-2.6.5
/nix/store/sp7fy3jh5ikc2f0g61h164nn3vvcky4a-virtualgl-lib-2.6.5
nix-store -q --references /run/opengl-driver
/nix/store/2gl456ql1g1pj9qwkgkpjajknc1j702h-mesa-21.3.5-drivers
/nix/store/vlp25l161q65qnm8my6zj9i87gkfh748-nvidia-x11-510.47.03-5.16.8

For now I'm trying to recreate the virtualgl package definition with pkgs.mesa.drivers included.

@lapp0
Copy link

lapp0 commented Feb 18, 2022

export LD_LIBRARY_PATH="/run/opengl-driver/lib:/run/opengl-driver-32/lib" resulted in vglrun -d :2 glxgears rendering a black screen rather than an error, so it seems I have an issue that is likely unrelated now. Thanks so much for getting me past that hurdle!

@vcunat
Copy link
Member

vcunat commented Feb 18, 2022

That's not how finding OpenGL is supposed to work in NixOS (but we did use it in past). Nowadays it should be indirected through libglvnd. (well, I have no idea about virtualgl in particular...)

@dschrempf
Copy link
Contributor

FYI: I use nixos-unstable as my system flake. Stuff works fine when running, e.g., nix run nixos-unstable#glxinfo. However, if I use an older flake such as nix run nixos-21.11#glxinfo, I get the same errors mentioned in this thread.

I bumped into this because nixos-unstable#calibre is broken at the moment, and I cannot run nixos-21-.11#calibre either.

@vcunat
Copy link
Member

vcunat commented Apr 11, 2022

I know it's a tangential topic, but as for workarounds for such cases, I'd:

  • look at https://hydra.nixos.org/job/nixpkgs/trunk/calibre.x86_64-linux
  • nix build /nix/store/70mp9j7lxbyy0ckg22y3g865y9mszlc0-calibre-5.37.0
  • and use that for now... or you can see git commit hashes there, too.
  • I generally keep older profiles and fall back to those versions in case of encountering problems; not all issues get discovered during built time or even when using a package.

@dschrempf
Copy link
Contributor

Thank you for tthis tip! I can build calibre, but I get the same GLX error.Failed to finding matching FBConfig.

@vcunat
Copy link
Member

vcunat commented Apr 11, 2022

For reference, the above calibre starts up without any errors on my 21.11 system.

@dschrempf
Copy link
Contributor

Indeed, that's interesting...

@3rd
Copy link

3rd commented Apr 11, 2022

The issue is back for kitty as well.

@jeff-hykin
Copy link

One year later, sadly still a problem. I've hit it with alacritty and realsense-viewer. Previously, multiple times, nixGL solved it for alacritty for me, but have issues with that currently. And as for realsense-viewer, nixGL doesn't work on arm which is where I'm using the realsense-viewer.

@3rd
Copy link

3rd commented Apr 12, 2023

One year later, sadly still a problem. I've hit it with alacritty and realsense-viewer. Previously, multiple times, nixGL solved it for alacritty for me, but have issues with that currently. And as for realsense-viewer, nixGL doesn't work on arm which is where I'm using the realsense-viewer.

I just got used to rebooting after upgrading, and it's not always needed.

@jeff-hykin
Copy link

I just got used to rebooting after upgrading, and it's not always needed.

Rebooting doesn't work in my case.

If anyone knows where the error is being thrown (source code), I'm be interested in digging into the problem.
For reproducability, I've also uploaded a 32Gb bootable image for a raspberry pi 3b here username: csce635 password bumpnrun (obviously there's no sensitive information on it)

@greenm01
Copy link

I'm encountering this exact same error almost 4 years later.....

@greenm01
Copy link

I'm encountering this exact same error almost 4 years later.....

I followed the rabbit hole on this thread and solved the problem as so:

The issue was an out of date home-manager flake in ~/.config/home-manager

nix flake update
home-manager switch

Boom, problem solved!

@ditsuke
Copy link
Member

ditsuke commented Jun 13, 2024

Reproduced on nixpkgs 1a9df4f74273f90d04e621e8516777efcec2802a, on Fedora 40. Neither Kitty nor Alacrity work.

@vcunat
Copy link
Member

vcunat commented Jun 13, 2024

On Fedora it will be more like topics around #9415

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

No branches or pull requests