[raiguard][2.0.27] Factorio starts on the wrong monitor. (Linux)

We are aware of them, but they have low priority. We have more important things to do. They go here in order not to take space in the main bug thread list.
Mighty_Pig
Burner Inserter
Burner Inserter
Posts: 18
Joined: Fri Feb 23, 2024 9:45 am
Contact:

[raiguard][2.0.27] Factorio starts on the wrong monitor. (Linux)

Post by Mighty_Pig »

To start with I am not sure if this is a bug with factorio or just something wrong with my setup but since I've only had this issue with Factorio so far I suspect it has something to do with Factorio. If it is on my end you can move this topic to the technical issue forum.

For some reason factorio starts on the wrong monitor. As you can see here according to factorio it should be on my main monitor (1)
11-15-2024, 11-34-34.png
11-15-2024, 11-34-34.png (16.2 KiB) Viewed 952 times
But if you take a look at the configuration
11-15-2024, 11-35-33.png
11-15-2024, 11-35-33.png (61.45 KiB) Viewed 952 times
This should mean it should be located on the right monitor (Dell S2721DGF). But for some reason it is located on the left monitor.
When I select the prefered monitor instead of 1 *most* of the times it moves to the correct monitor (1). Sometimes I have to select the second monitor in order to move the game to the correct monitor.
I also noticed a few versions back whenever I moved it, it sometimes would start flickering and crash the game, but this seems to have been resolved.

Heres the log. This time I had to select the second monitor instead of the prevered one.
factorio-current.log
(12.26 KiB) Downloaded 23 times
Some extra info about my setup:

Code: Select all

Linux Lithium 6.11.7-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 08 Nov 2024 17:57:56 +0000 x86_64 GNU/Linux
nvidia-open 565.57.01-3
plasma: 6.2.3-1
Wayland: 1.23.1-1
I am also using the following launch option:

Code: Select all

SDL_VIDEODRIVER="wayland" %command%
if you need any more information let me know.

Update: I tried to use the fix below, but for me it doesn't fix the problem.
The given log is from version 2.0.18, however I am still experiencing the issue on 2.0.21, 2.0.22, 2.0.242.0.27 so the titled has been updated.
Last edited by Mighty_Pig on Fri Dec 20, 2024 1:23 pm, edited 5 times in total.
Synthe6
Manual Inserter
Manual Inserter
Posts: 2
Joined: Mon Jun 17, 2024 5:26 pm
Contact:

Re: [2.0.18] Factorio starts on the wrong monitor.

Post by Synthe6 »

You're using KDE plasma, right? I get the same issue in 2.0.15 but you can make a Window rule for Factorio, in order to force it to your preferred location. It's in the system settings, as seen as below.
11-15-2024, 20-27-16.png
11-15-2024, 20-27-16.png (136.84 KiB) Viewed 888 times
You can use the "Detect Window Properties" to get the proper information about arbitrary windows (not just Factorio) and then build your rules from there. I've also included a factorio.kwinrule file to my post (rename it to remove the .txt suffix if you want to import it easily).
Attachments
factorio.kwinrule.txt
(253 Bytes) Downloaded 20 times
Mighty_Pig
Burner Inserter
Burner Inserter
Posts: 18
Joined: Fri Feb 23, 2024 9:45 am
Contact:

Re: [2.0.18] Factorio starts on the wrong monitor.

Post by Mighty_Pig »

Synthe6 wrote: Sat Nov 16, 2024 1:32 am You're using KDE plasma, right? I get the same issue in 2.0.15 but you can make a Window rule for Factorio, in order to force it to your preferred location. It's in the system settings, as seen as below.
11-15-2024, 20-27-16.png

You can use the "Detect Window Properties" to get the proper information about arbitrary windows (not just Factorio) and then build your rules from there. I've also included a factorio.kwinrule file to my post (rename it to remove the .txt suffix if you want to import it easily).
Yes I am, thank you for this info. Haven't tried it yet.

But I still wonder where the cause of the problem is. For now I'll leave it open in the bug report even if this solves it since it's just a bandaid to the real problem.
oekelly
Burner Inserter
Burner Inserter
Posts: 5
Joined: Wed Jan 17, 2018 6:31 am
Contact:

Re: [2.0.18] Factorio starts on the wrong monitor.

Post by oekelly »

This happens to me also, using KDE Plasma 6.2.3 on Nobara Linux 40 (Fedora 40).
Mighty_Pig
Burner Inserter
Burner Inserter
Posts: 18
Joined: Fri Feb 23, 2024 9:45 am
Contact:

Re: [raiguard][2.0.27] Factorio starts on the wrong monitor. (Linux)

Post by Mighty_Pig »

So I went through the bug reports one more time and I noticed this bug seems to be reported already, and also already assigned, however no fix has been implemented so far. But I'll link those other assigned bug reports in here for tracking sake.
116349 I had the flickering at the beginning of the 2.0 update, but this seems to be fixed tho. Just noticed it also says it has been fixed, however it wasn't moved to fixed bugs (yet)
118391

