NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.27k stars 14.25k forks source link

KiCAD OpenGL doesn't work anymore #338062

Open SapuSeven opened 2 months ago

SapuSeven commented 2 months ago

Describe the bug

Opening KiCAD schematic/board editor and selecting the "Accelerated graphics" rendering engine fails with an OpenGL error:

Could not use OpenGL, falling back to software rendering Could not create the main OpenGL context

Steps To Reproduce

Steps to reproduce the behavior:

  1. Install pkgs.kicad
  2. Open schematic editor
  3. Open Preferences -> Preferences -> Schematic Editor -> Display Options
  4. Set "Rendering Engine" to "Accelerated graphics" and apply

Expected behavior

KiCAD should be able to use OpenGL accelerated graphics to render the contents.

Additional context

I'm using an AMD RX 6800-XT. Other OpenGL-based application (like glxgears) works fine.

Accelerated graphics in KiCAD worked fine when I was using 9f918d616c5321ad374ae6cb5ea89c9e04bf3e58 of nixpkgs, but broke when I updated to 693bc46d169f5af9c992095736e82c3488bf7dbb in my Nix Flake.

Notify maintainers

@evils

Metadata

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.47, NixOS, 24.11 (Vicuna), 24.11.20240824.d0e1602`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.5`
 - nixpkgs: `/nix/store/ia1zpg1s63v6b3vin3n7bxxjgcs51s2r-source`

Add a :+1: reaction to issues you find important.

TheFinalGuardian commented 2 months ago

i have the same error

physics-enthusiast commented 1 month ago

345017?

SapuSeven commented 1 month ago

345017?

Haven't tested it, but unlikely since I'm not using any Nvidia hardware/software on my system

Sw3d15h-F1s4 commented 1 month ago

I'm also having this issue. Other OpenGL apps seem to be working ok (? glxgears runs fine, and I don't have an integrated GPU or any other GPU on the system). I'm using an AMD 7900GRE, I'm on wayland, using the modesetting driver, I have hardware.amdgpu.opencl and initrd enabled, hardware.graphics.enable and enable32Bit as well. Any updates?

for me kicad is unusable rn, as the fallback rendering doesn't seem to capture my cursor and I can't move the cursor around the canvas on either the PCB or the schematic editor.

i have a workaround for the fallback graphics not working at all: launch with env GDK_BACKEND=x11 kicad. Seems to work so far. Still not working with OpenGL. Is this a wayland issue, an opengl issue, or both?

further updates: the flatpak version works with OpenGL just fine. Is the version in nixpkgs compiled with opengl support? When I tried to check in help -> about kicad -> version, the flatpak version tells me what version of opengl is used, while the nixpkgs version doesn't mention opengl. Just food for thought, though I'll probably keep using the flatpak version (even though I'd like to have kicad in my nixos config for reproducibility)

AndKe commented 3 weeks ago

I see this issue too, Ubuntu 23.10 - worked fine just few days ago. I am on current stable KiCAD