From nobody Thu May 15 16:04:30 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 4Zyw5K2mjkz5wXrm for ; Thu, 15 May 2025 16:04:37 +0000 (UTC) (envelope-from garga.bsd@gmail.com) Received: from mail-vs1-xe32.google.com (mail-vs1-xe32.google.com [IPv6:2607:f8b0:4864:20::e32]) (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-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zyw5J52SXz4QSY; Thu, 15 May 2025 16:04:36 +0000 (UTC) (envelope-from garga.bsd@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-vs1-xe32.google.com with SMTP id ada2fe7eead31-4dfa2aeec86so138148137.1; Thu, 15 May 2025 09:04:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1747325075; x=1747929875; darn=freebsd.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:newsgroups:cc:to:subject:user-agent:mime-version:date :message-id:sender:from:to:cc:subject:date:message-id:reply-to; bh=CNdUIrSH4TjJ3JtQFRbKRa4I+Jsaa8j5In6CkBQLFtY=; b=LC7fwAHADNgIlq0g7QIgIvU1Wx5rSkfyJ6FdB/bTK+/q/pzA6cNU0WAdOQErRwzKaB uUnqZD+TWoqwLKBOcCT2zygZfMidDZ4CibpCAfRBpEQXdeOTHFSFQjrYgZiPpoSqk6jU 9etvWii/x4pQw3mz0ChE8kyb5o1OZWg2ohFXqA+oeT3HYsRBhH7fLAI0ZtNOGX30II4i 1tYPDXcEeZ4lSJsss4J9a+quzo+Ru5lo6SBYHVucoGTB5yDg765bg43wxo8H62KB7hAS DxbZfzcbymkYYi5PttTQgHe+h7RZpRgTOgcF5nVpGrfKLkK8zRg/FBVG8Yv8HdYuvqJM XrvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747325075; x=1747929875; h=content-transfer-encoding:in-reply-to:from:content-language :references:newsgroups:cc:to:subject:user-agent:mime-version:date :message-id:sender:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=CNdUIrSH4TjJ3JtQFRbKRa4I+Jsaa8j5In6CkBQLFtY=; b=wSfFxjk32IcDTmQZBU492Ol+QRPIby4J/khnFYS7S7uYw35JnDsz+3V8WpYZs1Cjii 7FvbcQmrwrHZ/2Zr2zPWUiD5rZJ+OXyvllmHgB0hrDQcLi09DK2r6WPiIrRk5QBYM1vb BkoRB4G544Nze7ehu4C/C3KdkzETlEbodUtNsdG0gSuLGkYAatXHVcLaBCw3lrhQOJc8 9yxVQZvyr5felatr/QgQBsRWpFlLpY3pogSXtKalpAM/WLnwfyogKesMzY7OeyUoZ7/J LH61a+7RzbMjgR8/nUnLALhuPKUUcnbl1NxqYPApkSo2UmEXt3yZ6oXKvI7r4j2h9uLQ v5Lw== X-Forwarded-Encrypted: i=1; AJvYcCUKQa7FYTEZ2JvWYvnW73SkkxOFu4rDzDkpb+tuswDWYdZfddjhn8NW9Tly8aVSYUmXEpzhn6kb@freebsd.org, AJvYcCVU8dJVteICXbrwSZLZtIlD9Lto5u8kAyeeEgFuTn2SFlidCIA0YLDoIwBXIrCCiqlhE4h7/m+A@freebsd.org X-Gm-Message-State: AOJu0YwTdEB4NO8+v1IVg1L+3vJx2GJgdKRddrs8JL6KA+cypokrm7ft mREd+ymDwh4Fsu97W/IXsq3+lIW7+GP9ezJibd7ipsNvlxng08xVkG54ANBjxA== X-Gm-Gg: ASbGncuT67FosIoni3RNyOAir9fmhj8HNnuRTT7ruiWvjKZkBaCj+Xw2uP6UnXC8rB9 OGnAGWDPCRFfryDerA/W0uqfkj72DdKKcvufW7Ez/NuZaq8H4DVuGQLJBL2sEbmMmZRFlCRCQ/o rjwD0ICHVHjHmIs89GV6QZ3sMpZ7/Su3QIdrWOazm3NafTkTFGqQ/UYtILZVK/fHlXcNz8PpUIC +EFIw2CdSldqdciJsYhWi57SXzchsVBYmLTz+Lzd3kNAE6gwIws7c0spkVxALaXqTJh9LVTpFle QzqD4EHEd5QW6ogJIoyaTtjWg3GE48B0AwuYI0kWiTU1Grvb+gtXbfmkjI5aDhV+Ohp4KTBxyXk 6EDz1AsMKvSg9eWOLvI9x43bQh/GsHnDLzQP3g/Af X-Google-Smtp-Source: AGHT+IGFdwsfOatDNSFi8AI5pcUL6yWNhJRyJIqKCexpS4WYkYUo7GyO4/h7q9TKLD9wWYywKpQwrQ== X-Received: by 2002:a05:6102:1515:b0:4c3:9b0:9e6b with SMTP id ada2fe7eead31-4dfa6b8e301mr373360137.10.1747325074488; Thu, 15 May 2025 09:04:34 -0700 (PDT) Received: from ?IPV6:2804:f1c:8c9:6401:bcf1:5742:266d:e59c? ([2804:f1c:8c9:6401:bcf1:5742:266d:e59c]) by smtp.gmail.com with ESMTPSA id ada2fe7eead31-4dfa66bcfdesm128169137.11.2025.05.15.09.04.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 15 May 2025 09:04:33 -0700 (PDT) Message-ID: <4375c1d5-e9b2-452f-b458-f74af7ff5da8@FreeBSD.org> Date: Thu, 15 May 2025 13:04:30 -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 , Jan Beich Newsgroups: gmane.os.freebsd.desktop References: <9c517ade-a476-456e-9ff0-e9da9948fa7c@FreeBSD.org> <7f7ee3fb-45c9-42e3-85f0-591923717804@FreeBSD.org> Content-Language: en-US From: Renato Botelho In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4Zyw5J52SXz4QSY X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Spamd-Bar: ---- On 15/05/25 12:49, Adrian Chadd wrote: > > > On Thu, 15 May 2025 at 08:06, Renato Botelho > wrote: > > On 15/05/25 11:58, Adrian Chadd wrote: > > > > > > >     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? > > > Hm, how's it registering for before-sleep and resume messages? Are they > xf86 events? Sway runs only on Wayland, no xf86 involved. Anyway, the software used to deal with that is not sway, but swayctl. DESCRIPTION swayidle listens for idle activity on your Wayland compositor and executes tasks on various idle-related events. You can specify any number of events at the command line and in the config file. One available idle acticity is before-sleep before-sleep If built with ConsoleKit2 support, executes command before ConsoleKit2 puts the computer to sleep. Note: this only delays sleeping up to the limit set in logind.conf(5) by the option InhibitDelayMaxSec. A command that has not finished by then will continue running after resuming from sleep. Parameters used on my setup are the default ones from default sway config file, it calls `swaylock` on `before-sleep` event. I replaced swaylock by `touch /tmp/before-sleep` and this file was never created, what means before-sleep parameter is not being executed. I've added jbeich (swayidle maintainer) to the CC list, case they have any idea about what could be wrong. I'll check swayidle source code and see how to debug it. > We may need to go into the sway source code to see what's going on. > > > -adrian > > > >      > > >      > > >      > > >      > -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 >