Re: suspend/resume issue on T440p w/ Libreboot

2023-09-05 Thread Robert Alessi
On Sat, Aug 26, 2023 at 07:31:21AM -0600, Theo de Raadt wrote:
> There is a change to acpi.c (1.421) regarding wakeup GPEs which
> may help, however this is work was done after 7.3

I just tried to suspend this corebooted T440p with -current and I can
confirm that everything works just as expected.

Thank you!



Re: suspend/resume issue on T440p w/ Libreboot

2023-08-26 Thread Robert Alessi
On Sat, Aug 26, 2023 at 07:31:21AM -0600, Theo de Raadt wrote:
> There is a change to acpi.c (1.421) regarding wakeup GPEs which
> may help, however this is work was done after 7.3

So it's in -current.  The description given on CVS fits with what's
happening to my machine.  I'll be able to test this next month.

Thank you!



Re: suspend/resume issue on T440p w/ Libreboot

2023-08-26 Thread Theo de Raadt
There is a change to acpi.c (1.421) regarding wakeup GPEs which
may help, however this is work was done after 7.3



Re: suspend/resume issue on T440p w/ Libreboot

2023-08-26 Thread Robert Alessi
On Sat, Aug 26, 2023 at 05:58:50AM -0600, Jonathan Drews wrote:
> On Sat, Aug 26, 2023 at 01:47:06PM +0200, Robert Alessi wrote:
> > On Sat, Aug 26, 2023 at 04:19:23AM -0600, Jonathan Drews wrote:
> > > I don't have an /etc/apm directory. Howvere I have this in my
> > > /etc/rc.conf.local 
> > > 
> > > apmd_flags=-A
> > 
> > My apmd flags are a bit different: -H -Z 10
> > 
> > Is your laptop coreboot-ed or do you use stock BIOS?
> 
> I am using the BIOS. No coreboot here.

This is why zzz works on your side.  My problem comes from coreboot
albeit suspend worked with the debian that was installed when I
received the machine.

Cheers,

-- R.



Re: suspend/resume issue on T440p w/ Libreboot

2023-08-26 Thread Jonathan Drews
On Sat, Aug 26, 2023 at 01:47:06PM +0200, Robert Alessi wrote:
> On Sat, Aug 26, 2023 at 04:19:23AM -0600, Jonathan Drews wrote:
> > I don't have an /etc/apm directory. Howvere I have this in my
> > /etc/rc.conf.local 
> > 
> > apmd_flags=-A
> 
> My apmd flags are a bit different: -H -Z 10
> 
> Is your laptop coreboot-ed or do you use stock BIOS?
> 


I am using the BIOS. No coreboot here.

--
Kind regards,
Jonathan



Re: suspend/resume issue on T440p w/ Libreboot

2023-08-26 Thread Robert Alessi
On Sat, Aug 26, 2023 at 04:19:23AM -0600, Jonathan Drews wrote:
> On Sat, Aug 26, 2023 at 11:32:32AM +0200, Robert Alessi wrote:
> > Hi,
> > 
> > When I try to suspend my system, my T440p with Libreboot first goes
> > into sleep mode alright then resumes spontaneoulsy after about 10s.  I
> > know that Libreboot had issues with the suspend mode on this laptop,
> > but these seem to have been solved in recent versions.
> > 
> 
> $ uname -a 
> OpenBSD leo.my.domain 7.3 GENERIC.MP#3 amd64
> 
> I am running OpenBSD 7.3 on a Thinkpad T440 and suspend and resume
> work great. I use either zzz or ZZZ or just close the lid. 
> 
> I don't have an /etc/apm directory. Howvere I have this in my
> /etc/rc.conf.local 
> 
> apmd_flags=-A

My apmd flags are a bit different: -H -Z 10

Is your laptop coreboot-ed or do you use stock BIOS?

Thank you,

-- R.



Re: suspend/resume issue on T440p w/ Libreboot

2023-08-26 Thread Jonathan Drews
On Sat, Aug 26, 2023 at 11:32:32AM +0200, Robert Alessi wrote:
> Hi,
> 
> When I try to suspend my system, my T440p with Libreboot first goes
> into sleep mode alright then resumes spontaneoulsy after about 10s.  I
> know that Libreboot had issues with the suspend mode on this laptop,
> but these seem to have been solved in recent versions.
> 

$ uname -a 
OpenBSD leo.my.domain 7.3 GENERIC.MP#3 amd64

I am running OpenBSD 7.3 on a Thinkpad T440 and suspend and resume
work great. I use either zzz or ZZZ or just close the lid. 

I don't have an /etc/apm directory. Howvere I have this in my
/etc/rc.conf.local 

apmd_flags=-A


--
Kind regards,
Jonathan



suspend/resume issue on T440p w/ Libreboot

2023-08-26 Thread Robert Alessi
Hi,

When I try to suspend my system, my T440p with Libreboot first goes
into sleep mode alright then resumes spontaneoulsy after about 10s.  I
know that Libreboot had issues with the suspend mode on this laptop,
but these seem to have been solved in recent versions.

What I can say is that I received this laptop with Debian installed
and the suspend mode was working.

I tried both 'apm -S' and 'apm -z'.

My /etc/apm/suspend reads as follows:
   # cat /etc/apm/suspend   
  
   #!/bin/sh
   ifconfig iwn0 down
   arp -d -a

I add below an extract of /var/log/messages that shows what happens
when I do zzz, and of course my dmesg.

So far I haven't been able to identify the problem, but I understand
it may have nothing to do with OpenBSD.  Thanks in advance
for any help!

-- Robert


cinnamon# tail -f /var/log/messages 
   
