Solved [HELP] Controller not working in Stardew on Mac

Bob_Piss

Newcomer
Hello!

I use a mac (only when traveling, I swear) and my Xbox One controller. It is paired and works without incident on all other games I've used it with. However, it does not work at all on Stardew Valley. I have tried extensive troubleshooting and I'm still not able to get it to work. I have enabled Big Picture, set the Xbox Controller configuration and tried Generic as well, toggles various controller Global settings (Always on, default, etc), tried using other people's existing mappings, default mappings, everything. It still does not work. The controller is active while the game is running (center button brings up overlay), but still does not register in game. I'm on MacOS Big Sur, 11.2.1, MacBook Pro.

I was able to get it working successfully on my gfs Macbook Air, but nothing on mine.

ANY ADVICE?

PLZ HELP. PLEASE.
 

Jbave

Greenhorn
Looks like his file link is restricted now, so I've reuploaded. Let's try this again. I've copied the instructions below and updated the link.

Ok so I faced the same issue. The main issue I believe is due to the fact that the StardewValley game is using an SDL library which is failing to detect the controllers.
If your controller is detected in Steam, Here is what you can do to get it working again:

  1. Disable Steam Input for the Game (Steam -> Stardew-Valley -> Properties -> Controllers -> Disable Steam Input)
  2. Go to Properties -> Local Files -> Browse
  3. Inside Contents/MacOS (Full Path would be ~/Library/Application Support/Steam/steamapps/common/Stardew Valley/Contents/MacOS) replace the libSDL2.dylib file with this version
  4. You will need to go to System Preferences, Security and Privacy, General Tab, and then when you try to use it the first time it will not let you because it's not approved. Hit approve in this location when it shows up and you're away.
After that the controller should be detected correctly.
 

chattervast

Newcomer
Update for those who are on mac intel and above methods worked and then stopped working.

Every time I play on either my mac mini or macbook with a controller I have to unpair the controller, add it, and check that the libSDL2.dylib is in place. After a few times, the controller didn't work for stardew anymore even though libSDL2.dylib was in place. The file would randomly be removed every day or so and now I saw a new file (maybe per an update?) that was called libSDL2-2.0.0.dylib . If you download the above mentioned file (and keep it on hand just in case!) you can rename libSDL2.dylib to libSDL2-2.0.0.dylib and replace that file and your controller should start working again.

To recap the long steam thread, mac changed from kext files for controller input to a new framework called driverkit. Valve didnt make an update to driverkit so thats why we have issues. If you're like me, going to that steam thread and running kmutil (which has also been updated since) you may find that you dont have a SteamInput.kext in the /Library/Extensions folder. I haven't found a way to get this file by itself. Even though a kext file is a security issue, I'm still looking for that freestanding file. If you're reading this and found you have SteamInput.kext in your library extensions folder, could you perhaps share it with those who do not have it?

I hope this helps someone else as this seems to be an ongoing and evolving issues. Regarding libSDL2.dylib, I expect to check it for naming updates every day until it stops getting deleted.
 

EmilyStinks

Newcomer
Confirming this fix for those who find it in the future: if you have an M1 chip in your MacBook, I was able to fix this by first disabling Steam Input as described above, then uninstalling and reinstalling Stardew Valley. My controller worked again without having to swap dylib files or mess with anything. You may want to manually backup your save files or mods, but Steam should reload your saves when you reinstall.

Hope this helps!
 

MysticCave

Greenhorn
Looks like his file link is restricted now, so I've reuploaded. Let's try this again. I've copied the instructions below and updated the link.

Ok so I faced the same issue. The main issue I believe is due to the fact that the StardewValley game is using an SDL library which is failing to detect the controllers.
If your controller is detected in Steam, Here is what you can do to get it working again:

  1. Disable Steam Input for the Game (Steam -> Stardew-Valley -> Properties -> Controllers -> Disable Steam Input)
  2. Go to Properties -> Local Files -> Browse
  3. Inside Contents/MacOS (Full Path would be ~/Library/Application Support/Steam/steamapps/common/Stardew Valley/Contents/MacOS) replace the libSDL2.dylib file with this version
  4. You will need to go to System Preferences, Security and Privacy, General Tab, and then when you try to use it the first time it will not let you because it's not approved. Hit approve in this location when it shows up and you're away.
After that the controller should be detected correctly.
The linked libSDL2.dylib is version 2.0.14, I would recommend using 2.0.16 instead for increased controller compatibility. It seems Taurus has linked 2.0.16 in his post.

Edit: It seems SDL2 2.0.18 is also out. I just tried it and there are no issues so far.

PS. Always be cautious when downloading linked library or executable files, I don't want to question anyones integrity but there is always a risk when downloading binary files from unknown sources, they could be infected with or without the authors knowledge.
 
Last edited:

Mr. Podunkian

Sodbuster
Be careful with 2.0.18 -- we shipped the game with this version of SDL a few days ago as a hotfix and immediately had to revert it because people (mostly on Windows) were having a bunch of problems with it like it crashing the game on boot. As mentioned it may have only been problematic on Windows but I figured I'd chime in just in case!
 

