project jira-projects / Miscellaneous avatar

jira-projects/MISC#30: Maximum number of clients reached Cannot open display:



Issue Information

Issue Type: issue
Status: closed
Reported By: btasker
Assigned To: btasker

Created: 04-Dec-22 09:09



Description

Over the past few weeks (months maybe?) I keep running into this.

If I try and open something new, the window will flash up in the task bar and then never actually open.

If I try and edit an image in GIMP, it'll either fail to open, or report a plugin failure when trying to save.

Running manually from a shell results in

Maximum number of clients reachedCannot open display: 


Toggle State Changes

Activity


assigned to @btasker

moved from LAN#84

assigned to @btasker

I had initially thought it might have been an issue with xdg-desktop-portal - my 1Password browser extension was configured to try and communicate with the local app (which isn't installed/running). I thought perhaps it was stuck in a loop trying to connect.

But, having found the option, I turned it off, and have run into the same issue today.

Running

lsof -c Xorg

gives quite a lot: lsof.txt

Grepping that for connections

ben@optimus:~$ sudo lsof -c Xorg | grep type=
lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs
      Output information may be incomplete.
lsof: WARNING: can't stat() fuse.portal file system /run/user/1000/doc
      Output information may be incomplete.
Xorg    1089646 root    7u     unix 0xffff928412931980      0t0   38948403 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root    8u     unix 0xffff928412936600      0t0   38948404 /tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root    9u     unix 0xffff9284592bb740      0t0   38980532 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root   11u     unix 0xffff928412933fc0      0t0   38948406 type=STREAM
Xorg    1089646 root   39u     unix 0xffff928491137700      0t0   42143916 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root   40u     unix 0xffff928412982ec0      0t0   46161624 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root   41u     unix 0xffff92840ce68cc0      0t0   64642586 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root   42u     unix 0xffff92850b161540      0t0   43014326 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root   43u     unix 0xffff928438d60440      0t0   42138273 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root   44u     unix 0xffff9286593d61c0      0t0   42319408 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root   49u     unix 0xffff92841d37f2c0      0t0   38952893 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root   50u     unix 0xffff9284bd4c1100      0t0   39010180 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root   51u     unix 0xffff92841c007b40      0t0   39004903 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root   53u     unix 0xffff9284c2a172c0      0t0   38976366 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root   54u     unix 0xffff928419420880      0t0   38980542 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root   55u     unix 0xffff928613f06600      0t0   39007745 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root   56u     unix 0xffff928419423b80      0t0   39010305 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root   57u     unix 0xffff92840b5850c0      0t0   39001637 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root   58u     unix 0xffff92848cf85500      0t0   39000051 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root   59u     unix 0xffff928572888440      0t0   38980550 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root   61u     unix 0xffff92857288bfc0      0t0   38980553 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root   62u     unix 0xffff9284dd9c2200      0t0   39007736 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root   63u     unix 0xffff928418aa3740      0t0   39008428 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root   64u     unix 0xffff9284dd9c3fc0      0t0   39010315 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root   65u     unix 0xffff9284592bea40      0t0   39010316 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root   66u     unix 0xffff92840b580440      0t0   39010317 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root   67u     unix 0xffff92841e3561c0      0t0   39010318 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root   68u     unix 0xffff928419652a80      0t0   39010319 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root   69u     unix 0xffff9284aafb4c80      0t0   81278327 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root   70u     unix 0xffff92848cf86e80      0t0   39007856 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root   71u     unix 0xffff92857288a640      0t0   39011346 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root   72u     unix 0xffff92857288dd80      0t0   39010182 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root   73u     unix 0xffff928572889dc0      0t0   39007754 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root   74u     unix 0xffff928491134840      0t0   42138905 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root   75u     unix 0xffff9284aff16600      0t0   39007756 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root   76u     unix 0xffff92840b74ee80      0t0   39001649 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root   77u     unix 0xffff928419650cc0      0t0   38976258 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root   78u     unix 0xffff928572888880      0t0   38976259 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root   79u     unix 0xffff9284c2a17700      0t0   39001655 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root   80u     unix 0xffff9284bd4c2200      0t0   39002207 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root   81u     unix 0xffff92857288b740      0t0   39001657 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root   82u     unix 0xffff92841723e1c0      0t0   39012355 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root   83u     unix 0xffff928462cedd80      0t0   39012356 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root   84u     unix 0xffff928613f050c0      0t0   39010179 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root   85u     unix 0xffff928327f83b80      0t0   39006504 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root   87u     unix 0xffff92848cf83740      0t0   39008429 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root   90u     unix 0xffff928418f84400      0t0   39626822 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root   91u     unix 0xffff928418aa50c0      0t0   39597708 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root   92u     unix 0xffff9284bd4c4c80      0t0   39005575 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root   93u     unix 0xffff9284bd4c7700      0t0   42992175 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root   94u     unix 0xffff9284c2a150c0      0t0   39005586 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root   96u     unix 0xffff928414b84840      0t0   94319012 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root   97u     unix 0xffff92840803f2c0      0t0  102169565 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  102u     unix 0xffff9284592ba200      0t0   39004819 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  103u     unix 0xffff928425277700      0t0   94937085 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  104u     unix 0xffff92841723a640      0t0   39000828 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  105u     unix 0xffff92845e5050c0      0t0   94319013 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  106u     unix 0xffff92841e392640      0t0   39012439 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  107u     unix 0xffff92847b01d0c0      0t0   39011464 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  109u     unix 0xffff928494d6e600      0t0   94315291 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  111u     unix 0xffff9284a1d79dc0      0t0   40789706 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  112u     unix 0xffff92842a57d500      0t0   90002487 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  113u     unix 0xffff928491136e80      0t0   43725446 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  114u     unix 0xffff92845e500cc0      0t0   99545054 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  116u     unix 0xffff9284aff172c0      0t0   39625115 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  117u     unix 0xffff9284bac3ea40      0t0   89973615 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  118u     unix 0xffff928462ce9980      0t0   39037983 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  119u     unix 0xffff92844e4f9100      0t0   46165421 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  120u     unix 0xffff9284bd4c2640      0t0   39629134 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  121u     unix 0xffff928438d14840      0t0   42990413 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  122u     unix 0xffff9284bac3b740      0t0   94959977 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  123u     unix 0xffff928327f82640      0t0   43307933 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  124u     unix 0xffff92844d046e80      0t0   86861626 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  127u     unix 0xffff92840ff1e600      0t0   39614783 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  128u     unix 0xffff92841957fb40      0t0   90159235 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  129u     unix 0xffff9286593d1100      0t0   42307131 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  130u     unix 0xffff928613f07b40      0t0   43307937 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  131u     unix 0xffff92847b01bb80      0t0   39010484 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  134u     unix 0xffff9284345f1980      0t0   43713156 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  135u     unix 0xffff92841957b300      0t0   43323503 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  136u     unix 0xffff928412983740      0t0   47541286 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  138u     unix 0xffff92844e4fe1c0      0t0   62012205 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  139u     unix 0xffff928491130000      0t0   44749655 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  140u     unix 0xffff92841957d0c0      0t0   90158749 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  141u     unix 0xffff928494d6d0c0      0t0   94315293 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  142u     unix 0xffff928494d6a200      0t0   94315294 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  146u     unix 0xffff92848c044840      0t0   43307666 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  147u     unix 0xffff928425273740      0t0   42320863 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  148u     unix 0xffff92840ff82ec0      0t0   44755184 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  149u     unix 0xffff92840ff86e80      0t0   44764443 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  150u     unix 0xffff928327f86e80      0t0   43323502 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  152u     unix 0xffff928493e2cc80      0t0   54125263 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  153u     unix 0xffff928613f00000      0t0   43320327 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  154u     unix 0xffff92840ce6d940      0t0   47744663 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  155u     unix 0xffff92842bff1980      0t0   50797131 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  158u     unix 0xffff928446e83740      0t0   43731555 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  159u     unix 0xffff928494d6d500      0t0   50570231 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  160u     unix 0xffff928403efb300      0t0   46067712 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  161u     unix 0xffff92840d322640      0t0   74477078 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  164u     unix 0xffff92842a57a640      0t0   46170214 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  165u     unix 0xffff928433819980      0t0   46090817 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  166u     unix 0xffff928494d69980      0t0   47513387 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  168u     unix 0xffff92840d3272c0      0t0   47589026 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  170u     unix 0xffff92840d324c80      0t0   47595630 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  172u     unix 0xffff92848cd44840      0t0   49632030 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  174u     unix 0xffff9284582461c0      0t0   81287972 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  176u     unix 0xffff928412980880      0t0   46086972 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  177u     unix 0xffff92842a57a200      0t0   49632032 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  178u     unix 0xffff92844e891100      0t0   47583451 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  179u     unix 0xffff92844e892a80      0t0   49636603 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  180u     unix 0xffff92840d322a80      0t0   47540293 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  181u     unix 0xffff92848cd42ec0      0t0   47746554 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  182u     unix 0xffff9285a5041100      0t0   52156499 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  183u     unix 0xffff928438d10cc0      0t0   51814448 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  184u     unix 0xffff928403eff2c0      0t0   64197503 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  186u     unix 0xffff928436f18880      0t0   52297570 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  187u     unix 0xffff92844e4faa80      0t0   50800874 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  188u     unix 0xffff928412982200      0t0   47746553 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  189u     unix 0xffff9285a5041dc0      0t0   52043497 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  190u     unix 0xffff928412981980      0t0   50685917 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  192u     unix 0xffff928494d68cc0      0t0   50794874 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  193u     unix 0xffff92841f706a40      0t0   52337300 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  196u     unix 0xffff92842bff6a40      0t0   50689959 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  197u     unix 0xffff92844d041540      0t0   94814112 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  198u     unix 0xffff928562f05500      0t0   52295253 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  199u     unix 0xffff928418bb6a40      0t0   52298483 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  200u     unix 0xffff928562f03fc0      0t0   52299925 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  201u     unix 0xffff9284d28172c0      0t0   52862434 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  202u     unix 0xffff9284171de600      0t0   52862438 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  203u     unix 0xffff92841a2572c0      0t0   89302689 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  204u     unix 0xffff928562f07700      0t0   52322870 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  205u     unix 0xffff928562f01100      0t0   54125266 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  206u     unix 0xffff928562f00440      0t0   54118947 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  207u     unix 0xffff92843381c400      0t0   69966740 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  208u     unix 0xffff928494d68440      0t0   55956597 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  209u     unix 0xffff92842a9c2200      0t0   52117367 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  210u     unix 0xffff928493e29dc0      0t0   52881293 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  212u     unix 0xffff92840ce6ee80      0t0   55424080 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  213u     unix 0xffff928446e80440      0t0   55424085 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  214u     unix 0xffff92847b01a200      0t0   55958555 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  216u     unix 0xffff92848c040880      0t0   57341639 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  219u     unix 0xffff928446e1f700      0t0   53064566 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  220u     unix 0xffff92844e4fcc80      0t0   55805014 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  221u     unix 0xffff928412937b40      0t0   57296390 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  222u     unix 0xffff928412934c80      0t0   83027232 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  223u     unix 0xffff9284a1d7a640      0t0   55956613 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  224u     unix 0xffff928438d63740      0t0   55424077 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  225u     unix 0xffff92844e895d80      0t0   94829646 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  226u     unix 0xffff92843ad1c400      0t0   91100706 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  227u     unix 0xffff928425275500      0t0   63668299 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  228u     unix 0xffff92844d042ec0      0t0   86908045 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  229u     unix 0xffff928425273fc0      0t0   55827423 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  230u     unix 0xffff92841df45500      0t0   59954999 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  231u     unix 0xffff928403ef8000      0t0   63664583 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  232u     unix 0xffff92842b49b740      0t0   55803017 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  233u     unix 0xffff92841957aa80      0t0   57363548 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  234u     unix 0xffff92842a9c1540      0t0   55805010 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  235u     unix 0xffff9284345f3740      0t0   62003817 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  236u     unix 0xffff9284aafb4400      0t0   62055440 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  237u     unix 0xffff92840803aec0      0t0   55827422 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  238u     unix 0xffff928415c4aec0      0t0   58739832 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  239u     unix 0xffff928494d6f2c0      0t0   58741417 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  240u     unix 0xffff928415c49100      0t0   60149573 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  241u     unix 0xffff928425275940      0t0   55915147 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  242u     unix 0xffff92841a250440      0t0   59955002 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  243u     unix 0xffff928458245d80      0t0   86036782 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  244u     unix 0xffff928415c4d0c0      0t0   60058121 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  245u     unix 0xffff92840ff82200      0t0   59961527 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  246u     unix 0xffff9284aafb72c0      0t0   60762725 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  247u     unix 0xffff928415c48880      0t0   60757188 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  248u     unix 0xffff92841a251dc0      0t0   58744924 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  249u     unix 0xffff928491135500      0t0   60751726 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  250u     unix 0xffff9286593d2200      0t0   86981763 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  251u     unix 0xffff928493e2aec0      0t0   63613526 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  252u     unix 0xffff92850b161100      0t0   69853265 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  253u     unix 0xffff928425274840      0t0   94959975 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  254u     unix 0xffff92844e890880      0t0   69966747 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  255u     unix 0xffff92842a578000      0t0   66927090 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  256u     unix 0xffff92848c042ec0      0t0   60127173 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  257u     unix 0xffff92844e4ff700      0t0   70899955 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  258u     unix 0xffff9285ddc24840      0t0   90160303 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  259u     unix 0xffff9284345f6600      0t0   66927084 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  260u     unix 0xffff928446e1c840      0t0   67340727 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  261u     unix 0xffff92848cd450c0      0t0   64562733 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  262u     unix 0xffff9284345f2ec0      0t0   66942493 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  263u     unix 0xffff928412937700      0t0   82974507 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  264u     unix 0xffff92850b1650c0      0t0   75405512 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  265u     unix 0xffff928446e1fb40      0t0   67342575 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  266u     unix 0xffff928415c49980      0t0   70867895 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  267u     unix 0xffff928436f1fb40      0t0   75370436 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  268u     unix 0xffff92842a132640      0t0   75403008 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  270u     unix 0xffff928436f1a640      0t0   72050665 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  271u     unix 0xffff92845e501dc0      0t0   69853263 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  272u     unix 0xffff92844e891980      0t0   70888944 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  273u     unix 0xffff9284aafb0880      0t0   70949838 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  274u     unix 0xffff92844e895500      0t0   89998921 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  275u     unix 0xffff92842bff50c0      0t0   70981733 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  276u     unix 0xffff928438d16e80      0t0   72507417 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  277u     unix 0xffff92842ff772c0      0t0   69106820 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  278u     unix 0xffff92844d042a80      0t0   83155080 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  280u     unix 0xffff92842bff2640      0t0   72054633 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  281u     unix 0xffff92844e4fd940      0t0   69101905 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  282u     unix 0xffff9284dd9c7b40      0t0   64648795 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  283u     unix 0xffff92842bff5940      0t0   69106823 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  284u     unix 0xffff92845e502200      0t0   71176555 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  285u     unix 0xffff92843381d0c0      0t0   72056574 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  286u     unix 0xffff928458242a80      0t0   69836151 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  287u     unix 0xffff928415c48440      0t0   70972830 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  288u     unix 0xffff92844e4f9dc0      0t0   71146281 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  289u     unix 0xffff92843ad1aec0      0t0   94180538 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  290u     unix 0xffff92840d322ec0      0t0   67340725 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  291u     unix 0xffff92843253c840      0t0   69960592 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  292u     unix 0xffff92842a134840      0t0   86337167 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  293u     unix 0xffff928436f1b740      0t0   78819177 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  295u     unix 0xffff928438d13fc0      0t0   72508551 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  296u     unix 0xffff92842b49b300      0t0   74500213 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  297u     unix 0xffff928562f00880      0t0   74482587 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  298u     unix 0xffff92848cd44400      0t0   71148416 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  299u     unix 0xffff92850b166e80      0t0   75571591 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  300u     unix 0xffff92841a255500      0t0   78725276 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  301u     unix 0xffff928419578000      0t0   89313627 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  302u     unix 0xffff92850b165940      0t0   75560199 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  303u     unix 0xffff92842a136600      0t0   78728535 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  304u     unix 0xffff928458242200      0t0   72154037 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  305u     unix 0xffff928403ef8880      0t0   78340928 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  306u     unix 0xffff92845e500880      0t0   75537327 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  307u     unix 0xffff928436f1bb80      0t0   72428524 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  308u     unix 0xffff92850b163b80      0t0   78109103 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  309u     unix 0xffff92842a135d80      0t0   86337166 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  310u     unix 0xffff928436f19980      0t0   78346607 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  311u     unix 0xffff9286593d5d80      0t0   78113807 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  312u     unix 0xffff92842ff73300      0t0   78332698 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  313u     unix 0xffff92844d041100      0t0   78783295 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  314u     unix 0xffff9284345f3fc0      0t0   81278330 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  315u     unix 0xffff92842a9c7700      0t0   91107768 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  316u     unix 0xffff9284a0ca0440      0t0   94852670 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  317u     unix 0xffff92841df42200      0t0   91112749 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  318u     unix 0xffff92842b499dc0      0t0   78087638 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  319u     unix 0xffff928446e81dc0      0t0   78880151 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  321u     unix 0xffff92843ad1cc80      0t0   78823372 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  322u     unix 0xffff928403efbfc0      0t0   78634976 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  324u     unix 0xffff928403efc840      0t0   83143846 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  325u     unix 0xffff9285a2bf0000      0t0   83175162 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  327u     unix 0xffff9284a2f69dc0      0t0   86126306 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  328u     unix 0xffff92843bd63fc0      0t0   86125513 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  330u     unix 0xffff928446e85d80      0t0   78880150 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  331u     unix 0xffff92847b01e1c0      0t0   89307827 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  332u     unix 0xffff92843bd63300      0t0   86121950 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  333u     unix 0xffff9285a2bf61c0      0t0   94158566 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  334u     unix 0xffff928438d11100      0t0   86037614 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  335u     unix 0xffff92844d043b80      0t0   78861250 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  336u     unix 0xffff92842b49ea40      0t0   83020741 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  337u     unix 0xffff9284a2f6cc80      0t0   86515955 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  338u     unix 0xffff9285a2bf1540      0t0   86456618 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  341u     unix 0xffff928458245940      0t0   86033548 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  346u     unix 0xffff9284592bd0c0      0t0   86333684 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  350u     unix 0xffff92841df42ec0      0t0   86465170 @/tmp/.X11-unix/X0 type=STREAM
Xorg    1089646 root  354u     unix 0xffff92843ad1d0c0      0t0   94180516 @/tmp/.X11-unix/X0 type=STREAM

There's a very nice little snippet here to identify the source applications

ben@optimus:~$ sudo ss -x src "*/tmp/.X11-unix/*" | grep -Eo "[0-9]+\s*$" | while read port
do sudo ss -p -x | grep -w $port | grep -v X11-unix 
done | grep -Eo '".+"' | sort | uniq -c | sort -rn

    207 "kded5"
      5 "signal-desktop"
      3 "kcalc"
      2 "thunderbird"
      2 "terminator"
      2 "ksmserver"
      2 "kscreen_backend"
      2 "firefox"
      2 "dolphin"
      1 "xsettingsd"
      1 "xfce4-notifyd"
      1 "xembedsniproxy"
      1 "xdg-desktop-por"
      1 "Thunar"
      1 "startplasma-x11"
      1 "spectacle"
      1 "pulseaudio"
      1 "polkit-kde-auth"
      1 "plasmashell"
      1 "org_kde_powerde"
      1 "nextcloud"
      1 "kwin_x11"
      1 "kwalletd5"
      1 "konqueror"
      1 "klauncher"
      1 "kglobalaccel5"
      1 "kdeinit5"
      1 "kdeconnectd"
      1 "kate"
      1 "kactivitymanage"
      1 "kaccess"
      1 "gmenudbusmenupr"
      1 "DiscoverNotifie"
      1 "blueman-tray"
      1 "blueman-applet"
      1 "baloorunner"
      1 "at-spi2-registr"

There was a bug logged for kded5 leaking X-Window connections earlier this year: https://bugs.kde.org/show_bug.cgi?id=453280, although the issue is apparently actually in kscreen

It sounds like the leak happens when monitors go into powersaving mode, or otherwise change

Restarting kded5 with systemctl fails

ben@optimus:~$ systemctl --user restart plasma-kded
Job for plasma-kded.service failed because a fatal signal was delivered causing the control process to dump core.
See "systemctl --user status plasma-kded.service" and "journalctl --user -xeu plasma-kded.service" for details.

status shows that it's hit the issue we're trying to fix

Dec 04 09:22:42 optimus systemd[5838]: Starting KDE Daemon...
Dec 04 09:22:42 optimus kded5[2521349]: Maximum number of clients reachedqt.qpa.xcb: could not connect to display :0
Dec 04 09:22:42 optimus kded5[2521349]: qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
Dec 04 09:22:42 optimus kded5[2521349]: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Killing outright then

killall kded5

We're back to where we should be then

ben@optimus:~$ sudo ss -x src "*/tmp/.X11-unix/*" | grep -Eo "[0-9]+\s*$" | while read port; do sudo ss -p -x | grep -w $port | grep -v X11-unix ; done | grep -Eo '".+"' | sort | uniq -c | sort -rn
      5 "signal-desktop"
      4 "kded5"
      3 "kcalc"
      2 "thunderbird"

changed title from {-Optimus: -}Maximum number of clients reached Cannot open display: to Maximum number of clients reached Cannot open display:

The commit that fixes this is here.

That went into version 5.24.6.

Looks like Ubuntu has it

sudo apt-get update
sudo apt-get install kscreen

Unpacking kscreen (4:5.24.7-0ubuntu0.1) over (4:5.24.4-0ubuntu1) ...
Setting up kscreen (4:5.24.7-0ubuntu0.1) ...