Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 933075 - games-emulation/ryujinx-1.1.1221: crash if the environment variable GDK_BACKEND is set to "wayland" on wayland systems.
Summary: games-emulation/ryujinx-1.1.1221: crash if the environment variable GDK_BACKE...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal minor
Assignee: dotnet project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-28 15:52 UTC by Xuesong Yan
Modified: 2024-05-30 13:15 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Xuesong Yan 2024-05-28 15:52:36 UTC
Ryujinx is not a native wayland application. Indeed, there is a open issue on their github repo (https://github.com/Ryujinx/Ryujinx/issues/5566) on the request of native wayland support. 

Even the environment variable GDK_BACKEND is set to "wayland", the emulator can boot games without problems. However, UI interactions might crash the emulator.

Reproducible: Always

Steps to Reproduce:
1. export GDK_BACKEND=wayland
2. run the Ryujinx.sh
3. right click a game in your game list, select "Manage DLC"
4. left click the "Add" button in popup window
Actual Results:  
The emulator crashed with following outputs on terminal,

"
Unhandled exception. System.InvalidOperationException: Neither DBus nor GTK are available on the system
   at Avalonia.X11.NativeDialogs.CompositeStorageProvider.EnsureStorageProvider()
   at Avalonia.X11.NativeDialogs.CompositeStorageProvider.OpenFilePickerAsync(FilePickerOpenOptions options)
   at Ryujinx.Ava.UI.ViewModels.DownloadableContentManagerViewModel.Add() in /var/tmp/portage/games-emulation/ryujinx-1.1.1221/work/Ryujinx-1.1.1221/src/Ryujinx/UI/ViewModels/DownloadableContentManagerViewModel.cs:line 205
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)
   at Avalonia.Threading.SendOrPostCallbackDispatcherOperation.InvokeCore()
   at Avalonia.Threading.DispatcherOperation.Execute()
   at Avalonia.Threading.Dispatcher.ExecuteJob(DispatcherOperation job)
   at Avalonia.Threading.Dispatcher.ExecuteJobsCore(Boolean fromExplicitBackgroundProcessingCallback)
   at Avalonia.Threading.Dispatcher.Signaled()
   at Avalonia.X11.X11PlatformThreading.CheckSignaled()
   at Avalonia.X11.X11PlatformThreading.RunLoop(CancellationToken cancellationToken)
   at Avalonia.Threading.DispatcherFrame.Run(IControlledDispatcherImpl impl)
   at Avalonia.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   at Avalonia.Threading.Dispatcher.MainLoop(CancellationToken cancellationToken)
   at Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.Start(String[] args)
   at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime(AppBuilder builder, String[] args, ShutdownMode shutdownMode)
   at Ryujinx.Ava.Program.Main(String[] args) in /var/tmp/portage/games-emulation/ryujinx-1.1.1221/work/Ryujinx-1.1.1221/src/Ryujinx/Program.cs:line 51
"

Expected Results:  
The emulator should not crash.

I suggest the Ryujinx.sh should be modified to enforce the program running under 
Xwayland/X11 environments until the upstream closes the issue "https://github.com/Ryujinx/Ryujinx/issues/5566". Inserts a line "export GDK_BACKEND=x11" into the script should be enough to fix the problem.
Comment 1 Maciej Barć gentoo-dev 2024-05-30 12:00:24 UTC
(In reply to Xuesong Yan from comment #0)

> Steps to Reproduce:
> 1. export GDK_BACKEND=wayland
> 2. run the Ryujinx.sh
> 3. right click a game in your game list, select "Manage DLC"
> 4. left click the "Add" button in popup window
> Actual Results:  
> The emulator crashed with following outputs on terminal,

Does this work correctly with GDK_BACKEND=x11 ?

Please report that the described interaction crashes the emaulator also on the Github issues as that issues only mentions **warnings** thrown by the app.
Comment 2 Larry the Git Cow gentoo-dev 2024-05-30 13:15:50 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cc069f21b92632de0ae10a43cde8fbdfa19535b2

commit cc069f21b92632de0ae10a43cde8fbdfa19535b2
Author:     Maciej Barć <xgqt@gentoo.org>
AuthorDate: 2024-05-30 12:15:52 +0000
Commit:     Maciej Barć <xgqt@gentoo.org>
CommitDate: 2024-05-30 13:15:47 +0000

    games-emulation/ryujinx: force x11 GDK_BACKEND
    
    Closes: https://bugs.gentoo.org/933075
    Signed-off-by: Maciej Barć <xgqt@gentoo.org>

 .../ryujinx/{ryujinx-1.1.1221.ebuild => ryujinx-1.1.1221-r1.ebuild}   | 4 ++++
 1 file changed, 4 insertions(+)