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

Packages should be able to easily depend on a pure software rendering version of libGL #62032

Open
edahlgren opened this issue May 24, 2019 · 6 comments
Assignees

Comments

@edahlgren
Copy link

Hi, I’d like to use mesa (e.g. mesa-noglu-18.3.4) for software rendering, because the GUI I’m packaging doesn’t depend on high-performance graphics, and software rendering would be a nice way to make the package more pure.

Somewhat like this, but replace glxinfo with the app:

$ LIBGL_ALWAYS_SOFTWARE=1 GALLIUM_DRIVER=llvmpipe glxinfo
But when I use mesa, I always see libglvnd sending requests to my X server, presumably to ask which vendor to use.

$ nix-shell -p mesa glxinfo
[nix-shell:~]$ LIBGL_ALWAYS_SOFTWARE=1 LIBGL_DEBUG=verbose strace glxinfo
...
socket(PF_LOCAL, SOCK_STREAM|SOCK_CLOEXEC, 0) = 3
connect(3, {sa_family=AF_LOCAL, sun_path=@"/tmp/.X11-unix/X0"}, 20) = 0
...
openat(AT_FDCWD, "/nix/store/69vq0a9sqynmz335apm8zgyjdmq34s5j-libX11-1.6.7/lib/libGLX_nvidia.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/lswf09qbkkrqd0rgzaqyrkr44lf78y9x-libXext-1.3.4/lib/libGLX_nvidia.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/nj5w33n15zrn8xsm9q0vf3pk0j0j9sj8-libglvnd-1.0.0/lib/libGLX_nvidia.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
...
In my case I have an nvidia driver installed on Ubuntu 16.04 — non NixOS. So it looks for libGLX_nvidia instead of libGLX_mesa. To be honest, I’m not 100% sure if libGLX_mesa is necessary for software rendering, but libGLX_nvidia is definitely the wrong thing.

Thoughts? Would a simple mesa libGL.so (instead of going through libglvnd) be correct? Curious why mesa-noglu-18.3.4 doesn’t have one.

matthewbauer added a commit to matthewbauer/nixpkgs that referenced this issue May 28, 2019
When no libGL drivers are found, we will fall back to “libGLX_mesa.so”
which corresponds to the mesa “swrast” driver. This uses some X11 apis
for rendering, and is suitable for many use cases of . This is still
not as good as having the hardware drivers. Adding libGLX_mesa.so to
the closures ends up adding about 1MB, which is signifcant but still
acceptable.

Fixes NixOS#62032
Fixes NixOS#62169
Fixes NixOS#9415
@matthewbauer matthewbauer added this to the 20.03 milestone Aug 16, 2019
@matthewbauer matthewbauer self-assigned this Aug 16, 2019
@disassembler disassembler modified the milestones: 20.03, 20.09 Feb 5, 2020
@stale
Copy link

stale bot commented Aug 10, 2020

Hello, I'm a bot and I thank you in the name of the community for opening this issue.

To help our human contributors focus on the most-relevant reports, I check up on old issues to see if they're still relevant. This issue has had no activity for 180 days, and so I marked it as stale, but you can rest assured it will never be closed by a non-human.

The community would appreciate your effort in checking if the issue is still valid. If it isn't, please close it.

If the issue persists, and you'd like to remove the stale label, you simply need to leave a comment. Your comment can be as simple as "still important to me". If you'd like it to get more attention, you can ask for help by searching for maintainers and people that previously touched related code and @ mention them in a comment. You can use Git blame or GitHub's web interface on the relevant files to find them.

Lastly, you can always ask for help at our Discourse Forum or at #nixos' IRC channel.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Aug 10, 2020
@spacekitteh
Copy link
Contributor

still important for me

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Aug 11, 2020
@FRidh FRidh modified the milestones: 20.09, 21.03 Dec 20, 2020
@stale
Copy link

stale bot commented Jun 18, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 18, 2021
@spacekitteh
Copy link
Contributor

pls don't

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 22, 2021
@stale
Copy link

stale bot commented Jan 9, 2022

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jul 10, 2022
@Artturin Artturin modified the milestones: 21.05, 23.05 Dec 31, 2022
@stale stale bot removed 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md labels Dec 31, 2022
@K900
Copy link
Contributor

K900 commented Apr 3, 2023

It may be a good idea to have a standard way to get a software-only build of Mesa (you can already get it by overriding, but that's awkward), but packages depending on it is by default is something I'd be heavily against. "But it's more pure" is not a valid justification for delivering a bad user experience.

@Artturin Artturin removed this from the 23.05 milestone Apr 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants