NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.14k stars 13.42k forks source link

`protontricks` refuses to open xorg windows: `nodrv_CreateWindow` #251056

Open soupglasses opened 1 year ago

soupglasses commented 1 year ago

Describe the bug

May be related to winetricks. As the gui for protontricks works correctly until it hits the winetricks portion.

This is very likely just at the wine level. Running protontricks <appid> shell then wine example.exe causes the same error.

Full logs ``` protontricks-launch --appid 284160 /home/sofi/Downloads/BeamMP_Installer.exe protontricks (WARNING): Steam library folder /mnt/scrap/Launchers/Steam not found. Protontricks might not have access to the directory. protontricks (WARNING): Steam library folder /mnt/scrap/Launchers/Steam not found. Protontricks might not have access to the directory. protontricks (WARNING): Current Steam Runtime not recognized by Protontricks. /nix/store/x56c85zcq6xlnvhwc2ksk4izma5bi3zy-glib-networking-2.76.1/lib/gio/modules/libgiolibproxy.so: undefined symbol: g_task_get_source_tag Failed to load module: /nix/store/x56c85zcq6xlnvhwc2ksk4izma5bi3zy-glib-networking-2.76.1/lib/gio/modules/libgiolibproxy.so /nix/store/x56c85zcq6xlnvhwc2ksk4izma5bi3zy-glib-networking-2.76.1/lib/gio/modules/libgiognutls.so: undefined symbol: g_byte_array_steal Failed to load module: /nix/store/x56c85zcq6xlnvhwc2ksk4izma5bi3zy-glib-networking-2.76.1/lib/gio/modules/libgiognutls.so /nix/store/x56c85zcq6xlnvhwc2ksk4izma5bi3zy-glib-networking-2.76.1/lib/gio/modules/libgiognomeproxy.so: undefined symbol: g_task_get_source_tag Failed to load module: /nix/store/x56c85zcq6xlnvhwc2ksk4izma5bi3zy-glib-networking-2.76.1/lib/gio/modules/libgiognomeproxy.so /nix/store/ysj1wc9q08gfrdk9ylncdx3r986vfqkj-dconf-0.40.0-lib/lib/gio/modules/libdconfsettings.so: undefined symbol: g_hash_table_get_keys_as_array Failed to load module: /nix/store/ysj1wc9q08gfrdk9ylncdx3r986vfqkj-dconf-0.40.0-lib/lib/gio/modules/libdconfsettings.so /nix/store/k10b8lrhsslsimd1p1ldf8f9vyhynch0-gvfs-1.50.6/lib/gvfs/libgvfscommon.so: undefined symbol: g_task_set_source_tag Failed to load module: /nix/store/k10b8lrhsslsimd1p1ldf8f9vyhynch0-gvfs-1.50.6/lib/gio/modules/libgioremote-volume-monitor.so /nix/store/k10b8lrhsslsimd1p1ldf8f9vyhynch0-gvfs-1.50.6/lib/gvfs/libgvfscommon.so: undefined symbol: g_task_set_source_tag Failed to load module: /nix/store/k10b8lrhsslsimd1p1ldf8f9vyhynch0-gvfs-1.50.6/lib/gio/modules/libgvfsdbus.so fsync: up and running. wine: Using setpriority to control niceness in the [-10,10] range 0034:fixme:winediag:LdrInitializeThunk wine-staging 8.0 is a testing version containing experimental patches. 0034:fixme:winediag:LdrInitializeThunk Please mention your exact version when filing bug reports on winehq.org. 0078:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005 0078:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005 0078:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005 0078:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005 Authorization required, but no authorization protocol specified 00e8:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded. 00e8:err:winediag:nodrv_CreateWindow L"The explorer process failed to start." 00e8:err:systray:initialize_systray Could not create tray window 0138:fixme:oleacc:find_class_data unhandled window class: L"#32769" 0138:fixme:uiautomation:uia_get_providers_for_hwnd Override provider callback currently unimplemented. 0138:fixme:uiautomation:msaa_provider_GetPropertyValue Unimplemented propertyId 30024 0138:fixme:uiautomation:msaa_fragment_get_FragmentRoot 000000000047EAB8, 000000000021FA90: stub! 0138:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded. 0138:err:winediag:nodrv_CreateWindow L"Make sure that your X server is running and that $DISPLAY is set correctly." 0138:err:tabtip:wWinMain Failed to create hwnd! 0024:fixme:thread:GetThreadUILanguage : stub, returning default language. 0024:fixme:nls:RtlGetThreadPreferredUILanguages 00000038, 005ED97C, 00000000 005ED9A8 0024:fixme:nls:get_dummy_preferred_ui_language (0x38 0x1000 005ED97C 00000000 005ED9A8) returning a dummy value (current locale) 0024:fixme:nls:RtlGetThreadPreferredUILanguages 00000038, 005ED97C, 015F19B0 005ED9A8 0024:fixme:nls:get_dummy_preferred_ui_language (0x38 0x1000 005ED97C 015F19B0 005ED9A8) returning a dummy value (current locale) 0024:fixme:nls:RtlSetThreadPreferredUILanguages 4, 005ED990, 005ED99C 0024:fixme:nls:RtlGetThreadPreferredUILanguages 00000038, 005ED97C, 00000000 005ED9A4 0024:fixme:nls:get_dummy_preferred_ui_language (0x38 0x1000 005ED97C 00000000 005ED9A4) returning a dummy value (current locale) 0024:fixme:nls:RtlGetThreadPreferredUILanguages 00000038, 005ED97C, 015F19C8 005ED9A4 0024:fixme:nls:get_dummy_preferred_ui_language (0x38 0x1000 005ED97C 015F19C8 005ED9A4) returning a dummy value (current locale) 0024:fixme:nls:RtlSetThreadPreferredUILanguages 0, 00000000, 005ED99C 0024:fixme:nls:RtlGetThreadPreferredUILanguages 00000038, 005ED97C, 00000000 005ED9A4 0024:fixme:nls:get_dummy_preferred_ui_language (0x38 0x1000 005ED97C 00000000 005ED9A4) returning a dummy value (current locale) 0024:fixme:nls:RtlGetThreadPreferredUILanguages 00000038, 005ED97C, 015F19C8 005ED9A4 0024:fixme:nls:get_dummy_preferred_ui_language (0x38 0x1000 005ED97C 015F19C8 005ED9A4) returning a dummy value (current locale) 0024:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded. 0024:err:winediag:nodrv_CreateWindow L"Make sure that your X server is running and that $DISPLAY is set correctly." 014c:fixme:thread:GetThreadUILanguage : stub, returning default language. 014c:fixme:nls:RtlGetThreadPreferredUILanguages 00000038, 0092D9C8, 00000000 0092D9F4 014c:fixme:nls:get_dummy_preferred_ui_language (0x38 0x1000 0092D9C8 00000000 0092D9F4) returning a dummy value (current locale) 014c:fixme:nls:RtlGetThreadPreferredUILanguages 00000038, 0092D9C8, 01A2A680 0092D9F4 014c:fixme:nls:get_dummy_preferred_ui_language (0x38 0x1000 0092D9C8 01A2A680 0092D9F4) returning a dummy value (current locale) 014c:fixme:nls:RtlSetThreadPreferredUILanguages 4, 0092D9DC, 0092D9E8 014c:fixme:nls:RtlGetThreadPreferredUILanguages 00000038, 0092D9C8, 00000000 0092D9F0 014c:fixme:nls:get_dummy_preferred_ui_language (0x38 0x1000 0092D9C8 00000000 0092D9F0) returning a dummy value (current locale) 014c:fixme:nls:RtlGetThreadPreferredUILanguages 00000038, 0092D9C8, 01A2A698 0092D9F0 014c:fixme:nls:get_dummy_preferred_ui_language (0x38 0x1000 0092D9C8 01A2A698 0092D9F0) returning a dummy value (current locale) 014c:fixme:nls:RtlSetThreadPreferredUILanguages 0, 00000000, 0092D9E8 014c:fixme:nls:RtlGetThreadPreferredUILanguages 00000038, 0092D9C8, 00000000 0092D9F0 014c:fixme:nls:get_dummy_preferred_ui_language (0x38 0x1000 0092D9C8 00000000 0092D9F0) returning a dummy value (current locale) 014c:fixme:nls:RtlGetThreadPreferredUILanguages 00000038, 0092D9C8, 01A2A698 0092D9F0 014c:fixme:nls:get_dummy_preferred_ui_language (0x38 0x1000 0092D9C8 01A2A698 0092D9F0) returning a dummy value (current locale) 014c:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded. 014c:err:winediag:nodrv_CreateWindow L"Make sure that your X server is running and that $DISPLAY is set correctly." 014c:fixme:wtsapi:WTSRegisterSessionNotification Stub 00000000 0x00000000 014c:fixme:uxtheme:BufferedPaintInit Stub () 014c:fixme:win:DisableProcessWindowsGhosting : stub 014c:fixme:graphics:ShutdownBlockReasonDestroy (00000000): stub 014c:fixme:graphics:ShutdownBlockReasonCreate (00000000, L"Installing"): stub 014c:fixme:graphics:ShutdownBlockReasonDestroy (00000000): stub ```

