SMAPI - Stardew Modding API

SMAPI - Stardew Modding API

2M Downloads

SMAPI Fails to use an exposed GPU therefor it causes high CPU util

DaanSelen opened this issue ยท 2 comments

commented

Describe the bug
SMAPI does not utilize (for my bug inside a docker container) the GPU exposed to the environment. It renders everything on the CPU which causes very very high CPU usage

Reference: printfuck/stardew-multiplayer-docker#44

To Reproduce
Run either the modded Stardew servers:
https://github.com/DaanSelen/stardew-multiplayer-server
https://github.com/printfuck/stardew-multiplayer-docker

Notice the CPU usage while running.

Log file

[14:22:23 INFO  SMAPI] SMAPI 4.2.1 with Stardew Valley 1.6.15 build 24356 on Unix 6.1.0.32
[14:22:23 INFO  SMAPI] Mods go here: /data/stardewvalley/Mods
[14:22:23 TRACE SMAPI] Log started at 2025-04-22T14:22:23 UTC
[14:22:31 DEBUG SMAPI] Waiting for game to launch...
[14:22:32 TRACE game] Instance_Initialize() finished, elapsed = '00:00:00.9441305'
[14:22:34 DEBUG SMAPI] Loading mod metadata...
[14:22:34 DEBUG SMAPI] Loading mods...
[14:22:35 TRACE SMAPI]    Console Commands (from Mods/ConsoleCommands/ConsoleCommands.dll, ID: SMAPI.ConsoleCommands, assembly version: 4.2.1)...
[14:22:36 TRACE SMAPI]    Save Backup (from Mods/SaveBackup/SaveBackup.dll, ID: SMAPI.SaveBackup, assembly version: 4.2.1)...
[14:22:36 TRACE SMAPI]       Detected direct console access (System.Console type) in assembly SaveBackup.dll.
[14:22:36 TRACE SMAPI]    Auto Load Game (from Mods/AutoLoadGame/AutoLoadGame.dll, ID: caraxian.AutoLoadGame, assembly version: 1.0.1)...
[14:22:36 TRACE SMAPI]       Rewrote AutoLoadGame.dll to fix 32-bit architecture...
[14:22:36 TRACE SMAPI]    Always On Server (from Mods/AlwaysOnServer/Always On Server.dll, ID: mikko.Always_On_Server, assembly version: 1.0.0)...
[14:22:36 TRACE SMAPI]       Detected reference to StardewModdingAPI.Events.ISpecializedEvents.UnvalidatedUpdateTicked event in assembly Always On Server.dll.
[14:22:36 TRACE SMAPI]    Skip Intro (from Mods/SkipIntro/SkipIntro.dll, ID: Pathoschild.SkipIntro, assembly version: 1.9.22)...
[14:22:36 TRACE SMAPI]    No Fence Decay Redux (from Mods/NoFenceDecayRedux/No Fence Decay - Redux.dll, ID: EnderTedi.NoFenceDecayRedux, assembly version: 1.2.0)...
[14:22:36 TRACE SMAPI]       Detected game patcher in assembly No Fence Decay - Redux.dll.
[14:22:36 TRACE SMAPI]    Unlimited Players by Armitxes (from Mods/UnlimitedPlayers/UnlimitedPlayers.dll, ID: Armitxes.UnlimitedPlayers, assembly version: 2024.4.16)...
[14:22:36 TRACE SMAPI]    DefaultOnCheats (from Mods/DefaultOnCheats/DefaultOnCheats.dll, ID: EnderTedi.DefaultOnCheats, assembly version: 1.0.0)...
[14:22:36 TRACE SMAPI]    Automate (from Mods/Automate/Automate.dll, ID: Pathoschild.Automate, assembly version: 2.3.4)...
[14:22:36 TRACE SMAPI]    Multi-User Chest (from Mods/Multi-UserChest/Multi-User Chest.dll, ID: MindMeltMax.MUC, assembly version: 1.0.0)...
[14:22:36 TRACE SMAPI]    Non Destructive NPCs - 1.6 Unofficial update (from Mods/NonDestructiveNPCs/NonDestructiveNPCs.dll, ID: IamSaulC.NonDestructiveNPCs, assembly version: 1.0.0)...
[14:22:36 TRACE SMAPI]       Detected game patcher in assembly NonDestructiveNPCs.dll.
[14:22:36 INFO  SMAPI] Loaded 11 mods:
[14:22:36 INFO  SMAPI]    Always On Server 1.20.3-unofficial.4-mikkoperkele by funny-snek & Zuberii | A Headless server mod.
[14:22:36 INFO  SMAPI]    Auto Load Game 1.0.2 by Caraxian | Automatically load a save file when starting.
[14:22:36 INFO  SMAPI]    Automate 2.3.4 by Pathoschild | Lets you automate crafting machines, fruit trees, and more by connecting them to chests.
[14:22:36 INFO  SMAPI]    Console Commands 4.2.1 by SMAPI | Adds SMAPI console commands that let you manipulate the game.
[14:22:36 INFO  SMAPI]    DefaultOnCheats 1.0.0 by EnderTedi | Enable debug commands in chat by default instead of having to use debug togglecheats.
[14:22:36 INFO  SMAPI]    Multi-User Chest 1.0.10 by MindMeltMax | Allows multiple people to open a chest at the same time
[14:22:36 INFO  SMAPI]    No Fence Decay Redux 1.2.0 by EnderTedi | Stops Fence Decay From Occuring
[14:22:36 INFO  SMAPI]    Non Destructive NPCs - 1.6 Unofficial update 1.6.0 by Madara Uchiha - IamSaulC | NPCs no longer destroy placed objects in their paths. They would instead pass through them.
[14:22:36 INFO  SMAPI]    Save Backup 4.2.1 by SMAPI | Automatically backs up all your saves once per day into its folder.
[14:22:36 INFO  SMAPI]    Skip Intro 1.9.22 by Pathoschild | Skips the game's loading intro.
[14:22:36 INFO  SMAPI]    Unlimited Players by Armitxes 2024.4.16 by Armitxes | Remove the maximum player restrictions, build endless cabins.

