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 4ZDdbB1sj2z5qqXV 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 4ZDdbB0WDCz3bNZ 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; bh=tE150x1Le3LxtyaJrEF6ErQb+1ejv0MlATMv95O+PZk=; b=uGJtbZQaTWfxZ2VGbusV1vX3N7IRo/8XzNZZzjup9/y/H5Ywd2mh+BMuK9JCerRlKVeeA2 O8yHQsdDnuLc4L23swMXaJxpZ3PkAqT+Qe1h/Rt2whkfo+qsvwNr+HNJYbCWdsM22w3TOk 0901bWNKOaDwtsOgHNz075uafg2KSCwN73shcRtqmkbQJneP9Jj7itZMAw/aVYJrXUkY8A GmIhA8PUrmhyfuZM3ziZiS/AOfwiXD4kAizM3C1E/BNZwI2T17Jcufvx5wpKfYWuZW16HO ubNBLm6YmDHqjVEn9xvB0Q5/CnfzSISafDiLBZJ9hCNiGEuLS6iJ/gFW1q/BiA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1741942758; a=rsa-sha256; cv=none; b=LLhIQYmuz7IAfRvzVm0PocBBCw792FxQj6LOZz+y/xvjmye0RnuHGXErNr7d7KxB59Jn5L Wp61Noev96UeYF6mtZnrnybdmkYXI8uKS7ctWBfr2HPQtEczV5+dt1W7W9yGj+k6XVwcda Cf+9eqy3WSIOiT5HeZ+zQvRl/kRHgESEwaMXDoILGnq0t4hJzJHecdMjvIz3X33rUVOMtZ BVI4ovosL7RY2SFJUq4byCtpYgi/rCf7DefJXGJRD1HrK6Of/OmQKA1vo0HfbTlTPSCpMS uaDyA/L3zAsRxNpLF1Ni6BUHRQcyKR4oXGBWSwRjuLryRdB9qY6uW0uQHL/MdA== 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; bh=tE150x1Le3LxtyaJrEF6ErQb+1ejv0MlATMv95O+PZk=; b=M3HCPaqPz78ABXncISTh0mdoLURxewHxQs46U3mvgKJbRc4jUfQZaIWVWOvTS/1xneBhBc pJAYmQmazDqjkrf6uq+b3Gc1QiSfMuNld2U81Nd+70vjydKL09rXPgqZDLHxK8eFyhpK6K wI0Le2IFJD+chzGm1OAR+VlyULD349TzW24QitfPTBKrZd+tSL6nyHsIK8KLdArK6mSV8a 4PiFfUC93r7vr27Z+KDDNkniQlZyGLJ7S3omI6fGoWw9V3/a0k9rybHX3vBr6IDoKG3cy6 BuFz4Sv2E2Ky7qNMv1PGQTneJSS0OO785lNZYH9WWqMRrPu50xfQUJMRzxPcqg== 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 4ZDdb96xvPzdcC 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 52E8xHYf073543 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 52E8xHg6073542 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 From: bugzilla-noreply@freebsd.org To: desktop@FreeBSD.org Subject: [Bug 285394] sysutils/consolekit2 seems to use wrong tty Date: Fri, 14 Mar 2025 08:59:17 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None 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: avg@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: desktop@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter flagtypes.name Message-ID: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" 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 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D285394 Bug ID: 285394 Summary: sysutils/consolekit2 seems to use wrong tty Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: desktop@FreeBSD.org Reporter: avg@FreeBSD.org Flags: maintainer-feedback?(desktop@FreeBSD.org) Assignee: desktop@FreeBSD.org 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 --=20 You are receiving this mail because: You are the assignee for the bug.=