[Rseding91] [1.1.41] Logitech RGB keyboard goes off when ALT TAB-ing back to Factorio

Bugs that we were not able to reproduce, and/or are waiting for more detailed info.
Rseding91
Factorio Staff
Factorio Staff
Posts: 16048
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [Rseding91] [1.1.41] Logitech RGB keyboard goes off when ALT TAB-ing back to Factorio

Post by Rseding91 »

We don’t do anything special in any of those cases. What I suspect is happening is when alt tabbed from the game the software stops accepting requests to change colors from Factorio and then once focused again the next time Factorio requests to set a key color it starts updating again.

Given we do not do anything when focus is lost to start the “don’t listen to requests from this process” I don’t see why we should be doing anything to stop that logic. I’d expect the software on the keyboard side to automatically re-enable it when focus switches back to the Factorio process.

But again, I am unable to reproduce any of the mentioned issues so I have nothing to work on around this.
If you want to get ahold of me I'm almost always on Discord.
dnsmcbr
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sat May 10, 2025 11:02 pm
Contact:

Re: [Rseding91] [1.1.41] Logitech RGB keyboard goes off when ALT TAB-ing back to Factorio

Post by dnsmcbr »

FYI I, too, have this issue on Logitech.

I wonder if it could be related to multi-monitor stuff, as I often mouse out to another window to chat or do whatever on the other monitor, and then click back in to the factorio window, with the noted issue.
ElOhTeeBee
Manual Inserter
Manual Inserter
Posts: 2
Joined: Tue Sep 07, 2021 8:54 am
Contact:

Re: [Rseding91] [1.1.41] Logitech RGB keyboard goes off when ALT TAB-ing back to Factorio

Post by ElOhTeeBee »

dnsmcbr wrote: Sat May 10, 2025 11:06 pm FYI I, too, have this issue on Logitech.

I wonder if it could be related to multi-monitor stuff, as I often mouse out to another window to chat or do whatever on the other monitor, and then click back in to the factorio window, with the noted issue.
Same issue, workaround doesn't work, and I also use a multi-monitor setup.
dnsmcbr
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sat May 10, 2025 11:02 pm
Contact:

Re: [Rseding91] [1.1.41] Logitech RGB keyboard goes off when ALT TAB-ing back to Factorio

Post by dnsmcbr »

To add some extra data points: when clicking back in whilst a loading bar is displayed (i.e. at startup or loading map) it works too.
Rseding91
Factorio Staff
Factorio Staff
Posts: 16048
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [Rseding91] [1.1.41] Logitech RGB keyboard goes off when ALT TAB-ing back to Factorio

Post by Rseding91 »

I've added a call to reset the LED state when the game detects a window-maximized/entered/restored event to see if it helps with this at all. I'm still unable to reproduce this issue on my end but maybe this will make it work for others? It will be in 2.0.52.
If you want to get ahold of me I'm almost always on Discord.
Maeximus
Inserter
Inserter
Posts: 25
Joined: Sun Jun 02, 2024 10:10 am
Contact:

Re: [Rseding91] [1.1.41] Logitech RGB keyboard goes off when ALT TAB-ing back to Factorio

Post by Maeximus »

Rseding91 wrote: Tue May 20, 2025 8:16 pm I've added a call to reset the LED state when the game detects a window-maximized/entered/restored event to see if it helps with this at all. I'm still unable to reproduce this issue on my end but maybe this will make it work for others? It will be in 2.0.52.
First of all - thank you! :space-age:

I have a new second install for my pY playthrough which I downloaded from the website and when playing that - the behaviour is somehow different. As soon as the game opens, the keyboard changes to the orange "factorio-mode" and only changes back when I close the game.

When I play my steam-installation, the keyboard changes from "factorio-mode" to "windows-desktop-mode" every time I switch out of factorio.

So I guess there is a wrapper from steam which causes all those issues with the keyboard and hopefully the added call will tend to the issues which seem to be introduced by steam...
dnsmcbr
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sat May 10, 2025 11:02 pm
Contact:

Re: [Rseding91] [1.1.41] Logitech RGB keyboard goes off when ALT TAB-ing back to Factorio

Post by dnsmcbr »

Rseding91 wrote: Tue May 20, 2025 8:16 pm I've added a call to reset the LED state when the game detects a window-maximized/entered/restored event to see if it helps with this at all. I'm still unable to reproduce this issue on my end but maybe this will make it work for others? It will be in 2.0.52.
Thanks - I'll switch to Experimental and when that release lands on Steam I can provide rapid feedback :)
dnsmcbr
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sat May 10, 2025 11:02 pm
Contact:

Re: [Rseding91] [1.1.41] Logitech RGB keyboard goes off when ALT TAB-ing back to Factorio

Post by dnsmcbr »

Rseding91 wrote: Tue May 20, 2025 8:16 pm I've added a call to reset the LED state when the game detects a window-maximized/entered/restored event to see if it helps with this at all. I'm still unable to reproduce this issue on my end but maybe this will make it work for others? It will be in 2.0.52.
FYI I've tried on .52, but no luck :(

