From nobody Thu May 15 15:06:10 2025 X-Original-To: desktop@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Zytnw6PMLz5wTgj for ; Thu, 15 May 2025 15:06:12 +0000 (UTC) (envelope-from garga@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zytnw5tPFz401F; Thu, 15 May 2025 15:06:12 +0000 (UTC) (envelope-from garga@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1747321572; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=hpLenbi3uINFHmyTnaXJ05hP/EEYRsl0d2iDB8RqeCw=; b=c5cmLKSUfVqObvBBuf+pO2NJEEx4Zc/jH2iAhNBm3LiLwwv0FmS1/8a6K4uaocQXvdEI1X 4ED2gUh4KVQGcLzMWrIMfl9UisAFFCkFq95Uxzj/qGAuWscx84CMLN6JSJZn0rF6Awfbm4 O8TdKUg6kFW7HAsR7k1NCaP/Zl0AQAaMZMudMb8HJJY9nJJtHvSEkA015E6sLZM/4YrPgT qPFvqB9SICY5eLEEQw5pVpZMKPO5rn5myqknTQCJ+KkAMulmz0VkENc7EbYg0gqiv5Ydvd soIdSTnn8URcpcfYAt2f2dUuOyLQMWYk7U9rBNNONyzK9hi7rG5EiUOCYEyvhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1747321572; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=hpLenbi3uINFHmyTnaXJ05hP/EEYRsl0d2iDB8RqeCw=; b=tiCBSC9UAV7eMafK1/nY7CUdvdl9P6YZE/DAqtLlf8bFojC6vAtwZUEXT0VclQFR4AgT2V ZaZrThlRdz9003dg2xSZ47m8DFqmFDUEoTie2g6OouI9EsWfeShj57ADKZvBOJVo5PiPyv UfmlnpAoKDMdayRJ8GXKPA1Nk4J/CA+N+LyJxMtrm7DH/jqnhbExF4MuYlaPptvq57fJ6v f/btWKgjscvZhk7RHvp/0VdKB8LjAy6IwAzMRYUGdcKGFpmaFQTn9cTCTtIhEHTh4rfkBT uFYu5uVdEzNF/V5dAq3kUvmUzTTD3xipjlBnlYi5yUuBFjTQKh1xrRqNaTJORw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1747321572; a=rsa-sha256; cv=none; b=lf44tyiF5rnAPMa1paJS2vNZR3JmOqWESP5PbuFbs0AUmPNDgRhkwEMtmG8LfHzXtf1IJe Z3i0PyxiWJZ+nb3nenDU9oHQ9oRv4V5dsi9MMrhhi2agofkRnzDHsrnEIHn1Lqndy58vbU LEIkr2eE/FZPz3/72eFtQKTRMR2kx1ii8/BAE3F+4OFIenG2xpr4KedQot9G/3IZ0a5l9c 47sUsPQoLtaEu/qum2Dv/nLsRf3DEawjpNilR5TBnG/nnAOlaFaSbtmlPiaXEDCZZnfGot SkL6GqMjZAYUIQ4flH17HRwW52hsd9Frf1tEJiys7dZ+Lrx2H2GQ1IJsmflnMQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [172.21.4.173] (dynamic-177-53-82-16.telecominternet.net.br [177.53.82.16]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: garga) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Zytnw1q0Hz9cx; Thu, 15 May 2025 15:06:12 +0000 (UTC) (envelope-from garga@FreeBSD.org) Message-ID: Date: Thu, 15 May 2025 12:06:10 -0300 List-Id: Using and improving FreeBSD on the desktop List-Archive: https://lists.freebsd.org/archives/freebsd-desktop List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-desktop@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Sway not locked after resume To: Adrian Chadd Cc: desktop@freebsd.org, Gleb Smirnoff References: <9c517ade-a476-456e-9ff0-e9da9948fa7c@FreeBSD.org> <7f7ee3fb-45c9-42e3-85f0-591923717804@FreeBSD.org> Content-Language: en-US From: Renato Botelho Autocrypt: addr=garga@FreeBSD.org; keydata= xsBNBGStavwBCACjNlp/9+Y+VFe9ieR2h/WWbdvjz4Mb2z/f22bGoaskzCfvVNbo/v3i34I9 H6OdgZkGqheQEAD2jNfRbmPr4z40xDMUpYGLds+1Mvg7G3Hms3j5Ef8KaLSWUNWIfwKdfSVR Qs35ccSJxAdRW5YdI6J3xZgika+3Bc4eJ05YE/nWW+PNTYevt5rqD50N3zybVYIcLoqVPpBi AZE/sf5SLiLACIJb1t/s4x+pi8vgWevxVVT9u8V1f8zYErmHSLSqjxii0B3eRZphX9NCJOv9 +tfFZhnENInhn9gT7H4e2YumUltEy3jacONHJF3CC1pvvWEa6lEyypclMOkHQwNON7DLABEB AAHNLFJlbmF0byBCb3RlbGhvIChGcmVlQlNEKSA8Z2FyZ2FARnJlZUJTRC5vcmc+wsCXBBMB CgBBAhsDBQkFo5qABQsJCAcDBRUKCQgLBRYDAgEAAh4FAheAFiEERL7Dxegbnh7xTiQ5Ob6P xxJcZXoFAmSta78CGQEACgkQOb6PxxJcZXrYlggAgaZmr6c1yIWzN8VksHrHpwt/uxONEP+h lj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7x/AC ek3X5gvu8Hpcv+MZIg== In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 15/05/25 11:58, Adrian Chadd wrote: > > > On Thu, 15 May 2025 at 07:46, Renato Botelho > wrote: > > On 15/05/25 11:39, Adrian Chadd wrote: > > Gleb changed some stuff in socket handling, and its broken some > bits and > > pieces that uses unix(4) sockets for stuff. > > > > It looks like on IRC that you tried reverting it and it fixed it? > If so, > > can you poke gleb here about it? :-) > > Sway was consuming 100% CPU and it was indeed fixed by reverting gleb > changes, but the problem reported in this email is not related and it > persists. > > > Aha! Well, that's half the problem. > > > I also noticed first time I close lid after booting triggers suspend > but > next time I close it has no effect.  But it seems to be a different > issue. > > BTW, I was running drm-66-kmod and now I moved to drm-61-kmod.  No > changes at all. > > > Can you add some debugging to see if the right events are being generated? I replaced command used on before-sleep parameter of swayidle to touch a file on /tmp and file never show up. What else can I do to debug? > > > > > > > > -adrian > > > > > > On Thu, 15 May 2025 at 05:56, Renato Botelho > > >> wrote: > > > >     I've installed a fresh 15-CURRENT on a thinkpad E14 and setup > a simple > >     sway desktop.  After resuming from S3 suspend it comes back > unlocked. > > > >     I have swayidle running as follow: > > > >     swayidle -w \ > >                timeout 300 'swaylock -f -c 000000' \ > >                timeout 600 'swaymsg "output * dpms off"' \ > >                resume 'swaymsg "output * dpms on"' \ > >                before-sleep 'swaylock -f -c 000000' > > > >     swaylock is executed as expected by timeout parameter but it > looks like > >     it's not being executed by before-sleep call. > > > >     There are some messages about failures to find session on > swayidle > >     debug > >     output > > > >     2025-05-15 09:50:24 - [Line 903] Got timeout > >     2025-05-15 09:50:24 - [Line 750] Register idle timeout at > 300000 ms > >     2025-05-15 09:50:24 - [Line 751] Setup idle > >     2025-05-15 09:50:24 - [Line 713] Command: swaylock -f -c 000000 > >     2025-05-15 09:50:24 - [Line 903] Got timeout > >     2025-05-15 09:50:24 - [Line 750] Register idle timeout at > 600000 ms > >     2025-05-15 09:50:24 - [Line 751] Setup idle > >     2025-05-15 09:50:24 - [Line 713] Command: swaymsg "output * > dpms off" > >     2025-05-15 09:50:24 - [Line 756] Setup resume > >     2025-05-15 09:50:24 - [Line 713] Command: swaymsg "output * > dpms on" > >     2025-05-15 09:50:24 - [Line 906] Got before-sleep > >     2025-05-15 09:50:24 - [Line 713] Command: swaylock -f -c 000000 > >     2025-05-15 09:50:24 - [Line 778] Setup sleep lock: swaylock - > f -c 000000 > >     2025-05-15 09:50:24 - [Line 1078] No config file found. > >     2025-05-15 09:50:24 - [Line 440] GetSession failed: Unable to > find > >     session for ID > >     2025-05-15 09:50:24 - [Line 449] GetSessionByPID failed: > Unable to > >     lookup session information for process '9062' > >     2025-05-15 09:50:24 - [Line 451] Failed to find session > >     2025-05-15 09:50:24 - [Line 223] Got sleep lock: 12 > >     2025-05-15 09:50:24 - [Line 282] Failed to parse get > BlockInhibited > >     property: Invalid argument > >     2025-05-15 09:50:24 - [Line 621] Enable idle timeouts > >     2025-05-15 09:50:24 - [Line 596] Register with timeout: 600000 > >     2025-05-15 09:50:24 - [Line 596] Register with timeout: 300000 > > > >     I have seatd and dbus running, my user is member of video group, > >     XDG_RUNTIME_DIR set and sway was launched by ly DM.  /etc/ > sysctl.conf > >     has only one special entry > > > >     hw.acpi.lid_switch_state=S3 > > > >     Is anyone experiencing such problems?  Any thoughts about > what could be > >     causing it? > > > >     Thanks! > >     -- > >     Renato Botelho > > > > > > > -- > Renato Botelho > -- Renato Botelho