From nobody Fri Mar 14 08:59:17 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 4ZDdbB2db7z5qqXY for ; Fri, 14 Mar 2025 08:59:18 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZDdbB0KfZz3bB8 for ; Fri, 14 Mar 2025 08:59:18 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1741942758; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zEi+fFbQ00jTFvFCIjtTN2MRMjtZXGkgTiaA1mhqxWk=; b=DQ2QOOvdiFDuEVOj/5wgtaygry/oo6Dy0A6m4saDp4GoJ4yrSo6xhC8rHY8voXBg4iHZcF NfsnbWZI/1MINHOF/aBWmcCp46rxEhgUSptVEzhOU978k4KCWahJ+s7B6VYtiScvYpdyLN bLdpfAVoKOYi7G1MfCw9s5lkvnm21i8rK+oOu7gliyRJAcxdc03YuudWxwm+9JINQg2n4l pH4OjvN9M7TOkbYXp97tf9m0xYgTMfAoA68aTzVe3kdkeJsfzh6LOtYN+lfuiSZeLBPG5l xCjIlhY7yMOlS7w6JqfaHC0iOsAC1VeuFlyPKrXhONH49jQ4/lyAmOu0XGUj1A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1741942758; a=rsa-sha256; cv=none; b=tNfb43D5PH8lJ0/8mA+jpHoWQdLOfdXoYALz4votDsVybV2oVq+6tFx3wx2VH4cHUR9c8A 6vuSn5gf5tkzuaZ9msTOmuzry9GMKic7N+lT09IPR6t9KjhosL6zEw8XWfaIIQ71GD0UZz Zf/TGelozJyQVSI8vO7d3I73j7wq1Tx8GWoda8q3qme2JRM7cKntNwbjdslSLgGrtsi8Es t8wuvYdUVC5JA3jq+3IC754teOVPluLGy0cNSd2KfqDlvbG4vo4GiTUC9KdBQmzjHhOypV J+27GksmMsmjwGkbxhuaN2n52rTx1RIbUu7uWkptZV0TRzd31eMrfI+gPg3U7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1741942758; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zEi+fFbQ00jTFvFCIjtTN2MRMjtZXGkgTiaA1mhqxWk=; b=tnQa/VOmz+ashUwWdSik2AJGWyAr3Y7Bu/sJ3ZeCYkzFlivVFqeOuSnctWz6cKrkXj1gXH QtMQaiqcFqETX2XE9y2NkzdqQ1wVl+but7l9k2bZMyMgHi+LhniUAqjDVLSxwpiTitBfw5 i4gipqhVfKskA5NLf54uhsPyVyao0DPosFhgfF2wpZhuGM3YHDb/uRM5qN877hyuIjdvmV fwR03TM5+a1zo/npYWE+oWQ0VRsiS9j81hX1xb93fIyIyT5GBVgkJfQyletmqCC3qG98Mt 2NJqjZsrYpPUMDHVvTQwv0ayUD6LPGQHLZaxu1xlPEBa7kyzZ5ZyBgjTC1XZgQ== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZDdb96CBlzcbn for ; Fri, 14 Mar 2025 08:59:17 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 52E8xHa8073534 for ; Fri, 14 Mar 2025 08:59:17 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 52E8xHGl073533 for desktop@FreeBSD.org; Fri, 14 Mar 2025 08:59:17 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" From: bugzilla-noreply@freebsd.org To: desktop@FreeBSD.org Subject: maintainer-feedback requested: [Bug 285394] sysutils/consolekit2 seems to use wrong tty Date: Fri, 14 Mar 2025 08:59:17 +0000 X-Bugzilla-Type: request X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: desktop@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? Message-ID: In-Reply-To: References: X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated 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 Bugzilla Automation has asked freebsd-desktop (Team) for maintainer-feedback: Bug 285394: sysutils/consolekit2 seems to use wrong tty https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D285394 --- Description --- I use lightdm as a DM and I often have multiple (usually two) X sessions on different VT-s. In that setup I often (always?) observe that console-kit loses track of act= ive session resulting in things like automatic screen lock not working. Also, I see messages like these during initial startup and VT switches: console-kit-daemon[2882]: WARNING: Unable to activate console: Inappropriate ioctl for device console-kit-daemon[2882]: WARNING: Error waiting for native console 10 activation: Inappropriate ioctl for device console-kit-daemon[2882]: WARNING: Error waiting for native console 9 activation: Inappropriate ioctl for device console-kit-daemon[2882]: WARNING: Error waiting for native console 11 activation: Inappropriate ioctl for device Using ktrace and fstat I determined that console-kit tries to do ioctl on a file descriptor that's been revoked (not associated with any file): 2821 100888 console-kit-daemon CALL ioctl(0xa,VT_ACTIVATE,0x9) 2821 100888 console-kit-daemon RET ioctl -1 errno 25 Inappropriate ioctl for device I determined that originally that descriptor is produced by opening /dev/tt= y. I haven't been to determined when it gets revoked. However, I think that this already reveals the problem. I think that on FreeBSD /dev/tty is a controlling terminal. I am not sure what the controlling terminal of daemons like lightdm and console-kit-daemon is supposed to be and how it should behavior during operations like VT switches. Maybe there is some underlying problem in FreeBSD terminal code. However, given the type of operations that console-kit does on that termina= l, I think that opening /dev/ttyv0 would be more appropriate and that file descriptor would be more stable. In fact, I patched console-kit to do that and since then I do not see any problems like I saw before. The descriptor is always good: root console-kit-daemon 3974 10 /dev 124 crw------- ttyv0 r