Describe the bug
I have installed Wine normally via nix-env
, from the unstable nixpkgs, in non-NixOS Linux. It works, but if I try to run anything that uses a graphical processor, I get this: 0009:err:wgl:X11DRV_WineGL_InitOpenglInfo couldn't initialize OpenGL, expect problems
. Many programs do still run, but they're unacceptably slow unless they are very old.
To Reproduce
nix-env -i wine
or nix-env -iA nixpkgs.wineWowPackages.stable
(tested with both)cd ~/.wine/drive_c/Program Files (x86)/Ubisoft/Heroes IV
wine heroes4.exe
Expected behavior
Program would run much faster, and no complains about OpenGL.
Additional context
OpenGL works otherwise. Also nix-installed Battle for Wesnoth (nix-env -i wesnoth
) does not have problems. I'd guess Wesnoth uses OpenGL (I know it uses SDL). Even with Wine 5.0, OpenGL did work previously when Wine was installed with the system package manager.
I have tried installing and using NixGL. No change in behaviour. glxinfo
outputs:
> glxinfo | grep OpenGL
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) HD Graphics 5500 (BDW GT2)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 20.0.4
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 20.0.4
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 20.0.4
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
OpenGL ES profile extensions:
> nixGLIntel glxinfo | grep OpenGL
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) HD Graphics 5500 (Broadwell 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.1 Mesa 19.3.3
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
OpenGL ES profile extensions:
I don't know if this is related, but many Nix programs, including ones I mentioned, complain about fontconfig
here's the full terminal output from Heroes IV:
Fontconfig warning: "/etc/fonts/fonts.conf", line 5: Fontconfig warning: "/etc/fonts/fonts.conf", line 5: unknown element "its:rules"unknown element "its:rules"
Fontconfig warning: "/etc/fonts/fonts.conf", line 6: Fontconfig warning: "/etc/fonts/fonts.conf", line 6: unknown element "its:translateRule"unknown element "its:translateRule"
Fontconfig error: "/etc/fonts/fonts.conf", line 6: Fontconfig error: "/etc/fonts/fonts.conf", line 6: invalid attribute 'translate'invalid attribute 'translate'
Fontconfig error: "/etc/fonts/fonts.conf", line 6: Fontconfig error: "/etc/fonts/fonts.conf", line 6: invalid attribute 'selector'invalid attribute 'selector'
Fontconfig error: "/etc/fonts/fonts.conf", line 7: Fontconfig error: "/etc/fonts/fonts.conf", line 7: invalid attribute 'xmlns:its'invalid attribute 'xmlns:its'
Fontconfig error: "/etc/fonts/fonts.conf", line 7: Fontconfig error: "/etc/fonts/fonts.conf", line 7: invalid attribute 'version'
invalid attribute 'version'Fontconfig warning: "/etc/fonts/fonts.conf", line 9:
unknown element "description"
Fontconfig warning: "/etc/fonts/fonts.conf", line 9: unknown element "description"
Fontconfig error: Fontconfig error: Cannot load config file from /etc/fonts/fonts.conf
Cannot load config file from /etc/fonts/fonts.conf
0020:err:ntdll:RtlpWaitForCriticalSection section 0x7bec3b20 "/build/wine-5.0/dlls/ntdll/loader.c: loader_section" wait timed out in thread 0020, blocked by 0022, retrying (60 sec)
Fontconfig warning: "/etc/fonts/fonts.conf", line 5: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/fonts.conf", line 6: unknown element "its:translateRule"
Fontconfig error: "/etc/fonts/fonts.conf", line 6: invalid attribute 'translate'
Fontconfig error: "/etc/fonts/fonts.conf", line 6: invalid attribute 'selector'
Fontconfig error: "/etc/fonts/fonts.conf", line 7: invalid attribute 'xmlns:its'
Fontconfig error: "/etc/fonts/fonts.conf", line 7: invalid attribute 'version'
Fontconfig warning: "/etc/fonts/fonts.conf", line 9: unknown element "description"
Fontconfig error: Cannot load config file from /etc/fonts/fonts.conf
Fontconfig warning: "/etc/fonts/fonts.conf", line 5: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/fonts.conf", line 6: unknown element "its:translateRule"
Fontconfig error: "/etc/fonts/fonts.conf", line 6: invalid attribute 'translate'
Fontconfig error: "/etc/fonts/fonts.conf", line 6: invalid attribute 'selector'
Fontconfig error: "/etc/fonts/fonts.conf", line 7: invalid attribute 'xmlns:its'
Fontconfig error: "/etc/fonts/fonts.conf", line 7: invalid attribute 'version'
Fontconfig warning: "/etc/fonts/fonts.conf", line 9: unknown element "description"
Fontconfig error: Cannot load config file from /etc/fonts/fonts.conf
Fontconfig warning: "/etc/fonts/fonts.conf", line 5: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/fonts.conf", line 6: unknown element "its:translateRule"
Fontconfig error: "/etc/fonts/fonts.conf", line 6: invalid attribute 'translate'
Fontconfig error: "/etc/fonts/fonts.conf", line 6: invalid attribute 'selector'
Fontconfig error: "/etc/fonts/fonts.conf", line 7: invalid attribute 'xmlns:its'
Fontconfig error: "/etc/fonts/fonts.conf", line 7: invalid attribute 'version'
Fontconfig warning: "/etc/fonts/fonts.conf", line 9: unknown element "description"
Fontconfig error: Cannot load config file from /etc/fonts/fonts.conf
0009:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION
0009:err:wgl:X11DRV_WineGL_InitOpenglInfo couldn't initialize OpenGL, expect problems
Metadata
- system: `"x86_64-linux"`
- host os: `Linux 5.6.0-1-default, openSUSE Tumbleweed, noversion`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.3.3`
- channels(root): `"nixpkgs-20.09pre218717.05f0934825c"`
- nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixpkgs`
There are some known problems with OpenGL on non-nixos (e.g. #9415)
There are some known problems with OpenGL on non-nixos (e.g. #9415)
Thanks, but there's got to be something else too. I verified by installing OpenArena. It did not function out of the box, but worked when invokedwith the nixGLIntel
workaround suggested at the issue you mentioned. However, nixGLIntel wine heroes4.exe
makes no difference to wine heroes4.exe
, even after quitting WineServer and restarting it by nixGLIntel wineserver -f
first.
So OpenGL in Nix, per se, seems to work for me. Could it be X11 issue instead?
@dukc
Sorry, I don't know the answer to your question.
cc @guibou @vcunat
@veprbl this might well be due to missing 32-bit OpenGL libraries. On NixOS you would solve this by setting hardware.opengl.driSupport32Bit
to true, but I'm unsure how to do this with nixGL.
(nixGL author here). I had never tested nixGL with 32 bit binaries. Could you open a bug in the nixGL bugtracker, I'll have a look at it.
I actually opened the ticket myself and already found a solution. I'll try to push a fix today.
@dukc Could you test the latest master
of nixGL
, hopefully it will work for you. I did not tested it with wine
however, just a 32bit linux executable with opengl.
@dukc Could you test the latest
master
ofnixGL
, hopefully it will work for you. I did not tested it withwine
however, just a 32bit linux executable with opengl.
I see that not only have you added 32-bit overloads, you also have made NixGL easier to use (as its one-phase install now). Excellent job -and Wine works like clock now.
Thanks everybody for the help.
Most helpful comment
I see that not only have you added 32-bit overloads, you also have made NixGL easier to use (as its one-phase install now). Excellent job -and Wine works like clock now.
Thanks everybody for the help.