Sorry for the long post.

This is current/amd64 on a MacBook2,1 (model A1181), dmesg below.
I experience the same on a MacBook1,1 running current/i386.

On the console, each of apm -S -z -Z works, closing the lid as well.
Each of them also resumes as expected.

On the other hand, trying to get to sleep from an xterm
(via apm -S or -z or -Z) does not fully resume: upon resuming,
X gets killed, the console keyboard does not reconnect properly,
and keyboard input becomes garbage.  There is nothing to do but
press the power button to reboot. (Or do it remotely.)

As the symptoms are the same for standby, suspend and hibernate,
I will use suspend (apm -z) in the examples.

/var/log/messages of the console resume (good)
and the X resume (bad) seem mostly the same (both below),
except the naming order of the u* device being (re)attached;
and the messages from the X suspend have some extra newlines
in the middle of the message lines (which seems strange).
Here is the diff lines (minus the leading timestamps):

  --- apm.good  Mon May 22 09:45:56 2017
  +++ apm.bad   Mon May 22 09:46:00 2017

  -uhub0 detached
  +uhub2 detached

  -uhub2 detached
  +uhub3 detached

  -uhub3 detached
  +uhub4 detached

  -uhub4 detached
  +uhub0 detached

  -uhidev1 at uhub0 port 2 configuration 1 interface 1 "Apple Computer Apple 
Internal Keyboard / Trackpad" rev 2.00/0.18 addr 2
  +uhidev1 at uhub0
  + port 2 configuration 1 interface 1 "Apple Computer Apple Internal Keyboard 
/ Trackpad" rev 2.00/0.18 addr 2

  -uhid2 at uhidev3 reportid 37: input=4, output=0, feature=0
  +uhid2 at uhidev3 reportid 37
  +: input=4, output=0, feature=0


Please also see the Xorg log of the killed X session below.
Firstly, it complains about /dev/xf86 and /dev/mem
and asks for 'machdep.allowaperture=1'.

  (WW) checkDevMem: failed to open /dev/xf86 and /dev/mem
    (Operation not permitted)
    Check that you have set 'machdep.allowaperture=1'

Is that expected with inteldrm(4)?
Is that related to the following drm errors in dmesg?
Can it be related to the X not resuming?

drm: render error detected, EIR: 0x00000010
drm: page table error
drm:   PGTBL_ER: 0x00000102
error: [drm:pid0:i915_report_and_clear_eir] *ERROR* EIR stuck: 0x00000010, 
masking
drm: render error detected, EIR: 0x00000010
drm: page table error
drm:   PGTBL_ER: 0x00000102

The X log also says:

  (II) The server relies on wscons to provide the list of input devices.
  If no devices become available, reconfigure wscons or disable AutoAddDevices.

and later ends (when X gets killed upon resume) with

  Fatal server error:
  [   257.752] (EE) can't switch keyboard to raw mode.
  Enable support for it in the kernel or use for example:

    Option "Protocol" "wskbd"
    Option "Device" "/dev/wskbd0"

  in your xorg.conf(5) file