kalverra

Newcomer
@Mr. Podunkian I'm running into issues getting my Xbox One controller working on my M1 Mac on Big Sur 11.2.2 for Stardew. I've tried a few different versions of this libSDL2 fix to no avail.

Stardew on Steam with Xbox seems to be the only instance where this is an issue. I've tried some other games and Steam Big Picture that work fine with the Xbox controller. And Stardew works fine with a Switch Pro controller, but not Xbox for some reason.

Edit: Attempted more fixes after updating to Monterey 12.3.1, no luck still. Pretty infuriating.
 
Last edited:

AtillaLifeson

Greenhorn
@Mr. Podunkian I'm running into issues getting my Xbox One controller working on my M1 Mac on Big Sur 11.2.2 for Stardew. I've tried a few different versions of this libSDL2 fix to no avail.

Stardew on Steam with Xbox seems to be the only instance where this is an issue. I've tried some other games and Steam Big Picture that work fine with the Xbox controller. And Stardew works fine with a Switch Pro controller, but not Xbox for some reason.

Edit: Attempted more fixes after updating to Monterey 12.3.1, no luck still. Pretty infuriating.
Hey there I thought I'd chime in as well finally being able to play StardewValley natively on my M1 MBP. I made a fresh install of SV, disabled SteamInput for SV as mentioned before and used the libSDL2 from the other thread mentioned here (nobody knows which version it is). Here the direct link to the post in that thread again (post #18):

Since this is still kind of a random file from the internet I urge to download and implement it at your own risk. On the other hand it would be a very badly targeted malicious piece of code for dozens of M1 Users wanting to play Stardew Valley in Splitscreen with controllers. 😅
Still. Use it at your own risk. 😐

I realized one thing though:
I could be wrong and I need to double check on this but as far as I remember you had to start SV first THEN connect your controllers and not the other way around. In the menu only the first controller will be able to select and start the game. Once the game has loaded the 2nd controller can press the MENU-button and start/load the 2nd character and split screen gets initiated.

I'm personally using Xbox Series X controllers over Bluetooth and Apple released amazing native drivers bundled with a OS-Update a few months ago.

Enjoying SV again with my girlfriend after not being able to play for months because of this.

Hope this helped.
 

hannahsays

Newcomer
I've founnnddd a fix that works! No more crying over lost Xbox controller support!

I bought a universal controller from amazon, as it seems Stardew Valley on Mac no longer supports xbox controllers. Right?-- other games on Steam Mac work perfectly fine with xbox controllers. So! Here's the fix, super easy:

https://www.amazon.com/dp/B09JRWJT7C?ref=ppx_yo2ov_dt_b_product_details&th=1
Purchased this exact controller, then changed the following Steam settings:
Under Stardew Valley game in Steam go to: Properties --> Controller --> Controller General Settings. Untick "Xbox Configuration Support" and Tick instead "Playstation Configuration Support." Since PS3 controllers seem to work seamlessly without any extra software download, I want my game to recognize my universal controller as a Playstation controller.

Then, go back to the Stardew Valley game in Steam go to: Properties --> Controller --> "Use default settings" under "Override for Stardew Valley." This ensures the controller does not kick back to Xbox configuration.


If you choose to buy the controller and use this solution!!! The controller X Y B A controls are originally set to Switch and inverted. To fix this, the universal controller manual gives super easy instructions to change this. Hold the Settings button on the universal controller, then click the right stick once. The controller should vibrate to signify the change, and now your X Y B A controls should work as an Xbox! Yaaay!!

I'm over here pleasantly playing Stardew with my controller now. Omg, I'm so happy. Spread the love, guys. <3
 

Georgetown

Newcomer
Looks like his file link is restricted now, so I've reuploaded. Let's try this again. I've copied the instructions below and updated the link.

Ok so I faced the same issue. The main issue I believe is due to the fact that the StardewValley game is using an SDL library which is failing to detect the controllers.
If your controller is detected in Steam, Here is what you can do to get it working again:

  1. Disable Steam Input for the Game (Steam -> Stardew-Valley -> Properties -> Controllers -> Disable Steam Input)
  2. Go to Properties -> Local Files -> Browse
  3. Inside Contents/MacOS (Full Path would be ~/Library/Application Support/Steam/steamapps/common/Stardew Valley/Contents/MacOS) replace the libSDL2.dylib file with this version
  4. You will need to go to System Preferences, Security and Privacy, General Tab, and then when you try to use it the first time it will not let you because it's not approved. Hit approve in this location when it shows up and you're away.
After that the controller should be detected correctly.
First of all, thanks for your hard work, I got my controller working using your method.
However, once I got the controller working by replacing the LibSDL2.dylib file, I lost the in game sound. To verify the two events were connected, I reverted back to the original .dylib file and sound started working again, while the controller obviously stopped working. Edit : I didn't exactly reverted back to the original file, rather, in Steam, I right clicked SDV; managed...; Files; Verify integrity of game files. I assume that Steam replaced my modified .dylib file during the process, because the controller then stopped working while the sound worked again. I then manually copied the modified .dylib file and sound stopped working while the controller began working.
I am using the 2.0.16 SDL version, on a MacBook Pro 2014, 10.15.7. SDV plays through Steam.

Any idea what I could try to solve the sound issue?

Thank you :) .

EDIT #2 : I ended re-reading the thread for a xth time and found the solution. One member mentioned something about audio issue and M1 mac, and although I don't play on an M1 mac, I thought I'd try and it worked. Audio and controller now worked. I used the .dylib file linked in the following post : http://forums.stardewvalley.net/thr...not-working-in-stardew-on-mac.5452/post-72039
 
Last edited:

RohanLee

Newcomer
Omg, this is driving me crazy, I've been trying for 1 hr... I tried to follow the instructions here and when I hit the part where you're supposed to go through AppSupport>Steam I cannot find any Steam folder. Please help. I just created this account to fix this.
 

AtillaLifeson

Greenhorn
Omg, this is driving me crazy, I've been trying for 1 hr... I tried to follow the instructions here and when I hit the part where you're supposed to go through AppSupport>Steam I cannot find any Steam folder. Please help. I just created this account to fix this.
Hey there,

right-click "Startet-Valley" in your Steam Library -> click on "Manage" -> click on "Browse local files" then the Finder will directly jump you to the Game-Folder of your Startet-Valley installation.

Since the Finder will already highlight your StardewValley folder you go further and navigate to "Contents" -> "MacOS". That's the folder where you replace the libSDL2 file I linked before.

Screenshot 2022-08-28 at 00.22.46.png


Screenshot 2022-08-28 at 00.23.38.png
 

Stetzon1

Greenhorn
Made an account because this also drove me up a wall for a couple hours: I did manage to get my DS4 working on an M1 Pro Ventura without the modified file above. First, make sure these settings are configured:

Connect controller via bluetooth or wired
  1. In Menu: Steam -> Preferences -> Controller.
    1. External Gamepad Settings -> Switch ON "Enable Steam Input for Playstation Controllers"
    2. Non-Game Controller Layouts -> Desktop Layout -> Edit. Find 'Official Layout For - Desktop Configuration" -> Apply layout
    3. Exit Menu
  2. Bring up the page for SV in your library, then click the cog wheel opposite the play button on the right -> Properties -> Controller -> Override for Stardew Valley -> DISABLE Steam Input
You probably did the above a dozen times like I did, now here's the magic sauce:
  • Turn OFF your controller and do not connect it until AFTER you start SV
  • Do NOT use the in-game maximize button to go full-screen (top right in main menu). Start in windowed mode or use the green maximize button on the window itself to go full screen - works in either scenario. You may have to go in-game, set to windowed mode, exit and restart game.
Hope this helps stardewds
 

mothmanrocks

Newcomer
hellooo! I've been playing Stardew Valley for about 2 years and I absolutely love this game. I recently got a MacBook Pro with the M2 chip for school and I downloaded Steam. I'm having the same problem some other people have had with the M1 chip; I have an Xbox wireless controller that will connect to Steam but won't connect to Stardew Valley. I've uninstalled and re-installed it tons of times and tried every trick in the book and every tip on this forum, and I still don't know what to do. Has anyone figured anything out yet? I'd love to play it with a controller again :,)
 

soursnob

Newcomer
I made a fresh install of SV, disabled SteamInput for SV as mentioned before and used the libSDL2 from the other thread mentioned here (nobody knows which version it is). Here the direct link to the post in that thread again (post #18):
I wanted to chime in and give my support to this solution. I was experiencing this exact issue with my XBox Series X Controller (Model 1914l). I also have a couple older XBox one controllers (model 1708).

Running the 1914 on either of my my M2 MacBook Pro running Ventura, or an older MacBook Pro running Big Sur, Stardew Valley, didn't seem to detect the controller at all. the 1708 worked on both machines. After updating the dylib as per the thread above, the controller started to work on both machines. When I checked the dylib shared library versions using otool for both the new dylib and the new dylib, I got the following

Code:
$ otool -L /Users/user/Library/Application\ Support/Steam/steamapps/common/Stardew\ Valley/Contents/MacOS/libSDL2-2.0.0.dylib  |
 grep libSDL2
/Users/user/Library/Application Support/Steam/steamapps/common/Stardew Valley/Contents/MacOS/libSDL2-2.0.0.dylib:
    @rpath/libSDL2-2.0.0.dylib (compatibility version 17.0.0, current version 17.0.0)
$ otool -L /Users/user/Library/Application\ Support/Steam/steamapps/common/Stardew\ Valley/Contents/MacOS/libSDL2-2.0.0.dylib.old.dylib | grep libSDL2
/Users/user/Library/Application Support/Steam/steamapps/common/Stardew Valley/Contents/MacOS/libSDL2-2.0.0.dylib.old.dylib:
    @rpath/libSDL2-2.0.0.dylib (compatibility version 15.0.0, current version 15.0.0)
So it seems to suggest, that the shipping version in stardew valley is 15, and the new version is 17.

This is probably just a coincidence, but looking at libSDL2's releases, 2.0.16 is when the XBox Series X support was added to iOS and tvOS
 
Top