Linux Wayland Arch Linux, Unable to Launch

usaradark

Greenhorn
I finally got around to trying out this game. However, I can't even launch the game. No window appears or anything. When I press the Play button on steam, it thinks for a bit, is "running", then then returns to Play about 3 seconds later. I have tried both native and compatibility mode, both cannot launch the game.

OS: Arch Linux
Environment: Hyprland (Wayland)
Version: whatever the latest version of the game is from Steam as of 2024/11/5
CPU: Intel Core i5-9600K
GPU: NVIDIA GeForce RTX 4060 Ti 16GB

I've seen people say "make sure you have dotnet installed", albeit for Windows machines. If anything, here's my dotnet versions on my distro.
Code:
 paru -Q | grep dotnet
dotnet-host 8.0.10.sdk110-1
dotnet-runtime 8.0.10.sdk110-1
dotnet-sdk 8.0.10.sdk110-1
dotnet-targeting-pack 8.0.10.sdk110-1
I have two monitors, one is flipped portrait. I know in the past I've had some issues where a game will prioritize and fullscreen to my portrait, but it has never outright failed to launch like this.

Below is the traceback returned when trying to execute the `./Stardew Valley` script.
Code:
 ./Stardew\ Valley
Unhandled exception. Microsoft.Xna.Framework.Graphics.NoSuitableGraphicsDeviceException: Failed to create graphics device!
 ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at MonoGame.OpenGL.GL.LoadExtensions() in D:\GitlabRunner\builds\Gq5qA5P4\1\ConcernedApe\stardewvalley\MonoGame.Desktop\MonoGame.Framework\Platform\Graphics\OpenGL.cs:line 1444
   at MonoGame.OpenGL.GraphicsContext..ctor(IWindowInfo info) in D:\GitlabRunner\builds\Gq5qA5P4\1\ConcernedApe\stardewvalley\MonoGame.Desktop\MonoGame.Framework\Platform\Graphics\GraphicsContext.SDL.cs:line 49
   at Microsoft.Xna.Framework.Graphics.GraphicsDevice.PlatformSetup() in D:\GitlabRunner\builds\Gq5qA5P4\1\ConcernedApe\stardewvalley\MonoGame.Desktop\MonoGame.Framework\Platform\Graphics\GraphicsDevice.OpenGL.cs:line 252
   at Microsoft.Xna.Framework.Graphics.GraphicsDevice.Setup() in D:\GitlabRunner\builds\Gq5qA5P4\1\ConcernedApe\stardewvalley\MonoGame.Desktop\MonoGame.Framework\Graphics\GraphicsDevice.cs:line 297
   at Microsoft.Xna.Framework.Graphics.GraphicsDevice..ctor(GraphicsAdapter adapter, GraphicsProfile graphicsProfile, Boolean preferHalfPixelOffset, PresentationParameters presentationParameters) in D:\GitlabRunner\builds\Gq5qA5P4\1\ConcernedApe\stardewvalley\MonoGame.Desktop\MonoGame.Framework\Graphics\GraphicsDevice.cs:line 273
   at Microsoft.Xna.Framework.GraphicsDeviceManager.CreateDevice(GraphicsDeviceInformation gdi) in D:\GitlabRunner\builds\Gq5qA5P4\1\ConcernedApe\stardewvalley\MonoGame.Desktop\MonoGame.Framework\GraphicsDeviceManager.cs:line 144
   at Microsoft.Xna.Framework.GraphicsDeviceManager.CreateDevice() in D:\GitlabRunner\builds\Gq5qA5P4\1\ConcernedApe\stardewvalley\MonoGame.Desktop\MonoGame.Framework\GraphicsDeviceManager.cs:line 115
   --- End of inner exception stack trace ---
   at Microsoft.Xna.Framework.GraphicsDeviceManager.CreateDevice() in D:\GitlabRunner\builds\Gq5qA5P4\1\ConcernedApe\stardewvalley\MonoGame.Desktop\MonoGame.Framework\GraphicsDeviceManager.cs:line 123
   at Microsoft.Xna.Framework.Game.DoInitialize() in D:\GitlabRunner\builds\Gq5qA5P4\1\ConcernedApe\stardewvalley\MonoGame.Desktop\MonoGame.Framework\Game.cs:line 941
   at Microsoft.Xna.Framework.Game.Run(GameRunBehavior runBehavior) in D:\GitlabRunner\builds\Gq5qA5P4\1\ConcernedApe\stardewvalley\MonoGame.Desktop\MonoGame.Framework\Game.cs:line 465
   at StardewValley.Program.Main(String[] args) in D:\GitlabRunner\builds\Gq5qA5P4\1\ConcernedApe\stardewvalley\Farmer\Farmer\Program.cs:line 219
zsh: IOT instruction (core dumped)  ./Stardew\ Valley
I have no error logs under `~/.config/StardewValley`.
 

usaradark

Greenhorn
I removed the entirety of my zshrc and zprofile and the game launches. Currently looking to debug what's causing it...
 

usaradark

Greenhorn
It seems that commenting this out seems to resolve the issue.