I don't have a xorg.conf, because X works just fine beside this.
Apparently, it has something to do with reattaching the wskbd,
but that's way over my head. How do I enable support for
"raw keyboard mode" in the kernel (it that's my problem)?

How can I help debug this?

        Jan


boot dmesg:

OpenBSD 6.1-current (GENERIC.MP) #0: Sat May 20 12:31:37 CEST 2017
    [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 3171909632 (3024MB)
avail mem = 3070050304 (2927MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xe0000 (37 entries)
bios0: vendor Apple Inc. version "MB21.88Z.00A5.B07.0706270922" date 06/27/07
bios0: Apple Inc. MacBook2,1
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP HPET APIC MCFG ASF! SBST ECDT SSDT SSDT SSDT
acpi0: wakeup devices ADP1(S3) LID0(S3) PXS1(S4) PXS2(S4) USB1(S3) USB2(S3) 
USB3(S3) USB4(S3) USB7(S3) EC__(S3)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 14318179 Hz
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM)2 CPU T7400 @ 2.16GHz, 2161.65 MHz
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,NXE,LONG,LAHF,PERF,SENSOR
cpu0: 4MB 64b/line 16-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 166MHz
cpu0: mwait min=64, max=64, C-substates=0.2.2.2.2, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM)2 CPU T7400 @ 2.16GHz, 2161.25 MHz
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,NXE,LONG,LAHF,PERF,SENSOR
cpu1: 4MB 64b/line 16-way L2 cache
cpu1: smt 0, core 1, package 0
ioapic0 at mainbus0: apid 1 pa 0xfec00000, version 20, 24 pins
acpimcfg0 at acpi0 addr 0xf0000000, bus 0-255
acpiec0 at acpi0
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (RP01)
acpiprt2 at acpi0: bus 2 (RP02)
acpiprt3 at acpi0: bus 3 (PCIB)
acpicpu0 at acpi0: !C3(100@55 mwait@0x31), !C2(500@1 mwait@0x10), C1(1000@1 
mwait), PSS
acpicpu1 at acpi0: !C3(100@55 mwait@0x31), !C2(500@1 mwait@0x10), C1(1000@1 
mwait), PSS
acpisbs0 at acpi0: SBS0 model "ASMB016" serial 19351 type LION oem "DP"
acpiac0 at acpi0: AC unit offline
acpibtn0 at acpi0: LID0
"APP0002" at acpi0 not configured
acpibtn1 at acpi0: PWRB
acpibtn2 at acpi0: SLPB
"APP0001" at acpi0 not configured
"APP0003" at acpi0 not configured
"ACPI0001" at acpi0 not configured
acpivideo0 at acpi0: GFX0
cpu0: Enhanced SpeedStep 2161 MHz: speeds: 2167, 2000, 1833, 1667, 1500, 1333, 
1000 MHz
memory map conflict 0xbef00000/0x100000
memory map conflict 0xbf000000/0x1000000
memory map conflict 0xf00f8000/0x1000
memory map conflict 0xfed1c000/0x4000
memory map conflict 0xfffb0000/0x30000
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel 82945GM Host" rev 0x03
inteldrm0 at pci0 dev 2 function 0 "Intel 82945GM Video" rev 0x03
drm0 at inteldrm0
intagp0 at inteldrm0
agp0 at intagp0: aperture at 0xc0000000, size 0x10000000
inteldrm0: apic 1 int 16
inteldrm0: 1280x800, 32bpp
wsdisplay0 at inteldrm0 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
"Intel 82945GM Video" rev 0x03 at pci0 dev 2 function 1 not configured
vendor "Intel", unknown product 0x27a3 (class DASP subclass Time and Frequency, 
rev 0x03) at pci0 dev 7 function 0 not configured
azalia0 at pci0 dev 27 function 0 "Intel 82801GB HD Audio" rev 0x02: msi
azalia0: codecs: Sigmatel STAC9220/1
audio0 at azalia0
ppb0 at pci0 dev 28 function 0 "Intel 82801GB PCIE" rev 0x02: msi
pci1 at ppb0 bus 1
mskc0 at pci1 dev 0 function 0 "Marvell Yukon 88E8053" rev 0x22, Yukon-2 EC 
rev. A3 (0x2): msi
msk0 at mskc0 port A: address 00:1b:63:36:2b:5d
eephy0 at msk0 phy 0: 88E1111 Gigabit PHY, rev. 2
ppb1 at pci0 dev 28 function 1 "Intel 82801GB PCIE" rev 0x02: msi
pci2 at ppb1 bus 2
athn0 at pci2 dev 0 function 0 "Atheros AR5418" rev 0x01: apic 1 int 17
athn0: MAC AR5418 rev 2, RF AR5133 (2T3R), ROM rev 4, address 00:1c:b3:c4:b2:ae
uhci0 at pci0 dev 29 function 0 "Intel 82801GB USB" rev 0x02: apic 1 int 21
uhci1 at pci0 dev 29 function 1 "Intel 82801GB USB" rev 0x02: apic 1 int 19
uhci2 at pci0 dev 29 function 2 "Intel 82801GB USB" rev 0x02: apic 1 int 18
uhci3 at pci0 dev 29 function 3 "Intel 82801GB USB" rev 0x02: apic 1 int 16
ehci0 at pci0 dev 29 function 7 "Intel 82801GB USB" rev 0x02: apic 1 int 21
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 configuration 1 interface 0 "Intel EHCI root hub" rev 2.00/1.00 
addr 1
ppb2 at pci0 dev 30 function 0 "Intel 82801BAM Hub-to-PCI" rev 0xe2
pci3 at ppb2 bus 3
"AT&T/Lucent FW322 1394" rev 0x61 at pci3 dev 3 function 0 not configured
pcib0 at pci0 dev 31 function 0 "Intel 82801GBM LPC" rev 0x02
pciide0 at pci0 dev 31 function 1 "Intel 82801GB IDE" rev 0x02: DMA, channel 0 
configured to compatibility, channel 1 configured to compatibility
atapiscsi0 at pciide0 channel 0 drive 0
scsibus1 at atapiscsi0: 2 targets
cd0 at scsibus1 targ 0 lun 0: <MATSHITA, DVD-R UJ-857E, ZB0E> ATAPI 5/cdrom 
removable
cd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 4
pciide0: channel 1 disabled (no drives)
pciide1 at pci0 dev 31 function 2 "Intel 82801GBM SATA" rev 0x02: DMA, channel 
0 configured to native-PCI, channel 1 configured to native-PCI
pciide1: using apic 1 int 19 for native-PCI interrupt
wd0 at pciide1 channel 0 drive 1: <ST980811AS>
wd0: 16-sector PIO, LBA48, 76319MB, 156301488 sectors
wd0(pciide1:0:1): using PIO mode 4, Ultra-DMA mode 6
ichiic0 at pci0 dev 31 function 3 "Intel 82801GB SMBus" rev 0x02: apic 1 int 19
iic0 at ichiic0
iic0: addr 0x48 00=2f 01=00 02=4b 03=50 words 00=2e80 01=00ff 02=4b00 03=5000 
04=ffff 05=ffff 06=ffff 07=ffff
spdmem0 at iic0 addr 0x50: 2GB DDR2 SDRAM non-parity PC2-5300CL5 SO-DIMM
spdmem1 at iic0 addr 0x52: 1GB DDR2 SDRAM non-parity PC2-5300CL5 SO-DIMM
usb1 at uhci0: USB revision 1.0
uhub1 at usb1 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00 
addr 1
usb2 at uhci1: USB revision 1.0
uhub2 at usb2 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00 
addr 1
usb3 at uhci2: USB revision 1.0
uhub3 at usb3 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00 
addr 1
usb4 at uhci3: USB revision 1.0
uhub4 at usb4 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00 
addr 1
isa0 at pcib0
isadma0 at isa0
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
asmc0 at isa0 port 0x300/32: rev 1.17f517, 226 keys
vmm0 at mainbus0: VMX
drm: render error detected, EIR: 0x00000010
drm: page table error
drm:   PGTBL_ER: 0x00000102
error: [drm:pid0:i915_report_and_clear_eir] *ERROR* EIR stuck: 0x00000010, 
masking
drm: render error detected, EIR: 0x00000010
drm: page table error
drm:   PGTBL_ER: 0x00000102
uvideo0 at uhub0 port 4 configuration 1 interface 0 "Apple Computer Bluetooth" 
rev 2.00/0.0c addr 2
uhidev0 at uhub1 port 2 configuration 1 interface 0 "Apple Computer Apple 
Internal Keyboard / Trackpad" rev 2.00/0.18 addr 2
uhidev0: iclass 3/1
ukbd0 at uhidev0: 8 variable keys, 5 key codes, country code 13
wskbd0 at ukbd0: console keyboard, using wsdisplay0
uhidev1 at uhub1 port 2 configuration 1 interface 1 "Apple Computer Apple 
Internal Keyboard / Trackpad" rev 2.00/0.18 addr 2
uhidev1: iclass 3/1, 5 report ids
ums0 at uhidev1 reportid 2: 3 buttons
wsmouse0 at ums0 mux 0
ums1 at uhidev1 reportid 5
ums1: mouse has no X report
uhidev2 at uhub1 port 2 configuration 1 interface 2 "Apple Computer Apple 
Internal Keyboard / Trackpad" rev 2.00/0.18 addr 2
uhidev2: iclass 3/0
uhid0 at uhidev2: input=1, output=0, feature=0
uhidev3 at uhub3 port 2 configuration 1 interface 0 "Apple Computer, Inc. IR 
Receiver" rev 2.00/1.10 addr 2
uhidev3: iclass 3/0, 38 report ids
uhid1 at uhidev3 reportid 36: input=4, output=0, feature=0
uhid2 at uhidev3 reportid 37: input=4, output=0, feature=0
uhid3 at uhidev3 reportid 38: input=4, output=0, feature=0
uhidev4 at uhub4 port 1 configuration 1 interface 0 "Apple Computer HID-proxy" 
rev 2.00/19.65 addr 2
uhidev4: iclass 3/1
ukbd1 at uhidev4: 8 variable keys, 6 key codes
wskbd1 at ukbd1 mux 1
wskbd1: connecting to wsdisplay0
uhidev5 at uhub4 port 1 configuration 1 interface 1 "Apple Computer HID-proxy" 
rev 2.00/19.65 addr 2
uhidev5: iclass 3/1
ums2 at uhidev5: 5 buttons
wsmouse1 at ums2 mux 0
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
sd0 at scsibus3 targ 1 lun 0: <OPENBSD, SR CRYPTO, 006> SCSI2 0/direct fixed
sd0: 20821MB, 512 bytes/sector, 42642928 sectors
root on sd0a (075497a4ce516f3d.a) swap on sd0b dump on sd0b
uvideo0 detached
uvideo0 at uhub0 port 4 configuration 1 interface 0 "Micron Built-in iSight" 
rev 2.00/1.84 addr 2
video0 at uvideo0


apm -z from the console (resumes fine):

May 21 00:33:14 macbook apmd: system suspending
May 21 00:33:15 macbook /bsd: ukbd0: was console keyboard
May 21 00:33:15 macbook /bsd: wskbd0 detached
May 21 00:33:15 macbook /bsd: ukbd0 detached
May 21 00:33:15 macbook /bsd: uhidev0 detached
May 21 00:33:15 macbook /bsd: wsmouse0 detached
May 21 00:33:15 macbook /bsd: ums0 detached
May 21 00:33:15 macbook /bsd: ums1 detached
May 21 00:33:15 macbook /bsd: uhidev1 detached
May 21 00:33:15 macbook /bsd: uhid0 detached
May 21 00:33:15 macbook /bsd: uhidev2 detached
May 21 00:33:15 macbook /bsd: uhub0 detached
May 21 00:33:15 macbook /bsd: uhub1 detached
May 21 00:33:15 macbook /bsd: uhid1 detached
May 21 00:33:15 macbook /bsd: uhid2 detached
May 21 00:33:15 macbook /bsd: uhid3 detached
May 21 00:33:15 macbook /bsd: uhidev3 detached
May 21 00:33:15 macbook /bsd: uhub2 detached
May 21 00:33:15 macbook /bsd: wskbd1: disconnecting from wsdisplay0
May 21 00:33:30 macbook /bsd: wskbd1 detached
May 21 00:33:30 macbook /bsd: ukbd1 detached
May 21 00:33:30 macbook /bsd: uhidev4 detached
May 21 00:33:30 macbook /bsd: wsmouse1 detached
May 21 00:33:30 macbook /bsd: ums2 detached
May 21 00:33:30 macbook /bsd: uhidev5 detached
May 21 00:33:30 macbook /bsd: uhub3 detached
May 21 00:33:30 macbook /bsd: video0 detached
May 21 00:33:30 macbook /bsd: uvideo0 detached
May 21 00:33:30 macbook /bsd: uhub4 detached
May 21 00:33:30 macbook /bsd: uhub0 at usb1 configuration 1 interface 0 "Intel 
UHCI root hub" rev 1.00/1.00 addr 1
May 21 00:33:30 macbook /bsd: uhub1 at usb2 configuration 1 interface 0 "Intel 
UHCI root hub" rev 1.00/1.00 addr 1
May 21 00:33:30 macbook /bsd: uhub2 at usb3 configuration 1 interface 0 "Intel 
UHCI root hub" rev 1.00/1.00 addr 1
May 21 00:33:30 macbook /bsd: uhub3 at usb4 configuration 1 interface 0 "Intel 
UHCI root hub" rev 1.00/1.00 addr 1
May 21 00:33:30 macbook /bsd: uhub4 at usb0 configuration 1 interface 0 "Intel 
EHCI root hub" rev 2.00/1.00 addr 1
May 21 00:33:30 macbook apmd: system resumed from sleep
May 21 00:33:31 macbook /bsd: uvideo0 at uhub4 port 4 configuration 1 interface 
0 "Micron Built-in iSight" rev 2.00/1.84 addr 2
May 21 00:33:31 macbook /bsd: video0 at uvideo0
May 21 00:33:33 macbook /bsd: uhidev0 at uhub0 port 2 configuration 1 interface 
0 "Apple Computer Apple Internal Keyboard / Trackpad" rev 2.00/0.18 addr 2
May 21 00:33:33 macbook /bsd: uhidev0: iclass 3/1
May 21 00:33:33 macbook /bsd: ukbd0 at uhidev0: 8 variable keys, 5 key codes, 
country code 13
May 21 00:33:33 macbook /bsd: wskbd0 at ukbd0: console keyboard, using 
wsdisplay0
May 21 00:33:33 macbook /bsd: uhidev1 at uhub0 port 2 configuration 1 interface 
1 "Apple Computer Apple Internal Keyboard / Trackpad" rev 2.00/0.18 addr 2
May 21 00:33:33 macbook /bsd: uhidev1: iclass 3/1, 5 report ids
May 21 00:33:33 macbook /bsd: ums0 at uhidev1 reportid 2: 3 buttons
May 21 00:33:33 macbook /bsd: wsmouse0 at ums0 mux 0
May 21 00:33:33 macbook /bsd: ums1 at uhidev1 reportid 5
May 21 00:33:33 macbook /bsd: ums1: mouse has no X report
May 21 00:33:33 macbook /bsd: uhidev2 at uhub0 port 2 configuration 1 interface 
2 "Apple Computer Apple Internal Keyboard / Trackpad" rev 2.00/0.18 addr 2
May 21 00:33:33 macbook /bsd: uhidev2: iclass 3/0
May 21 00:33:33 macbook /bsd: uhid0 at uhidev2: input=1, output=0, feature=0
May 21 00:33:34 macbook /bsd: uhidev3 at uhub2 port 2 configuration 1 interface 
0 "Apple Computer, Inc. IR Receiver" rev 2.00/1.10 addr 2
May 21 00:33:34 macbook /bsd: uhidev3: iclass 3/0, 38 report ids
May 21 00:33:34 macbook /bsd: uhid1 at uhidev3 reportid 36: input=4, output=0, 
feature=0
May 21 00:33:34 macbook /bsd: uhid2 at uhidev3 reportid 37: input=4, output=0, 
feature=0
May 21 00:33:34 macbook /bsd: uhid3 at uhidev3 reportid 38: input=4, output=0, 
feature=0
May 21 00:33:35 macbook /bsd: uhidev4 at uhub3 port 1 configuration 1 interface 
0 "Apple Computer HID-proxy" rev 2.00/19.65 addr 2
May 21 00:33:35 macbook /bsd: uhidev4: iclass 3/1
May 21 00:33:35 macbook /bsd: ukbd1 at uhidev4: 8 variable keys, 6 key codes
May 21 00:33:35 macbook /bsd: wskbd1 at ukbd1 mux 1
May 21 00:33:35 macbook /bsd: wskbd1: connecting to wsdisplay0
May 21 00:33:35 macbook /bsd: uhidev5 at uhub3 port 1 configuration 1 interface 
1 "Apple Computer HID-proxy" rev 2.00/19.65 addr 2
May 21 00:33:36 macbook /bsd: uhidev5: iclass 3/1
May 21 00:33:36 macbook /bsd: ums2 at uhidev5: 5 buttons
May 21 00:33:36 macbook /bsd: wsmouse1 at ums2 mux 0


apm -z from an xterm (kills X upon resume, does not connect keyboard):

May 21 00:43:35 macbook apmd: system suspending
May 21 00:43:37 macbook /bsd: ukbd0: was console keyboard
May 21 00:43:37 macbook /bsd: wskbd0 detached
May 21 00:43:37 macbook /bsd: ukbd0 detached
May 21 00:43:37 macbook /bsd: uhidev0 detached
May 21 00:43:37 macbook /bsd: wsmouse0 detached
May 21 00:43:37 macbook /bsd: ums0 detached
May 21 00:43:37 macbook /bsd: ums1 detached
May 21 00:43:37 macbook /bsd: uhidev1 detached
May 21 00:43:37 macbook /bsd: uhid0 detached
May 21 00:43:37 macbook /bsd: uhidev2 detached
May 21 00:43:37 macbook /bsd: uhub1 detached
May 21 00:43:37 macbook /bsd: uhub2 detached
May 21 00:43:37 macbook /bsd: uhid1 detached
May 21 00:43:37 macbook /bsd: uhid2 detached
May 21 00:43:37 macbook /bsd: uhid3 detached
May 21 00:43:37 macbook /bsd: uhidev3 detached
May 21 00:43:37 macbook /bsd: uhub3 detached
May 21 00:43:38 macbook /bsd: wskbd1: disconnecting from wsdisplay0
May 21 00:43:49 macbook /bsd: wskbd1 detached
May 21 00:43:49 macbook /bsd: ukbd1 detached
May 21 00:43:49 macbook /bsd: uhidev4 detached
May 21 00:43:49 macbook /bsd: wsmouse1 detached
May 21 00:43:49 macbook /bsd: ums2 detached
May 21 00:43:49 macbook /bsd: uhidev5 detached
May 21 00:43:49 macbook /bsd: uhub4 detached
May 21 00:43:49 macbook /bsd: video0 detached
May 21 00:43:49 macbook /bsd: uvideo0 detached
May 21 00:43:49 macbook /bsd: uhub0 detached
May 21 00:43:49 macbook /bsd: uhub0 at usb1 configuration 1 interface 0 "Intel 
UHCI root hub" rev 1.00/1.00 addr 1
May 21 00:43:49 macbook /bsd: uhub1 at usb2 configuration 1 interface 0 "Intel 
UHCI root hub" rev 1.00/1.00 addr 1
May 21 00:43:49 macbook /bsd: uhub2 at usb3 configuration 1 interface 0 "Intel 
UHCI root hub" rev 1.00/1.00 addr 1
May 21 00:43:49 macbook /bsd: uhub3 at usb4 configuration 1 interface 0 "Intel 
UHCI root hub" rev 1.00/1.00 addr 1
May 21 00:43:49 macbook /bsd: uhub4 at usb0 configuration 1 interface 0 "Intel 
EHCI root hub" rev 2.00/1.00 addr 1
May 21 00:43:49 macbook apmd: system resumed from sleep

(This is where X gets killed;
the first messages seen on console after that is:)

May 21 00:43:51 macbook /bsd: uvideo0 at uhub4 port 4 configuration 1 interface 
0 "Micron Built-in iSight" rev 2.00/1.84 addr 2
May 21 00:43:51 macbook /bsd: video0 at uvideo0
May 21 00:43:53 macbook /bsd: uhidev0 at uhub0 port 2 configuration 1 interface 
0 "Apple Computer Apple Internal Keyboard / Trackpad" rev 2.00/0.18 addr 2
May 21 00:43:53 macbook /bsd: uhidev0: iclass 3/1
May 21 00:43:53 macbook /bsd: ukbd0 at uhidev0: 8 variable keys, 5 key codes, 
country code 13
May 21 00:43:53 macbook /bsd: wskbd0 at ukbd0: console keyboard, using 
wsdisplay0
May 21 00:43:53 macbook /bsd: uhidev1 at uhub0
May 21 00:43:53 macbook /bsd:  port 2 configuration 1 interface 1 "Apple 
Computer Apple Internal Keyboard / Trackpad" rev 2.00/0.18 addr 2
May 21 00:43:53 macbook /bsd: uhidev1: iclass 3/1, 5 report ids
May 21 00:43:53 macbook /bsd: ums0 at uhidev1 reportid 2: 3 buttons
May 21 00:43:53 macbook /bsd: wsmouse0 at ums0 mux 0
May 21 00:43:53 macbook /bsd: ums1 at uhidev1 reportid 5
May 21 00:43:53 macbook /bsd: ums1: mouse has no X report
May 21 00:43:53 macbook /bsd: uhidev2 at uhub0 port 2 configuration 1 interface 
2 "Apple Computer Apple Internal Keyboard / Trackpad" rev 2.00/0.18 addr 2
May 21 00:43:53 macbook /bsd: uhidev2: iclass 3/0
May 21 00:43:53 macbook /bsd: uhid0 at uhidev2: input=1, output=0, feature=0
May 21 00:43:54 macbook /bsd: uhidev3 at uhub2 port 2 configuration 1 interface 
0 "Apple Computer, Inc. IR Receiver" rev 2.00/1.10 addr 2
May 21 00:43:54 macbook /bsd: uhidev3: iclass 3/0, 38 report ids
May 21 00:43:54 macbook /bsd: uhid1 at uhidev3 reportid 36: input=4, output=0, 
feature=0
May 21 00:43:54 macbook /bsd: uhid2 at uhidev3 reportid 37
May 21 00:43:54 macbook /bsd: : input=4, output=0, feature=0
May 21 00:43:54 macbook /bsd: uhid3 at uhidev3 reportid 38: input=4, output=0, 
feature=0
May 21 00:43:55 macbook /bsd: uhidev4 at uhub3 port 1 configuration 1 interface 
0 "Apple Computer HID-proxy" rev 2.00/19.65 addr 2
May 21 00:43:55 macbook /bsd: uhidev4: iclass 3/1
May 21 00:43:55 macbook /bsd: ukbd1 at uhidev4: 8 variable keys, 6 key codes
May 21 00:43:56 macbook /bsd: wskbd1 at ukbd1 mux 1
May 21 00:43:56 macbook /bsd: wskbd1: connecting to wsdisplay0
May 21 00:43:56 macbook /bsd: uhidev5 at uhub3 port 1 configuration 1 interface 
1 "Apple Computer HID-proxy" rev 2.00/19.65 addr 2
May 21 00:43:56 macbook /bsd: uhidev5: iclass 3/1
May 21 00:43:56 macbook /bsd: ums2 at uhidev5: 5 buttons
May 21 00:43:56 macbook /bsd: wsmouse1 at ums2 mux 0


Xorg log of the killed session:

[   235.207] (WW) checkDevMem: failed to open /dev/xf86 and /dev/mem
        (Operation not permitted)
        Check that you have set 'machdep.allowaperture=1'
        in /etc/sysctl.conf and reboot your machine
        refer to xf86(4) for details
[   235.207]    linear framebuffer access unavailable
[   235.228] (--) Using wscons driver on /dev/ttyC4
[   235.286] 
X.Org X Server 1.18.4
Release Date: 2016-07-19
[   235.286] X Protocol Version 11, Revision 0
[   235.286] Build Operating System: OpenBSD 6.1 amd64 
[   235.286] Current Operating System: OpenBSD macbook.stare.cz 6.1 
GENERIC.MP#0 amd64
[   235.287] Build Date: 18 May 2017  08:10:36PM
[   235.287]  
[   235.287] Current version of pixman: 0.34.0
[   235.287]    Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
[   235.287] Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[   235.287] (==) Log file: "/var/log/Xorg.0.log", Time: Sun May 21 00:43:27 
2017
[   235.315] (==) Using system config directory 
"/usr/X11R6/share/X11/xorg.conf.d"
[   235.318] (==) No Layout section.  Using the first Screen section.
[   235.319] (==) No screen section available. Using defaults.
[   235.319] (**) |-->Screen "Default Screen Section" (0)
[   235.319] (**) |   |-->Monitor "<default monitor>"
[   235.324] (==) No monitor specified for screen "Default Screen Section".
        Using a default monitor configuration.
[   235.324] (==) Disabling SIGIO handlers for input devices
[   235.325] (==) Automatically adding devices
[   235.325] (==) Automatically enabling devices
[   235.325] (==) Not automatically adding GPU devices
[   235.333] (==) Max clients allowed: 256, resource mask: 0x1fffff
[   235.533] (==) FontPath set to:
        /usr/X11R6/lib/X11/fonts/misc/,
        /usr/X11R6/lib/X11/fonts/TTF/,
        /usr/X11R6/lib/X11/fonts/OTF/,
        /usr/X11R6/lib/X11/fonts/Type1/,
        /usr/X11R6/lib/X11/fonts/100dpi/,
        /usr/X11R6/lib/X11/fonts/75dpi/
[   235.533] (==) ModulePath set to "/usr/X11R6/lib/modules"
[   235.533] (II) The server relies on wscons to provide the list of input 
devices.
        If no devices become available, reconfigure wscons or disable 
AutoAddDevices.
[   235.546] (II) Loader magic: 0xbb30ea33020
[   235.546] (II) Module ABI versions:
[   235.546]    X.Org ANSI C Emulation: 0.4
[   235.546]    X.Org Video Driver: 20.0
[   235.546]    X.Org XInput driver : 22.1
[   235.546]    X.Org Server Extension : 9.0
[   235.552] (--) PCI:*(0:0:2:0) 8086:27a2:8086:7270 rev 3, Mem @ 
0xd0380000/524288, 0xc0000000/268435456, 0xd0400000/262144, I/O @ 0x000020e0/8
[   235.552] (--) PCI: (0:0:2:1) 8086:27a6:8086:7270 rev 3, Mem @ 
0xd0300000/524288
[   235.552] (II) LoadModule: "glx"
[   235.585] (II) Loading /usr/X11R6/lib/modules/extensions/libglx.so
[   235.748] (II) Module glx: vendor="X.Org Foundation"
[   235.749]    compiled for 1.18.4, module version = 1.0.0
[   235.749]    ABI class: X.Org Server Extension, version 9.0
[   235.749] (==) AIGLX enabled
[   235.749] (==) Matched intel as autoconfigured driver 0
[   235.749] (==) Matched vesa as autoconfigured driver 1
[   235.749] (==) Assigned the driver to the xf86ConfigLayout
[   235.749] (II) LoadModule: "intel"
[   235.750] (II) Loading /usr/X11R6/lib/modules/drivers/intel_drv.so
[   235.811] (II) Module intel: vendor="X.Org Foundation"
[   235.811]    compiled for 1.18.4, module version = 2.99.916
[   235.811]    Module class: X.Org Video Driver
[   235.811]    ABI class: X.Org Video Driver, version 20.0
[   235.811] (II) LoadModule: "vesa"
[   235.812] (II) Loading /usr/X11R6/lib/modules/drivers/vesa_drv.so
[   235.828] (II) Module vesa: vendor="X.Org Foundation"
[   235.828]    compiled for 1.18.4, module version = 2.3.4
[   235.828]    Module class: X.Org Video Driver
[   235.828]    ABI class: X.Org Video Driver, version 20.0
[   235.828] (II) intel: Driver for Intel(R) Integrated Graphics Chipsets:
        i810, i810-dc100, i810e, i815, i830M, 845G, 854, 852GM/855GM, 865G,
        915G, E7221 (i915), 915GM, 945G, 945GM, 945GME, Pineview GM,
        Pineview G, 965G, G35, 965Q, 946GZ, 965GM, 965GME/GLE, G33, Q35, Q33,
        GM45, 4 Series, G45/G43, Q45/Q43, G41, B43
[   235.832] (II) intel: Driver for Intel(R) HD Graphics: 2000-6000
[   235.832] (II) intel: Driver for Intel(R) Iris(TM) Graphics: 5100, 6100
[   235.832] (II) intel: Driver for Intel(R) Iris(TM) Pro Graphics: 5200, 6200, 
P6300
[   235.832] (II) VESA: driver for VESA chipsets: vesa
[   235.847] (II) intel(0): Using Kernel Mode Setting driver: i915, version 
1.6.0 20080730
[   235.852] (WW) Falling back to old probe method for vesa
[   235.861] (--) intel(0): Integrated Graphics Chipset: Intel(R) 945GM
[   235.861] (--) intel(0): CPU: x86-64, sse2, sse3, ssse3
[   235.861] (II) intel(0): Creating default Display subsection in Screen 
section
        "Default Screen Section" for depth/fbbpp 24/32
[   235.861] (==) intel(0): Depth 24, (--) framebuffer bpp 32
[   235.861] (==) intel(0): RGB weight 888
[   235.861] (==) intel(0): Default visual is TrueColor
[   235.880] (II) intel(0): Output LVDS1 has no monitor section
[   235.890] (--) intel(0): Found backlight control interface wscons (type 
'platform') for output LVDS1
[   235.890] (II) intel(0): Enabled output LVDS1
[   235.890] (II) intel(0): Output VGA1 has no monitor section
[   235.890] (II) intel(0): Enabled output VGA1
[   235.890] (II) intel(0): Output DVI1 has no monitor section
[   235.890] (II) intel(0): Enabled output DVI1
[   235.891] (II) intel(0): Output TV1 has no monitor section
[   235.891] (II) intel(0): Enabled output TV1
[   235.891] (--) intel(0): Using a maximum size of 64x64 for hardware cursors
[   235.891] (II) intel(0): Output VIRTUAL1 has no monitor section
[   235.891] (II) intel(0): Enabled output VIRTUAL1
[   235.891] (--) intel(0): Output LVDS1 using initial mode 1280x800 on pipe 1
[   235.891] (==) intel(0): TearFree disabled
[   235.891] (==) intel(0): DPI set to (96, 96)
[   235.891] (II) Loading sub module "dri2"
[   235.891] (II) LoadModule: "dri2"
[   235.891] (II) Module "dri2" already built-in
[   235.891] (II) Loading sub module "present"
[   235.891] (II) LoadModule: "present"
[   235.891] (II) Module "present" already built-in
[   235.891] (II) UnloadModule: "vesa"
[   235.891] (II) Unloading vesa
[   235.891] (==) Depth 24 pixmap format is 32 bpp
[   235.948] (II) intel(0): SNA initialized with Alviso (gen3) backend
[   235.948] (==) intel(0): Backing store enabled
[   235.948] (==) intel(0): Silken mouse disabled
[   235.952] (II) intel(0): HW Cursor enabled
[   235.952] (II) intel(0): RandR 1.2 enabled, ignore the following RandR 
disabled message.
[   235.992] (==) intel(0): DPMS enabled
[   235.993] (II) intel(0): [XvMC] i915_xvmc driver initialized.
[   235.994] (II) intel(0): [DRI2] Setup complete
[   235.994] (II) intel(0): [DRI2]   DRI driver: i915
[   235.994] (II) intel(0): [DRI2]   VDPAU driver: i915
[   235.994] (II) intel(0): direct rendering: DRI2 enabled
[   235.994] (II) intel(0): hardware support for Present enabled
[   235.994] (--) RandR disabled
[   236.448] (II) AIGLX: enabled GLX_MESA_copy_sub_buffer
[   236.448] (II) AIGLX: enabled GLX_ARB_create_context
[   236.448] (II) AIGLX: enabled GLX_ARB_create_context_profile
[   236.448] (II) AIGLX: enabled GLX_EXT_create_context_es{,2}_profile
[   236.448] (II) AIGLX: enabled GLX_INTEL_swap_event
[   236.448] (II) AIGLX: enabled GLX_SGI_swap_control and GLX_MESA_swap_control
[   236.448] (II) AIGLX: enabled GLX_EXT_framebuffer_sRGB
[   236.448] (II) AIGLX: enabled GLX_ARB_fbconfig_float
[   236.448] (II) AIGLX: enabled GLX_EXT_fbconfig_packed_float
[   236.448] (II) AIGLX: GLX_EXT_texture_from_pixmap backed by buffer objects
[   236.449] (II) AIGLX: Loaded and initialized i915
[   236.449] (II) GLX: Initialized DRI2 GL provider for screen 0
[   236.474] (II) intel(0): switch to mode [email protected] on LVDS1 using pipe 1, 
position (0, 0), rotation normal, reflection none
[   236.500] (II) intel(0): Setting screen physical size to 338 x 211
[   237.314] (II) config/wscons: checking input device /dev/wskbd
[   237.314] (II) wskbd: using layout us
[   237.314] (II) LoadModule: "kbd"
[   237.330] (II) Loading /usr/X11R6/lib/modules/input/kbd_drv.so
[   237.341] (II) Module kbd: vendor="X.Org Foundation"
[   237.341]    compiled for 1.18.4, module version = 1.9.0
[   237.341]    Module class: X.Org XInput Driver
[   237.341]    ABI class: X.Org XInput driver, version 22.1
[   237.341] (II) Using input driver 'kbd' for '/dev/wskbd'
[   237.341] (**) /dev/wskbd: always reports core events
[   237.341] (**) /dev/wskbd: always reports core events
[   237.341] (**) Option "Protocol" "standard"
[   237.341] (**) Option "XkbRules" "base"
[   237.341] (**) Option "XkbModel" "pc105"
[   237.341] (**) Option "XkbLayout" "us"
[   237.341] (II) XINPUT: Adding extended input device "/dev/wskbd" (type: 
KEYBOARD, id 6)
[   237.424] (II) config/wscons: checking input device /dev/wsmouse
[   237.424] (II) LoadModule: "ws"
[   237.426] (II) Loading /usr/X11R6/lib/modules/input/ws_drv.so
[   237.440] (II) Module ws: vendor="X.Org Foundation"
[   237.440]    compiled for 1.18.4, module version = 1.3.0
[   237.440]    Module class: X.Org XInput Driver
[   237.440]    ABI class: X.Org XInput driver, version 22.1
[   237.440] (II) Using input driver 'ws' for '/dev/wsmouse'
[   237.440] (**) /dev/wsmouse: always reports core events
[   237.440] (II) ws: /dev/wsmouse: debuglevel 0
[   237.440] (**) Option "Device" "/dev/wsmouse"
[   237.440] (**) ws: /dev/wsmouse: ZAxisMapping: buttons 4 and 5
[   237.440] (**) ws: /dev/wsmouse: WAxisMapping: buttons 6 and 7
[   237.440] (**) ws: /dev/wsmouse: associated screen: 0
[   237.440] (II) ws: /dev/wsmouse: minimum x position: 0
[   237.440] (II) ws: /dev/wsmouse: maximum x position: 1279
[   237.440] (II) ws: /dev/wsmouse: minimum y position: 0
[   237.440] (II) ws: /dev/wsmouse: maximum y position: 799
[   237.440] (==) ws: /dev/wsmouse: Buttons: 7
[   237.514] (**) ws: /dev/wsmouse: YAxisMapping: buttons 4 and 5
[   237.514] (II) XINPUT: Adding extended input device "/dev/wsmouse" (type: 
MOUSE, id 7)
[   237.514] (**) /dev/wsmouse: (accel) keeping acceleration scheme 1
[   237.514] (**) /dev/wsmouse: (accel) acceleration profile 0
[   237.514] (**) /dev/wsmouse: (accel) acceleration factor: 2.000
[   237.514] (**) /dev/wsmouse: (accel) acceleration threshold: 4
[   238.551] (II) intel(0): EDID vendor "APP", prod id 40030
[   238.551] (II) intel(0): Printing DDC gathered Modelines:
[   238.551] (II) intel(0): Modeline "1280x800"x0.0   71.00  1280 1328 1360 
1440  800 803 809 823 -hsync -vsync (49.3 kHz eP)
[   244.374] (II) AIGLX: Suspending AIGLX clients for VT switch
[   257.555] (II) AIGLX: Resuming AIGLX clients after VT switch
[   257.555] (II) intel(0): switch to mode [email protected] on LVDS1 using pipe 1, 
position (0, 0), rotation normal, reflection none
[   257.752] (EE) 
Fatal server error:
[   257.752] (EE) can't switch keyboard to raw mode. Enable support for it in 
the kernel
or use for example:

Option "Protocol" "wskbd"
Option "Device" "/dev/wskbd0"

in your xorg.conf(5) file
[   257.752] (EE) 
[   257.752] (EE) 
Please consult the The X.Org Foundation support 
         at http://wiki.x.org
 for help. 
[   257.752] (EE) Please also check the log file at "/var/log/Xorg.0.log" for 
additional information.
[   257.752] (EE) 
[   257.752] (EE) ws: /dev/wsmouse: unknown command 4
[   257.752] (II) AIGLX: Suspending AIGLX clients for VT switch
[   258.146] (EE) Server terminated with error (1). Closing log file.

Reply via email to