Edit:
It might be a issue with sdl2. https://github.com/libsdl-org/SDL/issues/4827
Seems seems to be very similar to what we are experiencing as far as my knowledge goes. The problem should be fixed once Factorio upgrades to SDL3.
User avatar
raiguard
Factorio Staff
Factorio Staff
Posts: 669
Joined: Wed Dec 13, 2017 8:29 pm
Contact:

Re: [raiguard][2.0.27] Factorio starts on the wrong monitor. (Linux)

Post by raiguard »

Unfortunately, Wayland does not have a proper concept of what the "primary display" is. SDL3 has a convenient function to query the primary display based on several criteria, but SDL2 does not have this.

Plasma users can use the posted workaround in the meantime.
Don't forget, you're here forever.
Mighty_Pig
Burner Inserter
Burner Inserter
Posts: 18
Joined: Fri Feb 23, 2024 9:45 am
Contact:

Re: [raiguard][2.0.27] Factorio starts on the wrong monitor. (Linux)

Post by Mighty_Pig »

raiguard wrote: Tue Jan 07, 2025 8:08 pm Unfortunately, Wayland does not have a proper concept of what the "primary display" is. SDL3 has a convenient function to query the primary display based on several criteria, but SDL2 does not have this.

Plasma users can use the posted workaround in the meantime.
Thanks for the info. Any idea how fast Factorio might update to SDL3? It seems the first official release of SDL3 (3.2.0) is planned for January 15th.
https://github.com/libsdl-org/SDL/milestone/10
User avatar
raiguard
Factorio Staff
Factorio Staff
Posts: 669
Joined: Wed Dec 13, 2017 8:29 pm
Contact:

Re: [raiguard][2.0.27] Factorio starts on the wrong monitor. (Linux)

Post by raiguard »

There are several blockers:

* SDL3 needs an official release (apparently on the 15th).
* Nintendo Switch port of SDL3 needs to be updated.
* We need to perform the upgrade and do thorough testing of all systems.

So it will be a while.
Don't forget, you're here forever.
Mighty_Pig
Burner Inserter
Burner Inserter
Posts: 18
Joined: Fri Feb 23, 2024 9:45 am
Contact:

Re: [raiguard][2.0.27] Factorio starts on the wrong monitor. (Linux)

Post by Mighty_Pig »

raiguard wrote: Tue Jan 07, 2025 9:55 pm There are several blockers:

* SDL3 needs an official release (apparently on the 15th).
* Nintendo Switch port of SDL3 needs to be updated.
* We need to perform the upgrade and do thorough testing of all systems.

So it will be a while.
Okay thank you once again! It's just a minor issue that I wasn't able to solve with the mentioned issue, however with the shortcut of the super + shift + arrow keys I can just put the game onto the correct screen very easily. So I can definitely wait a while :).
GreyXor
Manual Inserter
Manual Inserter
Posts: 2
Joined: Wed Jan 22, 2025 9:44 am
Contact:

Re: [raiguard][2.0.27] Factorio starts on the wrong monitor. (Linux)

Post by GreyXor »

raiguard wrote: Tue Jan 07, 2025 9:55 pm There are several blockers:

* SDL3 needs an official release (apparently on the 15th).
* Nintendo Switch port of SDL3 needs to be updated.
* We need to perform the upgrade and do thorough testing of all systems.

So it will be a while.
Hello, thanks for your input.
FYI SDL3 is now released : https://github.com/libsdl-org/SDL/relea ... ease-3.2.0
That would be awesome to have it
There's even a migration guide SDL 2 -> SDL 3 : https://github.com/libsdl-org/SDL/blob/ ... gration.md
User avatar
raiguard
Factorio Staff
Factorio Staff
Posts: 669
Joined: Wed Dec 13, 2017 8:29 pm
Contact:

Re: [raiguard][2.0.27] Factorio starts on the wrong monitor. (Linux)

Post by raiguard »

I tested the SDL3 "GetPrimaryDisplay" function and it doesn't appear to be any more reliable than our existing Vulkan method. The reality is that Wayland simply doesn't have the concept of a primary display and Factorio trying to specify a display to use is never going to work well on it.

I may just axe this feature entirely when on Wayland and leave it up to window managers / desktop environments to position the window where they want.
Don't forget, you're here forever.
GreyXor
Manual Inserter
Manual Inserter
Posts: 2
Joined: Wed Jan 22, 2025 9:44 am
Contact:

Re: [raiguard][2.0.27] Factorio starts on the wrong monitor. (Linux)

Post by GreyXor »

raiguard wrote: Wed Jan 22, 2025 10:44 pm I tested the SDL3 "GetPrimaryDisplay" function and it doesn't appear to be any more reliable than our existing Vulkan method. The reality is that Wayland simply doesn't have the concept of a primary display and Factorio trying to specify a display to use is never going to work well on it.

I may just axe this feature entirely when on Wayland and leave it up to window managers / desktop environments to position the window where they want.
Thanks for feedback
Post Reply

Return to “Minor issues”