[14:22:36 INFO  SMAPI]    Patched game code
[14:22:36 INFO  SMAPI]    --------------------------------------------------
[14:22:36 INFO  SMAPI]       These mods directly change the game code. They're more likely to cause errors or bugs in-game; if
[14:22:36 INFO  SMAPI]       your game has issues, try removing these first. Otherwise you can ignore this warning.

[14:22:36 INFO  SMAPI]       - No Fence Decay Redux
[14:22:36 INFO  SMAPI]       - Non Destructive NPCs - 1.6 Unofficial update

[14:22:36 INFO  SMAPI]    Bypassed safety checks
[14:22:36 INFO  SMAPI]    --------------------------------------------------
[14:22:36 INFO  SMAPI]       These mods bypass SMAPI's normal safety checks, so they're more likely to cause errors or save
[14:22:36 INFO  SMAPI]       corruption. If your game has issues, try removing these first.

[14:22:36 INFO  SMAPI]       - Always On Server

[14:22:36 TRACE SMAPI]    Direct console access
[14:22:36 TRACE SMAPI]    --------------------------------------------------
[14:22:36 TRACE SMAPI]       These mods access the SMAPI console window directly. This is more fragile, and their output may not
[14:22:36 TRACE SMAPI]       be logged by SMAPI.

[14:22:36 TRACE SMAPI]       - Save Backup

[14:22:36 DEBUG SMAPI]    No update keys
[14:22:36 DEBUG SMAPI]    --------------------------------------------------
[14:22:36 DEBUG SMAPI]       These mods have no update keys in their manifest. SMAPI may not notify you about updates for these
[14:22:36 DEBUG SMAPI]       mods. Consider notifying the mod authors about this problem.

[14:22:36 DEBUG SMAPI]       - Non Destructive NPCs - 1.6 Unofficial update

[14:22:36 DEBUG SMAPI] Launching mods...
[14:22:36 TRACE Save Backup] Backed up to /data/stardewvalley/save-backups/2025-04-22 - SMAPI 4.2.1 with Stardew Valley 1.6.15.zip.
[14:22:36 INFO  Unlimited Players by Armitxes] Default player limit set to 10 players.
[14:22:36 TRACE SMAPI]    Found mod-provided API (Pathoschild.Stardew.Automate.Framework.AutomateAPI).
[14:22:36 DEBUG SMAPI] Mods loaded and ready!
[14:22:36 TRACE SMAPI] Checking for updates...
[14:22:37 TRACE game] setGameMode( 'titleScreenGameMode (0)' )
[14:22:37 TRACE game] path '/config/.config/StardewValley/startup_preferences' did not exist and will be created
[14:22:37 TRACE game] Instance_LoadContent() finished, elapsed = '00:00:05.3199930'
[14:22:37 TRACE SMAPI]    SMAPI okay.
[14:22:37 TRACE SMAPI]    Checking for updates to 9 mods...
[14:22:37 ERROR game] Oops! Steam achievements won't work because Steam isn't loaded. You can launch the game through Steam to fix that.
[14:22:37 INFO  SMAPI] Type 'help' for help, or 'help <cmd>' for a command's usage
[14:22:37 TRACE SMAPI] Got update-check errors for some mods:
   Unlimited Players by Armitxes: The CurseForge mod with ID '362847' has no valid versions.
[14:22:37 TRACE SMAPI]    All mods up to date.
[14:22:38 INFO  Unlimited Players by Armitxes]
[SERVER] Adjusting limit to 10 players.
[14:22:38 INFO  Auto Load Game] Loading Save: Mada_403718528
[14:22:38 TRACE game] gameMode was 'titleScreenGameMode (0)', set to 'loadingMode (6)'.
[14:22:38 TRACE SMAPI] Game loader synchronizing...
[14:22:38 TRACE game] getLoadEnumerator('Mada_403718528')
[14:22:38 TRACE SMAPI] Synchronizing 'Load_ReadSave' task...
[14:22:40 TRACE game] Successfully loaded ContentHashes.json containing 3560 file(s);
[14:22:40 TRACE game] EnsureManifestInitialized() finished, elapsed = '00:00:00.0089444'
[14:22:41 TRACE SMAPI]    task complete.
[14:22:41 TRACE SMAPI] Synchronizing 'Load_LoadForNewGame' task...
[14:22:44 TRACE SMAPI]    task complete.
[14:22:44 TRACE SMAPI] Synchronizing 'Load_Farmer' task...
[14:22:44 TRACE SMAPI]    task complete.
[14:22:44 TRACE SMAPI] Synchronizing 'Load_Locations' task...
[14:22:45 TRACE SMAPI]    task complete.
[14:22:45 TRACE game] Starting server. Protocol version: 1.6.15
[14:22:45 TRACE game] Starting LAN server
[14:22:45 TRACE game] gameMode was 'loadingMode (6)', set to 'playingGameMode (3)'.
... (10 lines left)

Screenshots
Image

Thanks in advance. I have reached out in the Discord:
https://discord.com/channels/137344473976799233/1364246592261193750

Sorry for the long message.

commented

Hi! So far as I know, SMAPI can't ask to be run on the GPU since that's decided by the OS and graphics drivers. That's why the wiki instructions have you change a system setting for it.

I'll close this since there's nothing SMAPI itself can do about the system's GPU selection, but:

We also have some Linux users on Discord, so they may be able to help with the Linux issue.