Steps To Reproduce

Steps to reproduce the behavior:

  1. protontricks <appid> shell then wine abc.exe or use protontricks-launch --appid <appid> abc.exe.
  2. See the above logs.

Expected behavior

A clear and concise description of what you expected to happen.

It launches wine programs correctly.

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

Add any other context about the problem here.

An older Discourse post from last year hitting the same issue: https://discourse.nixos.org/t/cannot-use-wine-graphical-interface-using-protontricks/23038

Notify maintainers

@kira-bruneau

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

% nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.4.7-zen1, NixOS, 23.11 (Tapir), 23.11.20230712.dirty`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.15.1`
 - nixpkgs: `/nix/store/jb8girm4k5db0waqv9qrd60xhq62x8iv-source`
soupglasses commented 10 months ago

https://forum.winehq.org/viewtopic.php?p=139472

This may be related to nvidia + libglvnd? I am still quite lost however.

$ protontricks 1222680 shell
protontricks (WARNING): Steam library folder /mnt/scrap/Launchers/Steam not found. Protontricks might not have access to the directory.
protontricks (WARNING): Current Steam Runtime not recognized by Protontricks.
/nix/store/qkph5n5i28pg3w794kw97n64adkvz91i-glib-networking-2.76.1/lib/gio/modules/libgiolibproxy.so: undefined symbol: g_task_get_source_tag
Failed to load module: /nix/store/qkph5n5i28pg3w794kw97n64adkvz91i-glib-networking-2.76.1/lib/gio/modules/libgiolibproxy.so
/nix/store/qkph5n5i28pg3w794kw97n64adkvz91i-glib-networking-2.76.1/lib/gio/modules/libgiognutls.so: undefined symbol: g_byte_array_steal
Failed to load module: /nix/store/qkph5n5i28pg3w794kw97n64adkvz91i-glib-networking-2.76.1/lib/gio/modules/libgiognutls.so
/nix/store/qkph5n5i28pg3w794kw97n64adkvz91i-glib-networking-2.76.1/lib/gio/modules/libgiognomeproxy.so: undefined symbol: g_task_get_source_tag
Failed to load module: /nix/store/qkph5n5i28pg3w794kw97n64adkvz91i-glib-networking-2.76.1/lib/gio/modules/libgiognomeproxy.so
/nix/store/vq039xns51anqyns9b6zpbxq03k556vv-dconf-0.40.0-lib/lib/gio/modules/libdconfsettings.so: undefined symbol: g_hash_table_get_keys_as_array
Failed to load module: /nix/store/vq039xns51anqyns9b6zpbxq03k556vv-dconf-0.40.0-lib/lib/gio/modules/libdconfsettings.so
/nix/store/5xnqqy2mwn3c1kx3zq85virhpfbpz544-gvfs-1.50.6/lib/gvfs/libgvfscommon.so: undefined symbol: g_task_set_source_tag
Failed to load module: /nix/store/5xnqqy2mwn3c1kx3zq85virhpfbpz544-gvfs-1.50.6/lib/gio/modules/libgioremote-volume-monitor.so
/nix/store/5xnqqy2mwn3c1kx3zq85virhpfbpz544-gvfs-1.50.6/lib/gvfs/libgvfscommon.so: undefined symbol: g_task_set_source_tag
Failed to load module: /nix/store/5xnqqy2mwn3c1kx3zq85virhpfbpz544-gvfs-1.50.6/lib/gio/modules/libgvfsdbus.so
------------------------------------------------------
warning: You are using a 64-bit WINEPREFIX. Note that many verbs only install 32-bit versions of packages. If you encounter problems, please retest in a clean 32-bit WINEPREFIX before reporting a bug.
------------------------------------------------------
Using winetricks 20230212 - sha256sum: f0874557d8c79f21299cb2e69709cc7323ef5bc1bee457fe9585bb431d5a2c29 with wine-8.0 and WINEARCH=win64
Executing cd /mnt/games/Steam/steamapps/compatdata/1222680/pfx/dosdevices/c:
$ DISPLAY=":1" WINEDEBUG=1 wine ~/Downloads/OriginSetup.exe
Authorization required, but no authorization protocol specified