I'll probably just go to the non-steam version which seems to not have this issue.
dnsmcbr
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sat May 10, 2025 11:02 pm
Contact:

Re: [Rseding91] [1.1.41] Logitech RGB keyboard goes off when ALT TAB-ing back to Factorio

Post by dnsmcbr »

Now I'm using the non-steam client, an interesting observation is that the keyboard is *staying* in the Factorio config during tabbing etc. rather than reverting to the default config whent abbed.
CaffeinatedCucumber
Burner Inserter
Burner Inserter
Posts: 11
Joined: Sat Nov 02, 2024 10:56 pm
Contact:

Re: [Rseding91] [1.1.41] Logitech RGB keyboard goes off when ALT TAB-ing back to Factorio

Post by CaffeinatedCucumber »

I was about to make a bug report for this myself. It's been very mildly annoying me since logitech lighting support was introduced but I figured there was no way it wasn't known behavior and I hadn't made a forum account yet. Observer effect I guess.

By the way, for anyone else experiencing this, double-tapping T to open and close the research menu resets it—which is why I've gone this long without bothering to check if if it was being fixed. I suspect it's because the functionality to clear the yellow T key when opening the research menu makes a call to the keyboard whether it needs to or not. edit: apparently this is known. I didn't notice there were multiple pages.

Taking damage, healing, and researches completing also light the keyboard up.
Interesting side note, the main menu fixes it when swapping the demo scenes.

If it helps, I've attached a video of it happening and being fixed with the research menu trick in 2.0.65 (build 83790 expansion, win64, steam). Recorded when I was going to make my own report.
Attachments
bug.mp4
(1.73 MiB) Downloaded 20 times
Rseding91
Factorio Staff
Factorio Staff
Posts: 16048
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [Rseding91] [1.1.41] Logitech RGB keyboard goes off when ALT TAB-ing back to Factorio

Post by Rseding91 »

If I knew what was going wrong I would attempt to fix it. However, every single attempt always works flawlessly for me when I test. I believe people are having issue - I just can’t do anything about them without being able to make it happen on my end.
If you want to get ahold of me I'm almost always on Discord.
User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5414
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [Rseding91] [1.1.41] Logitech RGB keyboard goes off when ALT TAB-ing back to Factorio

Post by Klonan »

BTW I have this problem with my Logitech keyboard unrelated to Factorio, it only started happening with the upgrade to Windows 11.
CaffeinatedCucumber
Burner Inserter
Burner Inserter
Posts: 11
Joined: Sat Nov 02, 2024 10:56 pm
Contact:

Re: [Rseding91] [1.1.41] Logitech RGB keyboard goes off when ALT TAB-ing back to Factorio

Post by CaffeinatedCucumber »

If it's of any note, I'm still on Windows 10 Pro (10.0.19045 Build 19045) and only have this problem with Factorio, but then again nothing else I use overrides the lighting.

II did more testing to see if I could find anything noteworthy—switching VSync, fullscreen, and render threads has no effect.

Turning on "Minimize on focus loss" fixes the bug!!!!!

The rest of this was written before discovering that:

If I may posit a theory, could you perhaps be unable to recreate it because you're not testing through Steam? I saw from someone else, and confirmed for myself, that the lighting doesn't switch back to its default on losing focus of Factorio when not playing through Steam, and therefore never gets set to 0 brightness.

Speaking of which, another unsolicited suggestion: have you tried delaying the call to reset the lighting upon tabbing in by a few frames? Could be an issue where you update in the same frame that—or before—Factorio reregisters itself with the lighting controller and therefore doesn't get updated? It feels to me like there's a little bit of delay between tabbing in and the lights clearing. Maybe that could be responsible for the fix not working?

Idk, I've never interfaced with Logitech's API so I'm only speaking from a general gut feeling and what I've personally observed. If you need anything else from me, I'm happy to help.
Maeximus
Inserter
Inserter
Posts: 25
Joined: Sun Jun 02, 2024 10:10 am
Contact:

Re: [Rseding91] [1.1.41] Logitech RGB keyboard goes off when ALT TAB-ing back to Factorio

Post by Maeximus »

Yes, can confirm, when changing this setting my steam install behaves like the standalone installation and the keyboard switches properly :D

Great find, awesome!

edit: I'm on Win11
CaffeinatedCucumber
Burner Inserter
Burner Inserter
Posts: 11
Joined: Sat Nov 02, 2024 10:56 pm
Contact:

Re: [Rseding91] [1.1.41] Logitech RGB keyboard goes off when ALT TAB-ing back to Factorio

Post by CaffeinatedCucumber »

Interesting.

For me the standalone install and the Steam install still have different behavior:
  • standalone: Lights are always orange if Factorio is running—doesn't matter if Factorio is focused or if MoFL is on. If the process exists, the lights are orange.
  • Steam + MoFL: Lights are orange if and only if Factorio is focused. Seems to me like this is what it "should" be doing, but this is the only setup that acts like this.
  • Steam + no MoFL: The bug. Lights are G HUB default when not focused, off when initially focused, and orange when focused post-lighting update.
Post Reply

Return to “Pending”