r/KeePass • • 1d ago

Screen saver triggers KeePassxc to lock database

I have been using Keepassxc for a few years, and this problem only started happening when I installed Ubuntu/Gnome.

Have tried a few different 'security' settings, all to no avail.

Previously I was using Kubuntu, no problems.

It seems to be a Gnome thing, is that correct ?

1 Upvotes

11 comments sorted by

3

u/0xKaishakunin 22h ago

Nope, it's a KeepassXC setting:

Go to Tools -> Settings -> Security and remove the check mark next to "Lock databases when session is locked or lid is closed".

1

u/Deepwithin777 10h ago

That is only for a session locked or the lid closed. No option for screensaver.

2

u/ethicalhumanbeing 9h ago

But did you try that one? I reckon this app treats both the screensaver and the session as the same thing, so unticking that one might prevent the DB from locking.

However, it might not be advisable to keep that option unticked because then the DB will also not lock when you lock your session.

1

u/Deepwithin777 7h ago

It doesn't stop the screen saver from triggering a lock.

As you say, it's not advisable to uncheck that option, as if/when I lock the session, the db most likely won't lock.

Ubuntu/gnome is informing me the lid is not closed, that also has been tested. A quick search through the issues at https://github.com/keepassxreboot/keepassxc/issues will show this has been a problem for a number of years.

That said, it didn't happen with Kubuntu/KDE/Plasma, so Ubuntu/gnome is most likely the cause.

2

u/ethicalhumanbeing 7h ago

Thank you for detailed reply.

Honest question though, why does anyone in 2026 still use screensaver? It's not like our screens need to be saved from showing the same picture for any amount of time.

Hell, even OLED screens nowadays are so good with their protective measures that it's not leaving your computer for a couple of hours showing the same image that will leave it burned in.

You should see this video where the guy leaves a switch OLED on the exact same screen, and at maximum brightness, for years: https://www.youtube.com/watch?v=Po8jAQjvd88

1

u/Deepwithin777 6h ago edited 6h ago

Good question - easy answer ..personal choice.

Plus, I use dual monitors, the external one is kinda large and 'old'.

1

u/ethicalhumanbeing 4h ago

I respect that 100%.

3

u/ethicalhumanbeing 22h ago

Isn’t that an option you can enable or disable?

1

u/Deepwithin777 10h ago

There is no option to stop the screensaver from triggering a database lock, unfortunately.

1

u/Deepwithin777 7h ago

Whilst I don't rely much on AI, interesting what Brave's AI mentioned. Note the part at the end, re KDE/Plasma. That is also my experience..

The cause is that KeePassXC on Linux/GNOME typically monitors the session idle state (via D-Bus signals like org.gnome.ScreenSaver) rather than the specific "screen lock" event. On many Ubuntu/GNOME configurations, the session is considered idle or the screensaver state changes when the screen blanks, triggering KeePassXC to lock the database immediately.

This creates a conflict when users set the "Blank Screen" delay to be shorter than the "Automatic Screen Lock" delay. Because KeePassXC reacts to the blank/idle signal rather than the actual password prompt appearing, it locks the database prematurely.

To resolve this, users often:

  • Set the Blank Screen delay in GNOME settings to Never or a value longer than the lock delay.
  • Use external tools like xss-lock or custom scripts to decouple the screensaver/blanking event from the session lock signal.
  • Switch to a desktop environment like KDE Plasma, which handles these events more distinctly, or use a different password manager that respects the actual lock screen state.