2023-08-26T08:00:01.905Z cinnamon newsyslog[92452]: logfile turned over
Aug 26 10:00:01 cinnamon syslogd[18363]: restart
Aug 26 10:45:04 cinnamon apmd: system suspending
Aug 26 10:45:04 cinnamon apmd: battery status: high. external power status: 
connected. estimated battery life 100%
Aug 26 10:45:06 cinnamon /bsd: wskbd1: disconnecting from wsdisplay0
Aug 26 10:45:06 cinnamon /bsd: wskbd1 detached
Aug 26 10:45:06 cinnamon /bsd: ukbd0 detached
Aug 26 10:45:06 cinnamon /bsd: uhidev0 detached
Aug 26 10:45:06 cinnamon /bsd: fido0 detached
Aug 26 10:45:06 cinnamon /bsd: uhidev1 detached
Aug 26 10:45:06 cinnamon /bsd: ugen0 detached
Aug 26 10:45:07 cinnamon /bsd: sd1 detached
Aug 26 10:45:07 cinnamon /bsd: scsibus2 detached
Aug 26 10:45:08 cinnamon /bsd: umass0 detached
Aug 26 10:45:09 cinnamon /bsd: ugen1 detached
Aug 26 10:45:10 cinnamon /bsd: video0 detached
Aug 26 10:45:10 cinnamon /bsd: uvideo0 detached
Aug 26 10:45:15 cinnamon /bsd: uhub0 detached
Aug 26 10:45:15 cinnamon /bsd: uhub3 detached
Aug 26 10:45:15 cinnamon /bsd: uhub1 detached
Aug 26 10:45:15 cinnamon /bsd: uhub4 detached
Aug 26 10:45:15 cinnamon /bsd: uhub2 detached
Aug 26 10:45:15 cinnamon /bsd: uhub0 at usb0 configuration 1 interface 0 "Intel 
xHCI root hub" rev 3.00/1.00 addr 1
Aug 26 10:45:15 cinnamon /bsd: uhub1 at usb1 configuration 1 interface 0 "Intel 
EHCI root hub" rev 2.00/1.00 addr 1
Aug 26 10:45:15 cinnamon /bsd: uhub2 at usb2 configuration 1 interface 0 "Intel 
EHCI root hub" rev 2.00/1.00 addr 1
Aug 26 10:45:15 cinnamon /bsd: uhidev0 at uhub0 port 3 configuration 1 
interface 0 "Yubico YubiKey OTP+FIDO+CCID" rev 2.00/5.43 addr 2
Aug 26 10:45:15 cinnamon /bsd: uhidev0: iclass 3/1
Aug 26 10:45:15 cinnamon /bsd: ukbd0 at uhidev0: 8 variable keys, 6 key codes
Aug 26 10:45:16 cinnamon /bsd: wskbd1 at ukbd0 mux 1
Aug 26 10:45:16 cinnamon /bsd: wskbd1: connecting to wsdisplay0
Aug 26 10:45:16 cinnamon /bsd: uhidev1 at uhub0 port 3 configuration 1 
interface 1 "Yubico YubiKey OTP+FIDO+CCID" rev 2.00/5.43 addr 2
Aug 26 10:45:16 cinnamon /bsd: uhidev1: iclass 3/0
Aug 26 10:45:16 cinnamon /bsd: fido0 at uhidev1: input=64, output=64, feature=0
Aug 26 10:45:16 cinnamon /bsd: ugen0 at uhub0 port 3 configuration 1 "Yubico 
YubiKey OTP+FIDO+CCID" rev 2.00/5.43 addr 2
Aug 26 10:45:16 cinnamon /bsd: umass0 at uhub0 port 6 configuration 1 interface 
0 "SanDisk Cruzer Fit" rev 2.00/1.00 addr 3
Aug 26 10:45:16 cinnamon /bsd: umass0: using SCSI over Bulk-Only
Aug 26 10:45:16 cinnamon /bsd: scsibus2 at umass0: 2 targets, initiator 0
Aug 26 10:45:16 cinnamon /bsd: sd1 at scsibus2 targ 1 lun 0:  removable serial.07815571091119114203
Aug 26 10:45:16 cinnamon /bsd: sd1: 15060MB, 512 bytes/sector, 30842880 sectors
Aug 26 10:45:17 cinnamon /bsd: ugen1 at uhub0 port 11 "Intel Bluetooth" rev 
2.00/78.69 addr 4
Aug 26 10:45:18 cinnamon /bsd: uvideo0 at uhub0 port 12 configuration 1 
interface 0 "SunplusIT INC. Integrated Camera" rev 2.00/26.03 addr 5
Aug 26 10:45:18 cinnamon /bsd: video0 at uvideo0
Aug 26 10:45:18 cinnamon apmd: system resumed from sleep
Aug 26 10:45:18 cinnamon apmd: battery status: high. external power status: 
connected. estimated battery life 100%
Aug 26 10:45:20 cinnamon /bsd: sdmmc0: can't enable card
Aug 26 10:45:20 cinnamon /bsd: uhub3 at uhub1 port 1 configuration 1 interface 
0 "Intel Rate Matching Hub" rev 2.00/0.05 addr 2
Aug 26 10:45:21 cinnamon /bsd: uhub4 at uhub2 port 1 configuration 1 interface 
0 "Intel Rate Matching Hub" rev 2.00/0.05 addr 2


dmesg:

OpenBSD 7.3 (GENERIC.MP) #3: Tue Jul 25 08:20:26 MDT 2023

r...@syspatch-73-amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 17118093312 (16325MB)
avail mem = 16579878912 (15811MB)
random: good seed from bootblocks
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus