The Sims 4 Tips

Running The Sims 4 using the open radeon driver (Opensuse Leap 42.1 Gnome)

Taking in account my experiences with linux and the radeon proprietary driver in a hybrid graphics setup (intel+radeon), I foresee some users simply using the open source built-in driver which although a bit slower is more reliable, or so they think, because what truly happen is which their notebook will use the intel, since currently you have to run the software you want with a special command called "DRI_PRIME=1".

Lets make a custom shortcut for Origin (the software which runs the sims) so it makes use of the open source radeon driver. Use the following command on terminal >
gnomesu nautilus
Then navigate to computer>usr>share>applications. There resides all your application shortcuts, rename or remove the Origin shortcut, close nautilus. Now do this >
gnomesu gedit
Add this code, replace the user name at Exec with your own and save it to computer>usr>share>applications under any name, but preferably origin-gpu-selector.desktop. Remove the line "X-SuSE-translate=false" if you are not using Opensuse.


[Desktop Entry]
X-SuSE-translate=false
Name=Origin GPU Selector
GenericName=Origin GPU Selector
Comment=Choose the type of GPU for launching Origin and its games.
Type=Application
Categories=Wine;Games;
Icon=2573_Origin.0
Exec=/home/YOURUSERNAMEHERE/Downloads/origin-gpu-selector.sh
Terminal=false
StartupNotify=false
Close this file at gedit and start a new one and fill it with this >

#!/bin/bash
dri_prime="env DRI_PRIME=1"
gpu_cmd="glxinfo | grep \"OpenGL renderer\""
wine_cmd="/opt/cxoffice/bin/wine --bottle \"Origin\" --cx-app Origin.exe"
final_cmd=
input=$(zenity --title "Origin GPU Switch" --text "2015 bash script by Tsukiyoarts (www.tsukiyoarts.com)\nPlease type r for radeon, leave empty for intel or cancel: " --entry)
retval=$?
case $retval in
0)
if [ $input="r" ]||[ $input="i" ]
then
if [ $input="r" ]
then
final_cmd="$dri_prime $wine_cmd"
else
final_cmd=$wine_cmd
fi
eval $final_cmd
fi
;;
1)
esac
Save it in your folder Downloads under any name ending with .sh, but preferably origin-gpu-selector.sh, otherwise you will have to make changes to the .desktop Exec path filename. Click the file with the right mouse button, go to properties, permissions and set it as executable. Reboot. If you have not messed anything the shortcut will be available to be added to the gnome left side bar if you search for it at the top. When you click it it will ask if you want to use the radeon driver, the intel one or cancel using Zenity, which works even on ubuntu.



There is a freedesktop bug though where using open radeon will make the sims 4 window and some other apps blank if you use some DE like gnome for example, to fix this in windowed mode (harder) move the window around, resize it and/or press the keyboard windows key to invoke the gnome workspace manager then go back to the game, these measures somehow force a update of the window sometimes, once seeing the game quickly change it to fullscreen. If the game start at fullscreen mode, it is easier to workaround the bug, just tap at the keyboard to increase or decrease volume and/or invoke the gnome workspace manager as told above then get back to the game.

You can modify the bash script above to not use zenity but query you using terminal, but for that you will have to enable terminal at the .desktop Origin GPU Selector file using gnomesu gedit. These hints worked at mint and ubuntu if I remember right, but I only really tested them at Opensuse Leap 42.1 Gnome.

by Yuko Moraes Pereira on 2016-01-28 15:07:39
Important Information Tips are provided by the CrossOver Community and Advocates. They are not intended to be used for official CodeWeavers Support. For that, please visit our official support pages.
CodeWeavers or its third-party tools process personal data (e.g. browsing data or IP addresses) and use cookies or other identifiers, which are necessary for its functioning and required to achieve the purposes illustrated in our Privacy Policy. You accept the use of cookies or other identifiers by clicking the Acknowledge button.
Please Wait...
eyJjb3VudHJ5IjoiVVMiLCJsYW5nIjoiZW4iLCJjYXJ0IjowLCJ0enMiOi02LCJjZG4iOiJodHRwczpcL1wvbWVkaWEuY29kZXdlYXZlcnMuY29tXC9wdWJcL2Nyb3Nzb3Zlclwvd2Vic2l0ZSIsImNkbnRzIjoxNzM5NTcwNzYwLCJjc3JmX3Rva2VuIjoieHJHZ0xKVzZ2ZEczQlBGSyIsImdkcHIiOjB9