[raiguard][2.0.7] Massive flickering when switching monitors

Post Reply
Baughn
Long Handed Inserter
Long Handed Inserter
Posts: 99
Joined: Wed Jan 20, 2016 4:44 pm
Contact:

[raiguard][2.0.7] Massive flickering when switching monitors

Post by Baughn »

Factorio reliably starts up on the left-most display on my setup, by default. When I try to move it to screen 2 (i.e. the central, primary display)...

This happens: https://brage.info/75122881937__C9B04B3 ... 3A04DD.mov

The monitor change does actually take effect correctly, upon restart, but I have to SIGQUIT the game to make it exit.

Fortunately I don't have epilepsy.

Baughn
Long Handed Inserter
Long Handed Inserter
Posts: 99
Joined: Wed Jan 20, 2016 4:44 pm
Contact:

Re: [2.0.7] Massive flickering when switching monitors

Post by Baughn »

I think this might only be an issue on Wayland. (However, the game is incredibly laggy (and blurry) on X11.)

Baughn
Long Handed Inserter
Long Handed Inserter
Posts: 99
Joined: Wed Jan 20, 2016 4:44 pm
Contact:

Re: [2.0.7] Massive flickering when switching monitors

Post by Baughn »

Console output. I've changed no settings from the default besides 'preferred video driver'.

Though I doubt this is relevant, the game still has the long-standing bug that it shows the primary display as display #3 (but starts up on #1 by default anyway?), while actually the KDE desktop setting is #2.

Code: Select all

➜  factorio bin/x64/factorio
   0.000 2024-10-21 20:11:31; Factorio 2.0.7 (build 79385, linux64, full)
   0.006 Operating system: Linux (Arch rolling)
   0.006 Program arguments: "bin/x64/factorio" 
   0.006 Config path: /home/svein/factorio/config/config.ini
   0.006 Read data path: /home/svein/factorio/data
   0.006 Write data path: /home/svein/factorio [1900665/5713368MB]
   0.006 Binaries path: /home/svein/factorio/bin
   0.014 System info: [CPU: AMD Ryzen 9 7950X3D 16-Core Processor, 32 cores, RAM: 127945 MB]
   0.014 Environment: DISPLAY=:0 WAYLAND_DISPLAY=wayland-0 DESKTOP_SESSION=plasma XDG_SESSION_DESKTOP=KDE XDG_CURRENT_DESKTOP=KDE SDL_VIDEODRIVER=<unset> __GL_FSAA_MODE=<unset> __GL_LOG_MAX_ANISO=<unset> __GL_SYNC_TO_VBLANK=<unset> __GL_SORT_FBCONFIGS=<unset> __GL_YIELD=<unset>
   0.016 Display options: [FullScreen: true] [VSync: true] [UIScale: automatic (100.0%)] [Native DPI: true] [Screen: 255] [Special: lmw] [Lang: en]
   0.331 Video driver: wayland
   0.332 Available displays: 3
   0.332  [0]: Ancor Communications Inc ROG PG279Q/#ASNqLqZguCPd - {[4800,0], 2048x1152, SDL_PIXELFORMAT_RGB888, 120Hz}
   0.332  [1]: Dell Inc. Dell AW3423DW/#GLUYMxgwABKZ - {[2048,0], 2752x1152, SDL_PIXELFORMAT_RGB888, 120Hz}
   0.332  [2]: Ancor Communications Inc ROG PG279Q/#ASMxEy+aHXDd - {[0,0], 2048x1152, SDL_PIXELFORMAT_RGB888, 120Hz}
   0.420 Initialised OpenGL:[2] NVIDIA GeForce RTX 4090/PCIe/SSE2; driver: 3.3.0 NVIDIA 560.35.03
   0.420   [Size] Window: 2048x1152, Backbuffer: 2560x1440
   0.420   [Extensions] s3tc:yes; KHR_debug:yes; ARB_clear_texture:yes, ARB_copy_image:yes, ARB_pipeline_statistics_query:yes, ARB_gl_spirv:yes, ARB_ES2_compatibility:yes
   0.420   [Version] 3.3
   0.420 Graphics settings preset: very-high
   0.420   Dedicated video memory size 24564 MB
   0.446 Graphics options: [Graphics quality: high] [Video memory usage: all] [DXT: high-quality]
   0.446                   [Max threads (load/render): 32/8] [Max texture size: 0] [Tex.Stream.: false] [Rotation quality: normal] [Other: STDCWT] [B:0,C:0,S:100]
   0.510 [Audio] Driver:pulseaudio, Device:Default device, Depth:16, Channels:2, Frequency:44100
   0.562 Joystick device connected: instance: 0, Xbox 360 Controller
   0.562 Joystick device connected: instance: 1, Generic X-Box pad
   0.562 Game controller connected: instance: 0, X360 Controller, Xbox 360 Controller
   0.562 Game controller connected: instance: 1, Generic X-Box pad, Generic X-Box pad
   0.612 Info ModManager.cpp:434: FeatureFlag expansion-shaders = false
   0.612 Info ModManager.cpp:434: FeatureFlag freezing = false
   0.612 Info ModManager.cpp:434: FeatureFlag quality = false
   0.612 Info ModManager.cpp:434: FeatureFlag rail-bridges = false
   0.612 Info ModManager.cpp:434: FeatureFlag segmented-units = false
   0.612 Info ModManager.cpp:434: FeatureFlag space-travel = false
   0.612 Info ModManager.cpp:434: FeatureFlag spoiling = false
   0.614 Loading mod core 0.0.0 (data.lua)
   0.630 Loading mod base 2.0.7 (data.lua)
   0.709 Loading mod base 2.0.7 (data-updates.lua)
   0.743 Checksum for core: 649243273
   0.743 Checksum of base: 2653731351
   0.837 Prototype list checksum: 1277818630
   0.853 Loading sounds...
   0.928 Info PlayerData.cpp:66: Local player-data.json available, timestamp 1729537889
   0.928 Info PlayerData.cpp:73: Cloud player-data.json unavailable
   1.021 Initial atlas bitmap size is 16384
   1.038 Created an atlas bitmap (size 16384x16384) [none]
   1.038 Created an atlas bitmap (size 16384x12664) [none]
   1.038 Created an atlas bitmap (size 8192x4352) [decal]
   1.039 Created an atlas bitmap (size 16384x7616) [low-object]
   1.039 Created an atlas bitmap (size 16384x11332) [corpse-decay]
   1.040 Created an atlas bitmap (size 8192x5632) [mipmap, linear-minification, linear-magnification, linear-mip-level]
   1.040 Created an atlas bitmap (size 16384x6288) [terrain, mipmap, linear-minification, linear-mip-level]
   1.040 Created an atlas bitmap (size 4096x2960) [terrain-effect-map, mipmap, linear-minification, linear-mip-level]
   1.040 Created an atlas bitmap (size 4096x1808) [smoke, mipmap, linear-minification, linear-magnification]
   1.040 Created an atlas bitmap (size 4096x3104) [mipmap]
   1.040 Created an atlas bitmap (size 8192x2704) [icon, not-compressed, mipmap, linear-minification, linear-magnification, linear-mip-level]
   1.041 Created an atlas bitmap (size 8192x5168) [alpha-mask]
   1.052 Created an atlas bitmap (size 16384x16372) [shadow, linear-magnification, alpha-mask]
   1.052 Created an atlas bitmap (size 16384x3960) [shadow, linear-magnification, alpha-mask]
   1.052 Created an atlas bitmap (size 8192x2352) [shadow, mipmap, linear-magnification, alpha-mask]
   1.052 Created an atlas bitmap (size 2048x368) [icon-background, not-compressed, mipmap, linear-minification, linear-magnification, linear-mip-level, ]
   1.052 Loading 3D bitmaps.
   1.056 Texture processor created (2048). GPU accelerated compression Supported: yes, Enabled: yes/yes. Test passed. YCoCgDXT PSNR: 35.83, BC3 PSNR: 33.82
   1.075 Parallel sprite loader initialized (threads: 31, bitmaps: 4573)
libpng warning: iCCP: profile 'icc': 'RGB ': RGB color space not permitted on grayscale PNG
libpng warning: iCCP: profile 'icc': 'RGB ': RGB color space not permitted on grayscale PNG
   4.938 Sprites loaded
   4.945 Generated mipmaps (4) for atlas [3] of size 16384x7616   
   4.947 Generated mipmaps (3) for atlas [5] of size 8192x5632   
   4.953 Generated mipmaps (3) for atlas [6] of size 16384x6288   
   4.957 Generated mipmaps (3) for atlas [7] of size 4096x2960   
   4.958 Generated mipmaps (3) for atlas [8] of size 4096x1808   
   4.971 Generated mipmaps (3) for atlas [9] of size 4096x3104   
   4.988 Generated mipmaps (5) for atlas [10] of size 8192x2704   
   4.989 Generated mipmaps (3) for atlas [14] of size 8192x2352   
   4.992 Custom mipmaps uploaded (2122)
   5.025 Factorio initialised
   5.026 Info HttpSharedState.cpp:55: Downloading https://updater.factorio.com/updater/get-available-versions?username=Baughn&token=<private>&apiVersion=2
   5.642 Some core updates would be reachable if experimental updates were enabled.
   5.642 0 packages available to download (experimental updates disabled).
^C  48.141 Received SIGINT, shutting down
^C  48.691 Received second SIGINT, terminating immediately

User avatar
raiguard
Factorio Staff
Factorio Staff
Posts: 519
Joined: Wed Dec 13, 2017 8:29 pm
Contact:

Re: [2.0.7] Massive flickering when switching monitors

Post by raiguard »

Do your displays have different UI scales?

What I think might be happening is that the window switches its scale to that of your primary monitor, which causes a resize, which then causes the centerpoint to move back to the left monitor and it resizes, which pushes it back to the primary monitor, then it resizes... and so on.
Don't forget, you're here forever.

lvl19
Burner Inserter
Burner Inserter
Posts: 7
Joined: Sun Oct 20, 2024 10:18 am
Contact:

Re: [2.0.7] Massive flickering when switching monitors

Post by lvl19 »

Something similar happened to me on X11+i3, although i haven't been able to reproduce it. The game was rapidly flickering between fullscreen and ~half screen size. While this was happening the game was stuck in the initial loading screen, "generating bitmaps" or something like that. I thought it was caused by i3 or a faulty mod, but there might be something here.

User avatar
raiguard
Factorio Staff
Factorio Staff
Posts: 519
Joined: Wed Dec 13, 2017 8:29 pm
Contact:

Re: [2.0.7] Massive flickering when switching monitors

Post by raiguard »

Please add

Code: Select all

SDL_EVENT_LOGGING=1
to the launch command for Factorio, reproduce the problem, and upload the log. That may give me some insight into what is going on.
Don't forget, you're here forever.

lvl19
Burner Inserter
Burner Inserter
Posts: 7
Joined: Sun Oct 20, 2024 10:18 am
Contact:

Re: [raiguard][2.0.7] Massive flickering when switching monitors

Post by lvl19 »

Managed to reproduce on X11+i3. The key was to have something already open on the other screen. When I move factorio to a screen with another window open, i3 attempts to automatically resize the window to fit both on the screen. Most other programs would simply remain fullscreen after moving.

Steps in the attached video:
1. Steam open on screen 1.
2. Launch factorio.
3. Move factorio to screen 2. (Screen 2 not visible on recording)
4. Move factorio back to screen 1. Flickering starts.
5. Move factorio to another (empty) workspace on the same monitor.
6. Factorio recovers after a while.
Attachments
flicker.mp4
(8.88 MiB) Downloaded 3 times
factorio-current.log
(6.18 KiB) Downloaded 1 time

User avatar
valneq
Smart Inserter
Smart Inserter
Posts: 1180
Joined: Fri Jul 12, 2019 7:43 am
Contact:

Re: [raiguard][2.0.7] Massive flickering when switching monitors

Post by valneq »

WOW this describes perfectly what I just experienced with 2.0.8 on Wayland + Gnome, two monitors. Primary monitor at 2160p (ui scale 2×) and the other one at 1080p (ui scale 1×). Will try to reproduce and get a log. Although it's possible the game was set to use X11 while that happened. Will investigate.

Post Reply

Return to “Assigned”