[2.0.77] Mouse input ignored with no window manager

Things that we don't consider worth fixing at this moment.
sparr
Smart Inserter
Smart Inserter
Posts: 1566
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

[2.0.77] Mouse input ignored with no window manager

Post by sparr »

If I start the game on Linux with no window manager, all mouse input is ignored.

The attached game log is identical other than timestamps with or without a window manager and the bug being reported.

PS: Also the game claims to be fullscreen when it isn't without a wm.

PPS: Also GUI elements get clipped at the screen edges in that scenario because the game thinks its window is larger than it is.
Attachments
factorio-nowm-mouse-ignored.log
(6.05 KiB) Downloaded 31 times
User avatar
raiguard
Factorio Staff
Factorio Staff
Posts: 840
Joined: Wed Dec 13, 2017 8:29 pm
Contact:

Re: [2.0.77] Mouse input ignored with no window manager

Post by raiguard »

What do you mean "no window manager"? Are you starting the game directly from a TTY? If so, then that is an unsupported usecase - please use a window manager.
Don't forget, you're here forever.
sparr
Smart Inserter
Smart Inserter
Posts: 1566
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Re: [2.0.77] Mouse input ignored with no window manager

Post by sparr »

e.g. startx factorio (or the equivalent through startup scripts), such as for a kiosk or console.

My actual use case is for head-ful integration tests. I did just add a wm to the session in question, so the workaround wasn't hard, but I thought it worth reporting just in case.
User avatar
raiguard
Factorio Staff
Factorio Staff
Posts: 840
Joined: Wed Dec 13, 2017 8:29 pm
Contact:

Re: [2.0.77] Mouse input ignored with no window manager

Post by raiguard »

We don't deal directly with system-level components such as X11, Wayland, or Pipewire - that is all handled by SDL. I would try a small SDL test application, and if that has the same issue, feel free to report it to the SDL developers. (though I expect they will give you a response similar to mine)
Don't forget, you're here forever.
sparr
Smart Inserter
Smart Inserter
Posts: 1566
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Re: [2.0.77] Mouse input ignored with no window manager

Post by sparr »

I'll head upstream for the SDL situation.

For what it's worth, here's a mod to demonstrate the piece of the GUI problem that I think is on Factorio.

Code: Select all

local function probe(tag)
  local p = game.players[1]
  if not p then log("RESPROBE " .. tag .. " no player") return end
  local r = p.display_resolution
  log(string.format("RESPROBE %s display_resolution=%dx%d display_scale=%s",
      tag, r.width, r.height, tostring(p.display_scale)))
end
script.on_event(defines.events.on_tick, function(event)
  if event.tick == 120 then probe("tick120") end
  if event.tick == 300 then probe("tick300") end
end)
script.on_event(defines.events.on_player_display_resolution_changed, function() probe("changed") end)
script.on_event(defines.events.on_player_created, function() probe("created") end)
This will show that Factorio is telling the mod that the resolution is 1920x1080 (always? hardcoded?) for about 5 frames before telling the mod the resolution has "changed" to what it actually was all along.
Last edited by sparr on Thu Sep 17, 2026 8:35 pm, edited 2 times in total.
Bilka
Factorio Staff
Factorio Staff
Posts: 3902
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: [2.0.77] Mouse input ignored with no window manager

Post by Bilka »

The display_scale and display_resolution being incorrect in on player created is expected and documented: https://lua-api.factorio.com/latest/cla ... play_scale
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Post Reply

Return to “Won't fix.”