From nobody Fri Dec 9 15:17:30 2022 X-Original-To: bugs@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 4NTF4p3ljyz4jXdC for ; Fri, 9 Dec 2022 15:17:30 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NTF4p0BKQz4GZs for ; Fri, 9 Dec 2022 15:17:30 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1670599050; 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=QR2aNDvkk4CdnTCDesH3OElAOburk4eGqHP5zPAxY9k=; b=GPCIRBLjd5Td6bcI7U/orhtsLLHGIUtPv8deSrU5szN+YCfX/aP4hQ/7uAXvwQB7vsCoA7 w3NQIPq3gnz/AtpGVxDrOsxpL1vykwQ56PKCCcWMqhJzXQCvMuNwVdPMALD15OaLYUNDDO R0wnm4qSnTmS5fe8+PbWkduo+KqRKKzkcSqfBUNcGSc4CL73Ztp7TIUZ8PvNgqOXL+ChPS 8yH6OQt4Fxz4ZoJpjAR3WS67g6fscN7efZnU4EIk2TxLpsUDM7XTtZdALQYKNz+JTZ2hTo +XhwiEvrJL8JlrEUFOvFjhbYQuoQ3FdraBVc1m1UyA4EKa2O01SSXvAsEh20JA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1670599050; a=rsa-sha256; cv=none; b=ggzDVfahVBatE+hPWAAD8eJYMwpxUKaAI6CV4EnX1ZhA6SgBry7GilmqQd+madJBQwB8B8 04LnvcselasjnfVeLkCXzXmNHNBvuyx0LSli4Zr+oMMxYytrGa16snymmrX6xCLan9kNO5 fPvrjUUbFt1sh6cB5lJPhkWeRw+dZ/gu3oKJ7UM0Yn943XfIE9zFM2v8SV569i7hpohHBS mUBan22WlCJ/pUVMrpFhwHYGbg7CcvU+DKLMEMoOyOwxlBvYfXYqV1IZXJepqzoY03AB/W YlLu8Ts98SBP9bn35EzPGUZVui4zwaDkOromWxqgYwgHxL158aqT+J03rFmtzg== 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 4NTF4n6Ky8zg8Q for ; Fri, 9 Dec 2022 15:17:29 +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 2B9FHTf5096681 for ; Fri, 9 Dec 2022 15:17:29 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 2B9FHTfd096680 for bugs@FreeBSD.org; Fri, 9 Dec 2022 15:17:29 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: bugs@FreeBSD.org Subject: [Bug 268276] Regression: Black screen on resume caused by commit 9e007a88d65b Date: Fri, 09 Dec 2022 15:17:30 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: ashafer@badland.io X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D268276 Bug ID: 268276 Summary: Regression: Black screen on resume caused by commit 9e007a88d65b Product: Base System Version: CURRENT Hardware: amd64 OS: Any Status: New Severity: Affects Some People Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: ashafer@badland.io I've finally narrowed down the cause for suspend/resume breaking on my ryzen system for the past year. Commit 9e007a88d65b changed the polling rate of atkbd, which for some reason causes the GPU to disappear off the PCI bus, leaving the screen black. Author: Alexander Motin Date: Wed Jan 5 11:32:44 2022 -0500 atkbd: Reduce polling rate from 10Hz to ~1Hz. In my understanding this is only needed to workaround lost interrupts. I was thinking to remove it completely, but the comment about edge- triggered interrupt may be true and needs deeper investigation. ~1Hz should be often enough to handle the supposedly rare loss cases, but rare enough to not appear in top. Add sysctl hw.atkbd.hz to tune it. MFC after: 1 month The workaround is to put sysctl hw.atkbd.hz=3D10 in /boot/loader.conf System is AMD Ryzen 9 5900X, TUF Gaming b550-PLUS motherboard, NVIDIA GTX 9= 60. I did update the motherboard firmware but that didn't help. Usually when resuming you can ssh into the machine, but if you try to do anything graphical the following prints: Dec 9 02:12:32 mick kernel: NVRM: GPU at PCI:0000:07:00: GPU-8293a5fd-a5ed-570d-283f-675298ebf38c Dec 9 02:12:32 mick kernel: NVRM: Xid (PCI:0000:07:00): 79, pid=3D'', name=3D, GPU has fallen off the bus. Dec 9 02:12:32 mick kernel: NVRM: GPU 0000:07:00.0: GPU has fallen off the bus. Dec 9 02:12:32 mick devd[384]: notify_clients: send() failed; dropping unresponsive client Dec 9 02:12:32 mick kernel: nvidia-modeset: ERROR: GPU:0: Failed detecting connected display devices Dec 9 02:12:32 mick syslogd: last message repeated 2 times Dec 9 02:12:32 mick kernel: nvidia-modeset: ERROR: GPU:0: Failure reading maximum pixel clock value for display device HDMI-0. Dec 9 02:12:32 mick kernel: nvidia-modeset: ERROR: GPU:0: Failed detecting connected display devices I first noticed this on GhostBSD, and for some reason couldn't reproduce the bisect range on FreeBSD kernels. I had to bisect between GhostBSD's 21.12.24 and 22.3.16 kernel releases to find this commit. Then I could apply the sys= ctl workaround to a FreeBSD CURRENT kernel and have suspend/resume working agai= n. Why was this change made? Is there some performance reason why we don't wan= t to be polling atkbd so much? I'm not sure why this would affect the entire PCI bus, but since it breaks suspend resume on certain machines it would be nic= e to get a fix into base so things work out of the box again without having to a= dd the sysctl workaround. --=20 You are receiving this mail because: You are the assignee for the bug.=