Skip to content

Missing autostart file causes repeated cs-backup-locker segfault, exhausting X11 client connections #502

@gmariani

Description

@gmariani

Distribution

Mint 22.3

Package version

6.6.1

Graphics hardware in use

NVIDIA GeForce RTX 3070

Frequency

Quite often

Bug description

Lately my computer has stopped locking it screen, maybe for the past couple days. I noticed that it's also become slower and slower to open apps as well. Not being well-versed in debug Linux issues I turned to Claude to troubleshoot. Claude suspected that maybe screensaver was broken or crashing. After some debugging, found that X11 had too many sessions open and refused to open anymore.

$ xhost
Maximum number of clients reached
xhost:  unable to open display ":0"

Then tried to see if screensaver was even running:

$ systemctl --user status cinnamon-screensaver
Unit cinnamon-screensaver.service could not be found.

The service unit file is missing entirely — the update almost certainly removed or broke the cinnamon-screensaver package.

Skipping ahead, we determined that it is installed and without errors but the autostart is busted.

$ dpkg -L cinnamon-screensaver | grep autostart

It returns no output. This issue sounds similar but I don't know if it's the same: #501 . Claude was saying that maybe because the autostart is invalid it's not starting properly when it needs to.

Looking in the ~/.xsession-errors I saw this:

(csd-automount:4272): csd-automount-WARNING **: 00:20:10.223: Can't call GetActive() on the ScreenSaver object: Cannot invoke method; proxy is for the well-known name org.cinnamon.ScreenSaver without an owner, and proxy was constructed with the G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START flag

Here is with the debug command:

$ cinnamon-screensaver --debug --hold
Loading AccountsService
Fractional scaling active: False
Trying to connect to logind...
Starting screensaver...
Debug mode active
Cinnamon Screensaver support not found in current theme - adding some...
service: 'GetActive' received, poking application.
service: 'GetActive' received, poking application.
service: 'GetActive' received, poking application.
org.gnome.ScreenSaver is gone from the session bus
org.mate.ScreenSaver is gone from the session bus
service: 'GetActive' received, poking application.
AccountsService ready
login client: found session path for user 'ace' (session_id: c2): /org/freedesktop/login1/session/c2
Successfully using logind

It also does look like it crashed, here is the pastebin for the crash: https://termbin.com/f0rp

I asked Claude to explain if this is related to my X11 issue and it says it is, I don't know enough to say otherwise but I'll toss it in here for context.

any of this relate to the x11 issue?

Yes, directly. Here's the chain:

  1. No autostart file → cinnamon-screensaver never launches at login
  2. csd-screensaver-proxy starts (it's the only thing with an autostart file) and sits there waiting for org.cinnamon.ScreenSaver to appear on D-Bus
  3. Other components like csd-automount also poll org.cinnamon.ScreenSaver repeatedly via D-Bus
  4. Since nothing ever registers as org.cinnamon.ScreenSaver, D-Bus activation kicks in each time — it spawns cinnamon-screensaver on demand to handle the request
  5. That spawned instance tries to start, hits the cs-backup-locker segfault, and dies
  6. The cycle repeats — each failed attempt leaves behind dead X11 client connections
  7. Eventually all 256 X11 client slots are exhausted → every new app times out for 30 seconds trying to connect

So the segfault in cs-backup-locker is actually the direct cause of the X11 connection leak. Each crash leaves a dangling connection. The missing autostart file is what triggers the repeated crash-restart cycle in the first place.

I dunno if any of this is helpful or should be in the #501 ticket but figured I should report it regardless. Thanks

Steps to reproduce

Wait until screen tries to lock i suppose

Expected behavior

The screen to lock

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions