Hello,
I have recently migrated from Windows 10 to Linux, reasons being numerous, but mainly because of the impending end of life for Windows 10. Installing and running Factorio has for the most part been flawless, but for some reason I have been experiencing some minor frame drops. Under the 'show time usage' tab, You can see Flip[on] is eating up the majority of the processing time during the stutters. I have tried with both V-sync on and off, but the stutters still occur. Combing through the log file, I believe that Linux is incorrectly using the integrated graphics card of my laptop. Is there any way to change the default graphics card that the system uses for Factorio? I have looked this up, and as far as I can see, I need to run the program with the parameter PRIME-RUN, but I am unable to find a way to use the command in a way that fixes the problem. Any help would be appreciated. Please keep in mind that I am relatively new to linux and that I do not know what some commands may be.
Thank you
(System specs if it is any help)
CPU: Intel 11800H
GPU: 3050 Mobile
Ram: 32GB
Laptop Model: Acer NItro
Edit: Log attached
[2.0.10][Linux] Factorio Using Incorrect Graphics Card (?)
[2.0.10][Linux] Factorio Using Incorrect Graphics Card (?)
- Attachments
-
- factorio-current.log
- (10.53 KiB) Downloaded 6 times
-
- Screenshot.png (2.72 MiB) Viewed 257 times
Re: [2.0.10][Linux] Factorio Using Incorrect Graphics Card (?)
Update:
While playing, fps stutters are occurring more frequently, but it happens much more frequently while I am viewing another surface from the map. I don't know if this is a separate bug, or tied to factorio using the wrong graphics card still.
While playing, fps stutters are occurring more frequently, but it happens much more frequently while I am viewing another surface from the map. I don't know if this is a separate bug, or tied to factorio using the wrong graphics card still.
Re: [2.0.10][Linux] Factorio Using Incorrect Graphics Card (?)
Try setting "DRI_PRIME=1" or "DRI_PRIME=0" in the launch options (specifically put "DRI_PRIME=0 %command%" in Steam launch options). Normally the former is what solves this issue for applications, but for some reason I needed to do the latter and tell the game to run with the system default (dedicated) GPU. The setting might be an AMD vs. NVIDIA difference.
Re: [2.0.10][Linux] Factorio Using Incorrect Graphics Card (?)
I am sorry, I forgot to clarify that I am using the standalone version of Factorio from the website. How would I go about fixing this for the standalone program?
Re: [2.0.10][Linux] Factorio Using Incorrect Graphics Card (?)
I'm not sure, I lost the log-in for whatever account I bought the base game on a long time ago. There is a way to run the game from the terminal, and when you do that you can set the env variable.
I don't remember exactly how to do that or where I saw the instructions so I don't know if it works. Based on my command history, it looks like you cd into your install directory, for me this was `/home/.local/share/Steam/steamapps/common/Factorio/bin/x64/` which should have a file just called "factorio". From there you can run `env DRI_PRIME=1 ./factorio` (or set DRI_PRIME=0, depending...) and presumably the game will run with the env variable set to whatever you picked.
But I just tried it and regardless of how I set DRI_PRIME when I run it that way, it seems the Steam launch option takes precedent and the game goes to the GPU... so I'm not sure what it will do for you.
Mint also has a "Run with dedicated GPU" option if I right click the application in the start menu. This also didn't work for me, at least it didn't before I set the Steam launch options, but if your distro has that option it might work for the standalone version.
I don't remember exactly how to do that or where I saw the instructions so I don't know if it works. Based on my command history, it looks like you cd into your install directory, for me this was `/home/.local/share/Steam/steamapps/common/Factorio/bin/x64/` which should have a file just called "factorio". From there you can run `env DRI_PRIME=1 ./factorio` (or set DRI_PRIME=0, depending...) and presumably the game will run with the env variable set to whatever you picked.
But I just tried it and regardless of how I set DRI_PRIME when I run it that way, it seems the Steam launch option takes precedent and the game goes to the GPU... so I'm not sure what it will do for you.
Mint also has a "Run with dedicated GPU" option if I right click the application in the start menu. This also didn't work for me, at least it didn't before I set the Steam launch options, but if your distro has that option it might work for the standalone version.
Re: [2.0.10][Linux] Factorio Using Incorrect Graphics Card (?)
Trying to run Factorio with DRI_PRIME=1 seems to have worked. Thank you for your help.