Code:
# Force applications to use wayland
export GDB_BACKEND=wayland,x11,*
export SDL_VIDEODRIVER=wayland
export CLUTTER_BACKEND=wayland
I can't remember why I had this in here. Obviously it seems that it was here to force applications to use wayland, but it seems that it will get in the way for Stardew Valley. Perhaps someone can enlighten me on what's going on here.
 

RuniTails

Greenhorn
So I have the same issue (hyprland/wayland/arch linux).

I got the game to launch by setting SDL_VIDEODRIVER to x11 in steam launch options: SDL_VIDEODRIVER=x11 %command%. Using gamemoderun makes window constantly reopen.

My error log is basically the same (I found logs in ~/.local/share/StardewValley/ErrorLogs/)
Code:
Message: Failed to create graphics device!
InnerException: System.NullReferenceException: Object reference not set to an instance of an object.
   at MonoGame.OpenGL.GL.LoadExtensions() in D:\GitlabRunner\builds\Gq5qA5P4\1\ConcernedApe\stardewvalley\MonoGame.Desktop\MonoGame.Framework\Platform\Graphics\OpenGL.cs:line 1444
   at MonoGame.OpenGL.GraphicsContext..ctor(IWindowInfo info) in D:\GitlabRunner\builds\Gq5qA5P4\1\ConcernedApe\stardewvalley\MonoGame.Desktop\MonoGame.Framework\Platform\Graphics\GraphicsContext.SDL.cs:line 49
   at Microsoft.Xna.Framework.Graphics.GraphicsDevice.PlatformSetup() in D:\GitlabRunner\builds\Gq5qA5P4\1\ConcernedApe\stardewvalley\MonoGame.Desktop\MonoGame.Framework\Platform\Graphics\GraphicsDevice.OpenGL.cs:line 252
   at Microsoft.Xna.Framework.Graphics.GraphicsDevice.Setup() in D:\GitlabRunner\builds\Gq5qA5P4\1\ConcernedApe\stardewvalley\MonoGame.Desktop\MonoGame.Framework\Graphics\GraphicsDevice.cs:line 297
   at Microsoft.Xna.Framework.Graphics.GraphicsDevice..ctor(GraphicsAdapter adapter, GraphicsProfile graphicsProfile, Boolean preferHalfPixelOffset, PresentationParameters presentationParameters) in D:\GitlabRunner\builds\Gq5qA5P4\1\ConcernedApe\stardewvalley\MonoGame.Desktop\MonoGame.Framework\Graphics\GraphicsDevice.cs:line 273
   at Microsoft.Xna.Framework.GraphicsDeviceManager.CreateDevice(GraphicsDeviceInformation gdi) in D:\GitlabRunner\builds\Gq5qA5P4\1\ConcernedApe\stardewvalley\MonoGame.Desktop\MonoGame.Framework\GraphicsDeviceManager.cs:line 144
   at Microsoft.Xna.Framework.GraphicsDeviceManager.CreateDevice() in D:\GitlabRunner\builds\Gq5qA5P4\1\ConcernedApe\stardewvalley\MonoGame.Desktop\MonoGame.Framework\GraphicsDeviceManager.cs:line 115
Stack Trace:    at Microsoft.Xna.Framework.GraphicsDeviceManager.CreateDevice() in D:\GitlabRunner\builds\Gq5qA5P4\1\ConcernedApe\stardewvalley\MonoGame.Desktop\MonoGame.Framework\GraphicsDeviceManager.cs:line 123
   at Microsoft.Xna.Framework.Game.DoInitialize() in D:\GitlabRunner\builds\Gq5qA5P4\1\ConcernedApe\stardewvalley\MonoGame.Desktop\MonoGame.Framework\Game.cs:line 941
   at Microsoft.Xna.Framework.Game.Run(GameRunBehavior runBehavior) in D:\GitlabRunner\builds\Gq5qA5P4\1\ConcernedApe\stardewvalley\MonoGame.Desktop\MonoGame.Framework\Game.cs:line 465
   at StardewValley.Program.Main(String[] args) in D:\GitlabRunner\builds\Gq5qA5P4\1\ConcernedApe\stardewvalley\Farmer\Farmer\Program.cs:line 219

Game Version: 1.6.11 build 24311
SDK Helper: SteamHelper
Game Language: en
GPU: Could not detect.
OS: Unix Unix 6.6.59.1
In 1.6.9 changelog there is also this change:
### Technical changes
* Migrated from FAudio to OpenAL, which should improve performance when playing audio.
* Updated SDL from 2.0.x to 2.30.4 (used for input and windowing).
* Fixed compatibility with newer Windows systems when using some older GPUs.
I think SDL 2.30.4 has some issue with finding the gpu when on wayland, but works fine on X11/XWayland. Maybe some opengl extension fails to load?
 

Sewer56

Newcomer
Just made an account to say thanks, absolute legend.
It was `SDL_VIDEODRIVER=wayland`, I was forcing Wayland onto SDL programs, since that was needed during the earlier days, i.e. 2-3 years ago.

I'll chuck it on the modding Wiki, since it's one of the first search results, in case anyone also stumbles into this.
In my case, I was on `1.6.15`, GOG Release.
 
Last edited:
Top