From nobody Sat Mar 05 18:19:35 2022 X-Original-To: freebsd-hackers@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 58B0219EB3BF for ; Sat, 5 Mar 2022 18:19:45 +0000 (UTC) (envelope-from georg.lastname@web.de) Received: from mout.web.de (mout.web.de [212.227.15.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mout.web.de", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4K9tKr1VXDz3PRP for ; Sat, 5 Mar 2022 18:19:44 +0000 (UTC) (envelope-from georg.lastname@web.de) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1646504375; bh=Rl9gorq04Z3egxI82VdtWdLO3qXtfl7pxcbAjg9M0ug=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=ULHQ51czWlix73p0xOOOADP4Z/uGAtn7BzaEEYgMdaqgWbbA8+IOJsglBp67+rpN5 IVkkmpWKZmD29tyYbt/N45qqBzEJAIxcyL7lmAL5RwTALU+lKhPVxYgGWVL75UKevC 0Ksz+sADQlOm5H1UJMUL6QePI9xrFfpCjLlCoCPQ= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from [10.236.197.8] ([10.236.197.8]) by msvc-mesg-web112.server.lan (via HTTP); Sat, 5 Mar 2022 19:19:35 +0100 List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 Message-ID: From: georg.lastname@web.de To: Milan Obuch Cc: freebsd-hackers@freebsd.org Subject: Aw: GPD Micro PC power button and lid close [originally Re: GPD Micro PC serial port] Content-Type: text/plain; charset=UTF-8 Importance: normal Sensitivity: Normal Date: Sat, 5 Mar 2022 19:19:35 +0100 In-Reply-To: <20220304161609.5654c1b3@zeta.dino.sk> References: <20220304144235.26276414@zeta.dino.sk> <20220304161609.5654c1b3@zeta.dino.sk> X-Priority: 3 X-Provags-ID: V03:K1:140XLdCHKT+wKJzbecKw0TKC1DK5V3bVtD7tyDsDrLwbi4FFCsCNqCYFErqYb8U5xwEtT jsmLLSFl95us0g5eCYZpgbZ9Lm9561vMI8fEAj5nynrP6am8jIm0by4Z940Vw9zQ09Tan2am3hSM ix/L/8CLr/1BREwAhw6OoKIKGFRLFezGAMCnZ8dLGcxuFhY7f/BzGLh8fDN94BxW48gND8NdSD05 RFRy2yjQKt9XUoSqcLpD3lafJAppYzE3eoARCybNfND17TXsVPd3Ovk6LyK/43HtAiAM7gUg7gGw KVy/vexw+BUnl00FEQ8RYaK X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:M+M/4bRYs58=:hjFyHIKSTLp3Qj4Yx2eN/v +gQ44i6DYoMf9OxWRZd668r+KnqWide10aeufeTeLsEWYn2MouNskTeSDoo2okNTbfJpkNrfi KKniIYPAmOetMT9HYa+gdVvxJ1PsQx4eoKCI9vQa6Qa0StdhN6hKedwv1iofZiVrf07I0nhkY lSudMFRVMLKNCNmg1UJbwNI/V5kg2+Ks0xU0wCkqNGne18D/2HupGak4zlIGFBhpfO9t8RHmr NqA+ZN6bN9cpmqk6VaSX6+vfu4QV6EzSY+lM0ssOxO71NDRSSWJYSrMF/CRbFdmrAo94mZ4BQ +Fbw3nlweYncsatDqCYdT7bGFC7PRdbqJXHmV1LZkalXa+IT43xxT5+reRa1j/XgdUPIZeS1J pir7zcCqRuBYYqnyhSYxgOLwbDwNhzs9vowKcX2bQ/QOqKmHQCukcgtcsoCh7NctWaPWKAYhX Oq6C80GZhB7Ea1tgQx2TdErawLcrlFZdDGLwCiYV8xMdvrUej/FBdVd4XyBL6ghV5fJ1TvSah 2H3c+AebxxHBKms6cxdYVOf90MT8Orqz5WBQl+HBCKMNf+m+8j4X/D7hFXg8gid+zS/ow8tWg xnE4rPhGU1r7qfN7l8fqM2J7qeMtGQlFGq9zF3ndOGyBthYzX3FMHAs+UVzIQo9iXIv9b9hHh XKWuWzzLvM2vE8DVH4vVFF0wvp7abu9ZyrImcScxUr9EfJoXI+1Z2CmBr3TaxkI0shPXxAzMo B7OXOvd/yA36IWjWlgx675MZT6t+9kHlDz+6UpvdBlWZ8bepTzd59vKAwHuyFwdf/mzJTY94j RsbERkG Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4K9tKr1VXDz3PRP X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=web.de header.s=dbaedf251592 header.b=ULHQ51cz; dmarc=pass (policy=none) header.from=web.de; spf=pass (mx1.freebsd.org: domain of georg.lastname@web.de designates 212.227.15.3 as permitted sender) smtp.mailfrom=georg.lastname@web.de X-Spamd-Result: default: False [-4.60 / 15.00]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[web.de]; R_SPF_ALLOW(-0.20)[+ip4:212.227.15.0/25]; RWL_MAILSPIKE_GOOD(0.00)[212.227.15.3:from]; DKIM_TRACE(0.00)[web.de:+]; RCPT_COUNT_TWO(0.00)[2]; HAS_X_PRIO_THREE(0.00)[3]; NEURAL_HAM_SHORT(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[web.de,none]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[web.de]; ASN(0.00)[asn:8560, ipnet:212.227.0.0/16, country:DE]; RCVD_IN_DNSWL_LOW(-0.10)[212.227.15.3:from]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[web.de:s=dbaedf251592]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DWL_DNSWL_LOW(-1.00)[web.de:dkim]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_NO_DN(0.00)[]; MLMMJ_DEST(0.00)[freebsd-hackers]; MID_RHS_NOT_FQDN(0.50)[]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: N > Gesendet: Freitag, den 04.03.2022 um 16:16 Uhr > Von: "Milan Obuch" > An: freebsd-hackers@freebsd.org > Betreff: GPD Micro PC power button and lid close [originally Re: GPD Mic= ro PC serial port] > > On Fri, 4 Mar 2022 20:51:50 +0700 > Eugene Grosbein wrote: > > > 04.03.2022 20:42, Milan Obuch wrote: > > > > > Hi, > > > > > > for mobile usage I've got Micro PC from GPD, some description and > > > data here: > > > > > > https://www.amazon.com/Industry-Portable-Computer-Notebook-Graphics/= dp/B07QYZHM8F > > > > > > I managed to install dual boot FreeBSD/Windows here. Working with > > > FreeBSD 13 here, it was possible to verify working ethernet, wifi, X > > > on both internal display and HDMI connected monitor, and all basic > > > devices. > > > > > > I've put dmesg from at > > > https://dmesgd.nycbug.org/index.cgi?do=3Dview&id=3D6461 > > > > > > There is one think I'd like to get into working state - serial > > > port. In Windows, it is COM2 with standard I/O address and IRQ, > > > however, I see nothing in FreeBSD... has somebody any hint for me? > > > > You seem to use custom kernel configuration. Did you try GENERIC? > > Can you share your kernel config? Also output of "pciconf -lv" > > and "dmidecode" commands ("pkg install dmidecode" for the latter). > > > > Yes, I use custom kernel, basically MINIMAL with some modules loaded > via loader.conf, other automatically and i915kms from rc.conf. As I > verified correct values are in device.hints, I found the solution - > loading module uart.ko from running system installed uart2..uart5 (no > idea what it is used for, you'll see them in some data provided), but > loading it from loader.conf brings uart1..uart5. Problem solved, I just > verified it is exactly the port on back. > > Just for info, output from 'pciconf -lv' is attached. 'dmidecode' > output added as well. Now, with serial port working, I see there is > something else I forgot - power button does nothing when FreeBSD is > running, just long press powers it off without proper shutdown > sequence. 'dmesg | grep acpi' tells > > acpi0: > cpu0: on acpi0 > attimer0: port 0x40-0x43,0x50-0x53 irq 0 on acpi0 > atrtc0: port 0x70-0x77 on acpi0 > hpet0: iomem 0xfed00000-0xfed003ff irq 8 on= acpi0 > acpi_timer0: <32-bit timer at 3.579545MHz> port 0x408-0x40b on acpi0 > acpi_ec0: port 0x62,0x66 on acpi0 > pcib0: port 0xcf8-0xcff on acpi0 > acpi_button0: on acpi0 > acpi_tz0: on acpi0 > atkbdc0: port 0x60,0x64 irq 1 on acpi0 > uart1: <16550 or compatible> port 0x2f8-0x2ff irq 3 on acpi0 > acpi_acad0: on acpi0 > battery0: on acpi0 > acpi_lid0: on acpi0 > > so there should be something handling power button (and lid close > event, as well). Any idea here? > > Regards, > Milan Hey, You can turn on verbose logging of acpi with "hw.acpi.verbose" kernel envi= ronment variable. On pressing the power button, you should see the log "po= wer button pressed\n" and maybe more.. Maybe this cpu doesnt support sleep state S5 (I'm a noob), as it should be= triggered when pressing the power button (see the hw.acpi.power_button_s= tate sysctl).