Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 Mar 2022 19:19:35 +0100
From:      georg.lastname@web.de
To:        Milan Obuch <freebsd-hackers@dino.sk>
Cc:        freebsd-hackers@freebsd.org
Subject:   Aw: GPD Micro PC power button and lid close [originally Re: GPD Micro PC serial port]
Message-ID:  <trinity-690a97dd-2848-431e-983b-f9f1a0337f8a-1646504375322@msvc-mesg-web111>
In-Reply-To: <20220304161609.5654c1b3@zeta.dino.sk>
References:  <20220304144235.26276414@zeta.dino.sk> <b4137440-b57a-fd39-8402-82021059bfe1@grosbein.net> <20220304161609.5654c1b3@zeta.dino.sk>

next in thread | previous in thread | raw e-mail | index | archive | help
> Gesendet: Freitag, den 04.03.2022 um 16:16 Uhr
> Von: "Milan Obuch" <freebsd-hackers@dino.sk>
> 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 <eugen@grosbein.net> 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: <ALASKA A M I >
> cpu0: <ACPI CPU> on acpi0
> attimer0: <AT timer> port 0x40-0x43,0x50-0x53 irq 0 on acpi0
> atrtc0: <AT realtime clock> port 0x70-0x77 on acpi0
> hpet0: <High Precision Event Timer> iomem 0xfed00000-0xfed003ff irq 8 on=
 acpi0
> acpi_timer0: <32-bit timer at 3.579545MHz> port 0x408-0x40b on acpi0
> acpi_ec0: <Embedded Controller: GPE 0x26> port 0x62,0x66 on acpi0
> pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
> acpi_button0: <Power Button> on acpi0
> acpi_tz0: <Thermal Zone> on acpi0
> atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
> uart1: <16550 or compatible> port 0x2f8-0x2ff irq 3 on acpi0
> acpi_acad0: <AC Adapter> on acpi0
> battery0: <ACPI Control Method Battery> on acpi0
> acpi_lid0: <Control Method Lid Switch> 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).



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?trinity-690a97dd-2848-431e-983b-f9f1a0337f8a-1646504375322>