From owner-freebsd-current@freebsd.org Mon Jul 29 09:41:44 2019 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 62846A4681 for ; Mon, 29 Jul 2019 09:41:44 +0000 (UTC) (envelope-from rozhuk.im@gmail.com) Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 25910750EB for ; Mon, 29 Jul 2019 09:41:43 +0000 (UTC) (envelope-from rozhuk.im@gmail.com) Received: by mail-ed1-x52c.google.com with SMTP id i11so58735684edq.0 for ; Mon, 29 Jul 2019 02:41:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=oUF3K172DiD3tDhfWxxgvcd0EHYGP/+qA4YXvS9ZPF0=; b=rCbDL9r5PrRr/rkvy/v1sRbfME46Oyf75rkJCio53Iy8RMnNWcRe/+DlhPWVBwSI1R 9bEuacjYWUyyrnEw6IsTz9t1bgG0o3oU1gvi6PgyKR+QACce1wXLefOkUbXMu8WoPjuw dNvSKL+PRdObuMpwzLnHKvod4r4IUrSWpPgOmYs1np98avneYn0L/rCls3U+4ZKe7RDw wlxzcvgErMKxHnOAOhpAHpcb/TAJ7RjBcWf9EsM4g/h8HbhKeHlIp+J0J9AwwZhz+44V WeydW6NLTVxIUd1wGcn8f4f3bIvbgoTP7ngNM0vTgxuIZNsq73yOSObQU5rUzardRKb3 S0cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=oUF3K172DiD3tDhfWxxgvcd0EHYGP/+qA4YXvS9ZPF0=; b=IQujaSGblTUpsiJ/6xbfdqzyAfgImydjNrlXsi12G7RYHYKlT4zMJkId7QZZo2Mhvl HILQuUYKlHu4U7IYUNyr/dPb3uVIe1/geDZ19khSK7zlrAPZHzKqTU5UGMgO28Vvm9FU htwaecA3hWfhkFvCi/Wb1Fpon4ZkVOEPxWhJgAl1O0KrZFuOC59Uwhs/ZGIc2L8sqfVm 4u6HGvxwJbtS8H5pTF7VXINlIs+DAETR//mulO32uNvN0h5qZHIDvJg9x2kpqi6QWmMV d3daucxN56i8IMfPggKlHYno8aVllv1p97IZiBfpjuROfb36urZr68DXg9w2LJs8XX8U RJNw== X-Gm-Message-State: APjAAAXMfqrZZopR02f7f8/+HrMuiyV2xMRbt1xtE84V+PxUdrww0Fn+ /j4EDbgKu4iAEyhwhoDUrvk= X-Google-Smtp-Source: APXvYqySa7++MDSmBqk3c3EeKJYp16nxQC95DtpkPz/VUko4Ygw9n+RHlpc54EY5G8Nt91wLxyVi1g== X-Received: by 2002:a17:906:1108:: with SMTP id h8mr80310191eja.229.1564393302048; Mon, 29 Jul 2019 02:41:42 -0700 (PDT) Received: from rimwks ([2001:470:1f15:3d8:7285:c2ff:fe37:5722]) by smtp.gmail.com with ESMTPSA id x10sm15883227edd.73.2019.07.29.02.41.40 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 29 Jul 2019 02:41:41 -0700 (PDT) From: Rozhuk Ivan X-Google-Original-From: Rozhuk Ivan Date: Mon, 29 Jul 2019 12:41:36 +0300 To: Evilham Cc: freebsd-current@freebsd.org Subject: Re: acpi issues on FreeBSD-current_r350103 on Thinkpad A485 Message-ID: <20190729124136.7868f0a3@rimwks> In-Reply-To: <3b186187-c9f6-46d2-939a-eceb6fa0359c@yggdrasil.evilham.com> References: <3b186187-c9f6-46d2-939a-eceb6fa0359c@yggdrasil.evilham.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; amd64-portbld-freebsd12.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 25910750EB X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=rCbDL9r5; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of rozhukim@gmail.com designates 2a00:1450:4864:20::52c as permitted sender) smtp.mailfrom=rozhukim@gmail.com X-Spamd-Result: default: False [-6.48 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; TAGGED_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[c.2.5.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org : 127.0.5.0]; IP_SCORE(-3.01)[ip: (-9.52), ipnet: 2a00:1450::/32(-3.03), asn: 15169(-2.44), country: US(-0.05)]; MID_RHS_NOT_FQDN(0.50)[] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2019 09:41:44 -0000 On Sat, 20 Jul 2019 00:54:47 +0200 Evilham wrote: > Minor glitches: > - xbacklight doesn't work, neither does intel-backlight because > it's AMD > - Speakers don't appear to work, audio input/output on 3.5 jack > does. > - SD card reader doesn't work (Bounty for 125 USD: > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=204521) I have Asus 505 and backlight not work too (try via xfce4-power-manager). I dig into it and found that problem somewhere in ACPI code. 1. It does not proper export some functions and FreeBSD ACPI + xfce4-power-manager cant detect support this feature. I hack kernel: Index: /usr/src/sys/dev/acpica/acpi_video.c =================================================================== --- /usr/src/sys/dev/acpica/acpi_video.c (revision 350398) +++ /usr/src/sys/dev/acpica/acpi_video.c (working copy) @@ -1053,8 +1053,12 @@ dcs = 0; status = acpi_GetInteger(handle, "_DCS", &dcs); if (ACPI_FAILURE(status)) - printf("can't evaluate %s._DCS - %s\n", - acpi_name(handle), AcpiFormatException(status)); + status = acpi_GetInteger(handle, "_STA", &dcs); + if (ACPI_FAILURE(status)) { + /* Assume that device OK by default. */ + dcs = (DCS_EXISTS | DCS_ACTIVE | DCS_READY | + DCS_FUNCTIONAL | DCS_ATTACHED); + } return (dcs); } and now acpi/xfce4-power-manager show that feature supported but it does not work. (later I can move this hack into ACPI ASL code that load into bios, but it harder to maintain) 2. I dig more depper and decompile acpi code via isl. There is a mess. I found that function that set backlight level check some mem/register value before write new backlight value. I fail to found place where this value changed. I try rewrite code to remove this check and recompile ACPI and load new version witout this check on FreeBSD boot, it loaded but backlight still not work. Also I set in loader.conf: hw.acpi.osname="Windows 2015" # Some systems' ASL may have problems because they look for names of Microsoft operating systems. because there is at least 4 different places in decompiled ACPI where OS version and name checked - not help with blackligth, but as I see this unblock some features/devices. Also i2c touchpad dont work. https://reviews.freebsd.org/D16698 not help. For speakers probably wrong snddev set. Try change hw.snd.default_unit. > WARNING !drm_modeset_is_locked(&plane->mutex) failed at > /wrkdirs/usr/ports/graphics/drm-fbsd12.0-kmod/work/kms-drm-6365030/drivers/gpu/drm/drm_atomic_helper.c:821 > [Multiple times...] > kernel trap 22 with interrupts disabled > kernel trap 22 with interrupts > disabled > kernel trap 22 with interrupts disabled > kernel trap 22 with interrupts disabled > panic: spin lock held too long I have another issue with amdgpu: after lid closed and open again video freezes to few seconds every 10 seconds. Switch to scfb xorg driver to fix it, but get small tearing on video playback.