022c:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
022c:err:winediag:nodrv_CreateWindow L"The explorer process failed to start."
022c:err:systray:initialize_systray Could not create tray window
0224:err:winediag:gnutls_process_attach failed to load libgnutls, no support for encryption
0224:err:winediag:process_attach failed to load libgnutls, no support for pfx import/export
026c:fixme:oleacc:find_class_data unhandled window class: L"#32769"
026c:fixme:uiautomation:uia_get_providers_for_hwnd Override provider callback currently unimplemented.
026c:fixme:uiautomation:msaa_provider_GetPropertyValue Unimplemented propertyId 30024
026c:fixme:uiautomation:msaa_fragment_get_FragmentRoot 0000000000467168, 000000000021FA90: stub!
026c:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
026c:err:winediag:nodrv_CreateWindow L"Make sure that your X server is running and that $DISPLAY is set correctly."
026c:err:tabtip:wWinMain Failed to create hwnd!
0224:err:kerberos:kerberos_LsaApInitializePackage no Kerberos support, expect problems
0224:err:ntlm:ntlm_LsaApInitializePackage no NTLM support, expect problems
0224:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
0224:err:winediag:nodrv_CreateWindow L"Make sure that your X server is running and that $DISPLAY is set correctly."
0224:err:d3d:wined3d_caps_gl_ctx_create Failed to create a window.
0224:err:d3d:wined3d_adapter_gl_init Failed to get a GL context for adapter 023C4858.
0224:err:d3d:wined3d_caps_gl_ctx_create Failed to create a window.
0224:err:d3d:wined3d_adapter_gl_init Failed to get a GL context for adapter 023F4440.
0224:err:d3d:wined3d_caps_gl_ctx_create Failed to create a window.
0224:err:d3d:wined3d_adapter_gl_init Failed to get a GL context for adapter 023E6188.
0224:err:d3d:wined3d_caps_gl_ctx_create Failed to create a window.
0224:err:d3d:wined3d_adapter_gl_init Failed to get a GL context for adapter 023E6188.
0224:err:d3d:wined3d_caps_gl_ctx_create Failed to create a window.
0224:err:d3d:wined3d_adapter_gl_init Failed to get a GL context for adapter 023F4F50.
0224:err:d3d:wined3d_caps_gl_ctx_create Failed to create a window.
0224:err:d3d:wined3d_adapter_gl_init Failed to get a GL context for adapter 023E6188.
0224:err:d3d:wined3d_caps_gl_ctx_create Failed to create a window.
0224:err:d3d:wined3d_adapter_gl_init Failed to get a GL context for adapter 023E6188.
0224:fixme:ver:GetCurrentPackageId (01BCF218 00000000): stub
0224:fixme:ver:GetCurrentPackageId (01BCF2D4 00000000): stub
027c:fixme:kernelbase:AppPolicyGetThreadInitializationType FFFFFFFA, 081DFEF4
0224:fixme:netprofm:connection_point_Advise 0242B2F8, 023E8A94, 023E8AFC - semi-stub
0224:fixme:netprofm:list_manager_GetConnectivity 0242B2D8, 01BCF910
0298:fixme:toolhelp:CreateToolhelp32Snapshot Unimplemented: heap list snapshot
0298:fixme:toolhelp:Heap32ListFirst : stub
0298:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION
0298:err:bcrypt:key_asymmetric_create no encryption support
0298:err:bcrypt:key_asymmetric_create no encryption support
0298:err:bcrypt:key_asymmetric_create no encryption support
0298:err:bcrypt:key_asymmetric_create no encryption support
0298:err:bcrypt:key_asymmetric_create no encryption support
0298:err:bcrypt:key_asymmetric_create no encryption support
0298:err:bcrypt:key_asymmetric_create no encryption support
0298:err:bcrypt:key_asymmetric_create no encryption support
0298:err:bcrypt:key_asymmetric_create no encryption support
0298:err:bcrypt:key_asymmetric_create no encryption support
0298:err:bcrypt:key_asymmetric_create no encryption support
0298:err:bcrypt:key_asymmetric_create no encryption support
0298:err:bcrypt:key_asymmetric_create no encryption support
0298:err:bcrypt:key_asymmetric_create no encryption support
0298:err:bcrypt:key_asymmetric_create no encryption support
0298:err:bcrypt:key_asymmetric_create no encryption support
0298:err:bcrypt:key_asymmetric_create no encryption support
0298:err:bcrypt:key_asymmetric_create no encryption support
0298:err:bcrypt:key_asymmetric_create no encryption support
0298:err:bcrypt:key_asymmetric_create no encryption support
0298:err:bcrypt:key_asymmetric_create no encryption support
0298:err:bcrypt:key_asymmetric_create no encryption support
0298:err:bcrypt:key_asymmetric_create no encryption support
0298:err:bcrypt:key_asymmetric_create no encryption support
0298:err:bcrypt:key_asymmetric_create no encryption support
0298:err:bcrypt:key_asymmetric_create no encryption support
0298:err:bcrypt:key_asymmetric_create no encryption support
0298:err:bcrypt:key_asymmetric_create no encryption support
0298:err:bcrypt:key_asymmetric_create no encryption support
0298:err:bcrypt:key_asymmetric_create no encryption support
0298:err:bcrypt:key_asymmetric_create no encryption support
0298:err:bcrypt:key_asymmetric_create no encryption support
0298:err:bcrypt:key_asymmetric_create no encryption support
0298:err:bcrypt:key_asymmetric_create no encryption support
0298:err:bcrypt:key_asymmetric_create no encryption support
0298:err:bcrypt:key_asymmetric_create no encryption support
0298:err:bcrypt:key_asymmetric_create no encryption support
0224:fixme:font:NtGdiRemoveFontMemResourceEx (0xf953cf31) stub
0224:fixme:font:NtGdiRemoveFontMemResourceEx (0xf95e9eb1) stub
0224:fixme:font:NtGdiRemoveFontMemResourceEx (0xf95a5de1) stub
0224:fixme:font:NtGdiRemoveFontMemResourceEx (0x70f9f331) stub
0224:fixme:font:NtGdiRemoveFontMemResourceEx (0x70fc3331) stub
0224:fixme:font:NtGdiRemoveFontMemResourceEx (0x70f34331) stub
0224:fixme:font:NtGdiRemoveFontMemResourceEx (0x70f7f331) stub
0224:fixme:font:NtGdiRemoveFontMemResourceEx (0x70ea1331) stub
0224:fixme:font:NtGdiRemoveFontMemResourceEx (0x70eea331) stub
0224:fixme:font:NtGdiRemoveFontMemResourceEx (0x70ede331) stub
0224:fixme:font:NtGdiRemoveFontMemResourceEx (0x700fd331) stub
0224:fixme:font:NtGdiRemoveFontMemResourceEx (0x705bb331) stub
0224:fixme:nls:RtlGetThreadPreferredUILanguages 00000038, 01BCD318, 00000000 01BCD31C
0224:fixme:nls:get_dummy_preferred_ui_language (0x38 0x1000 01BCD318 00000000 01BCD31C) returning a dummy value (current locale)
0224:fixme:nls:RtlGetThreadPreferredUILanguages 00000038, 01BCD318, 0A7D49F0 01BCD31C
0224:fixme:nls:get_dummy_preferred_ui_language (0x38 0x1000 01BCD318 0A7D49F0 01BCD31C) returning a dummy value (current locale)
0224:fixme:winsock:WSALookupServiceBeginW (01BCCFA0 0xff0 01BCCFE0) Stub!
FozzieHi commented 10 months ago

I am experiencing something similar. GUIs won't open when using protontricks, so you cannot install any winetricks which require a GUI installer, such as physx.

acuteaura commented 7 months ago

Experiencing a very similar issue with NVIDIA + protontricks (in optimus sync and offload modes). It seems to be unable to find $XAUTHORITY (Authorization required, but no authorization protocol specified seems to be a common error in broken xrdp and WSL setups where $XAUTHORITY is broken)

acuteaura commented 7 months ago

It seems to be related to bwrap and the environment getting lost somewhere, --no-bwrap sort of fixes the issue, except if you try to run something in a wineprefix that already has a wineserver running, the processes wouldn't be aware of each other.

acuteaura commented 7 months ago

This can probably be closed, it was a bug in protontricks <1.11.0, and that version is not on unstable.

Kabouik commented 6 months ago

I am experiencing the same issue with Protontricks 1.11.0 installed from Flatpak. Using --no-bwrap does help (thanks).