Hello,
Recently I've switched from Slackware to FreeBSD-13.0 on my T430s. I'm very happy with how does the system run etc. but some things just seem to not work that well:
  • Laptop goes to sleep after opening a lid. To suspend the laptop I have to close and then open the lid, only after then it goes suspend. I've tinkered in the devd.conf and it seems that the devd is catching a lid switch button signal only when opening the lid.
  • Not all of my keyboard keys work. Microphone mute and a thinkpad button (I think that's it's it's proper name) are just not being detected, "xev" doesn't output anything when clicking these buttons.
  • And probably weirdest of all - after screen goes blank after some inactivity, the laptop starts to work real hard. It gets hot, fans start to run on a max speed.
I'd assume it's FreeBSD-related, everything runs perfectly on the good ol' rusty slackware.
I also attach my dmesg. I'm new to the *BSD family so if I should provide some other files just tell me.
Code:
---<<BOOT>>---
Copyright (c) 1992-2021 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
    The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 13.0-STABLE #0 main-n247642-39a1ff43ad7: Tue Nov  2 14:02:47 CET 2021
    root@unix:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
FreeBSD clang version 11.0.1 (git@github.com:llvm/llvm-project.git llvmorg-11.0.1-0-g43ff75f2c3fe)
VT(vga): resolution 640x480
CPU: Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz (2594.16-MHz K8-class CPU)
  Origin="GenuineIntel"  Id=0x306a9  Family=0x6  Model=0x3a  Stepping=9
  Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
  Features2=0x7fbae3ff<SSE3,PCLMULQDQ,DTES64,MON,DS_CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,TSCDLT,AESNI,XSAVE,OSXSAVE,AVX,F16C,RDRAND>
  AMD Features=0x28100800<SYSCALL,NX,RDTSCP,LM>
  AMD Features2=0x1<LAHF>
  Structured Extended Features=0x281<FSGSBASE,SMEP,ERMS>
  XSAVE Features=0x1<XSAVEOPT>
  VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID
  TSC: P-state invariant, performance statistics
real memory  = 17179869184 (16384 MB)
avail memory = 16314486784 (15558 MB)
Event timer "LAPIC" quality 600
ACPI APIC Table: <LENOVO TP-G7   >
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
FreeBSD/SMP: 1 package(s) x 2 core(s) x 2 hardware threads
random: registering fast source Intel Secure Key RNG
random: fast provider: "Intel Secure Key RNG"
random: unblocking device.
ioapic0 <Version 2.0> irqs 0-23
Launching APs: 1 3 2
Timecounter "TSC-low" frequency 1297081676 Hz quality 1000
Cuse v0.1.36 @ /dev/cuse
random: entropy device external interface
kbd1 at kbdmux0
vtvga0: <VT VGA driver>
aesni0: <AES-CBC,AES-CCM,AES-GCM,AES-ICM,AES-XTS>
acpi0: <LENOVO TP-G7>
acpi_ec0: <Embedded Controller: GPE 0x11, ECDT> port 0x62,0x66 on acpi0
acpi0: Power Button (fixed)
cpu0: <ACPI CPU> on acpi0
attimer0: <AT timer> port 0x40-0x43 irq 0 on acpi0
Timecounter "i8254" frequency 1193182 Hz quality 0
Event timer "i8254" frequency 1193182 Hz quality 100
hpet0: <High Precision Event Timer> iomem 0xfed00000-0xfed003ff on acpi0
Timecounter "HPET" frequency 14318180 Hz quality 950
Event timer "HPET" frequency 14318180 Hz quality 550
Event timer "HPET1" frequency 14318180 Hz quality 440
Event timer "HPET2" frequency 14318180 Hz quality 440
Event timer "HPET3" frequency 14318180 Hz quality 440
Event timer "HPET4" frequency 14318180 Hz quality 440
atrtc0: <AT realtime clock> port 0x70-0x71 irq 8 on acpi0
atrtc0: registered as a time-of-day clock, resolution 1.000000s
Event timer "RTC" frequency 32768 Hz quality 0
Timecounter "ACPI-fast" frequency 3579545 Hz quality 900
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x408-0x40b on acpi0
acpi_lid0: <Control Method Lid Switch> on acpi0
acpi_button0: <Sleep Button> on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
vgapci0: <VGA-compatible display> port 0x5000-0x503f mem 0xf0000000-0xf03fffff,0xe0000000-0xefffffff irq 16 at device 2.0 on pci0
vgapci0: Boot video device
xhci0: <Intel Panther Point USB 3.0 controller> mem 0xf2520000-0xf252ffff irq 16 at device 20.0 on pci0
xhci0: 32 bytes context size, 64-bit DMA
xhci0: Port routing mask set to 0xffffffff
usbus0 on xhci0
usbus0: 5.0Gbps Super Speed USB v3.0
pci0: <simple comms> at device 22.0 (no driver attached)
uart2: <Intel Panther Point KT Controller> port 0x50b0-0x50b7 mem 0xf253c000-0xf253cfff irq 19 at device 22.3 on pci0
uart2: Using 1 MSI message
em0: <Intel(R) 82579LM> port 0x5080-0x509f mem 0xf2500000-0xf251ffff,0xf253b000-0xf253bfff irq 20 at device 25.0 on pci0
em0: Using 1024 TX descriptors and 1024 RX descriptors
em0: Using an MSI interrupt
em0: Ethernet address: 3c:97:0e:b5:68:b5
em0: netmap queues/slots: TX 1/1024, RX 1/1024
ehci0: <Intel Panther Point USB 2.0 controller> mem 0xf253a000-0xf253a3ff irq 16 at device 26.0 on pci0
usbus1: EHCI version 1.0
usbus1 on ehci0
usbus1: 480Mbps High Speed USB v2.0
hdac0: <Intel Panther Point HDA Controller> mem 0xf2530000-0xf2533fff irq 22 at device 27.0 on pci0
pcib1: <ACPI PCI-PCI bridge> irq 16 at device 28.0 on pci0
pcib2: <ACPI PCI-PCI bridge> irq 17 at device 28.1 on pci0
pci1: <ACPI PCI bus> on pcib2
iwn0: <Intel Centrino Advanced-N 6205> mem 0xf1c00000-0xf1c01fff irq 17 at device 0.0 on pci1
pcib3: <ACPI PCI-PCI bridge> irq 18 at device 28.2 on pci0
pci2: <ACPI PCI bus> on pcib3
sdhci_pci0: <RICOH R5CE823 SD> mem 0xf1400000-0xf14000ff irq 18 at device 0.0 on pci2
sdhci_pci0: 1 slot(s) allocated
ehci1: <Intel Panther Point USB 2.0 controller> mem 0xf2539000-0xf25393ff irq 23 at device 29.0 on pci0
usbus2: EHCI version 1.0
usbus2 on ehci1
usbus2: 480Mbps High Speed USB v2.0
isab0: <PCI-ISA bridge> at device 31.0 on pci0
isa0: <ISA bus> on isab0
ahci0: <Intel Panther Point AHCI SATA controller> port 0x50a8-0x50af,0x50bc-0x50bf,0x50a0-0x50a7,0x50b8-0x50bb,0x5060-0x507f mem 0xf2538000-0xf25387ff irq 19 at device 31.2 on pci0
ahci0: AHCI v1.30 with 6 6Gbps ports, Port Multiplier not supported
ahcich0: <AHCI channel> at channel 0 on ahci0
ahcich1: <AHCI channel> at channel 1 on ahci0
ahcich4: <AHCI channel> at channel 4 on ahci0
ahciem0: <AHCI enclosure management bridge> on ahci0
acpi_tz0: <Thermal Zone> on acpi0
atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: [GIANT-LOCKED]
WARNING: Device "psm" is Giant locked and may be deleted before FreeBSD 14.0.
psm0: model Synaptics Touchpad, device ID 0
battery0: <ACPI Control Method Battery> on acpi0
acpi_acad0: <AC Adapter> on acpi0
orm0: <ISA Option ROM> at iomem 0xc0000-0xcffff pnpid ORM0000 on isa0
est0: <Enhanced SpeedStep Frequency Control> on cpu0
Timecounters tick every 1.000 msec
ZFS filesystem version: 5
ZFS storage pool version: features support (5000)
hdacc0: <Realtek ALC269 HDA CODEC> at cad 0 on hdac0
hdaa0: <Realtek ALC269 Audio Function Group> at nid 1 on hdacc0
pcm0: <Realtek ALC269 (Analog 2.0+HP/2.0)> at nid 20,21 and 24 on hdaa0
pcm1: <Realtek ALC269 (Internal Analog Mic)> at nid 18 on hdaa0
hdacc1: <Intel Panther Point HDA CODEC> at cad 3 on hdac0
hdaa1: <Intel Panther Point Audio Function Group> at nid 1 on hdacc1
pcm2: <Intel Panther Point (HDMI/DP 8ch)> at nid 5 on hdaa1
pcm3: <Intel Panther Point (HDMI/DP 8ch)> at nid 6 on hdaa1
pcm4: <Intel Panther Point (HDMI/DP 8ch)> at nid 7 on hdaa1
ugen0.1: <0x8086 XHCI root HUB> at usbus0
ugen1.1: <Intel EHCI root HUB> at usbus1
uhub0 on usbus0
uhub0: <0x8086 XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus0
ugen2.1: <Intel EHCI root HUB> at usbus2
Trying to mount root from zfs:root []...
Root mount waiting for: usbus0 usbus1 usbus2 CAM
uhub1 on usbus1
uhub1: <Intel EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus1
uhub2 on usbus2
uhub2: <Intel EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus2
ses0 at ahciem0 bus 0 scbus3 target 0 lun 0
ses0: <AHCI SGPIO Enclosure 2.00 0001> SEMB S-E-S 2.00 device
ses0: SEMB SES Device
ada0 at ahcich0 bus 0 scbus0 target 0 lun 0
ada0: <CT500MX500SSD1 M3CR032> ACS-3 ATA SATA 3.x device
ada0: Serial Number 21062D006906
ada0: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 512bytes)
ada0: Command Queueing enabled
ada0: 476940MB (976773168 512 byte sectors)
ses0: ada0 in 'Slot 00', SATA Slot: scbus0 target 0
ada1 at ahcich1 bus 0 scbus1 target 0 lun 0
ada1: <HGST HTS725032A7E630 GHBOA440> ACS-2 ATA SATA 2.x device
ada1: Serial Number TF0400Y108RR6J
ada1: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
ada1: Command Queueing enabled
ada1: 305245MB (625142448 512 byte sectors)
ses0: ada1 in 'Slot 01', SATA Slot: scbus1 target 0
uhub0: 8 ports with 8 removable, self powered
ugen0.2: <Lenovo H5321 gw> at usbus0
Root mount waiting for: usbus1 usbus2
uhub1: 3 ports with 3 removable, self powered
uhub2: 3 ports with 3 removable, self powered
Root mount waiting for: usbus1 usbus2
ugen1.2: <vendor 0x8087 product 0x0024> at usbus1
uhub3 on uhub1
uhub3: <vendor 0x8087 product 0x0024, class 9/0, rev 2.00/0.00, addr 2> on usbus1
ugen2.2: <vendor 0x8087 product 0x0024> at usbus2
uhub4 on uhub2
uhub4: <vendor 0x8087 product 0x0024, class 9/0, rev 2.00/0.00, addr 2> on usbus2
uhub3: 6 ports with 6 removable, self powered
Root mount waiting for: usbus1 usbus2
uhub4: 8 ports with 8 removable, self powered
ugen1.3: <Lenovo Integrated Smart Card Reader> at usbus1
ugen1.4: <Broadcom Corp BCM20702A0> at usbus1
ugen1.5: <Ricoh Company Ltd. Integrated Camera> at usbus1
acpi_ibm0: <ThinkPad ACPI Extras> on acpi0
acpi_ibm0: Firmware version is 0x100
ichsmb0: <Intel Panther Point SMBus controller> port 0xefa0-0xefbf mem 0xf2534000-0xf25340ff irq 18 at device 31.3 on pci0
smbus0: <System Management Bus> on ichsmb0
acpi_wmi0: <ACPI-WMI mapping> on acpi0
acpi_wmi0: Embedded MOF found
ACPI: \134_SB.WMI1.WQBA: 1 arguments were passed to a non-method ACPI object (Buffer) (20201113/nsarguments-361)
acpi_wmi1: <ACPI-WMI mapping> on acpi0
acpi_wmi1: Embedded MOF found
ACPI: \134_SB.WMI2.WQBB: 1 arguments were passed to a non-method ACPI object (Buffer) (20201113/nsarguments-361)
acpi_wmi2: <ACPI-WMI mapping> on acpi0
acpi_wmi2: Embedded MOF found
ACPI: \134_SB.WMI3.WQBC: 1 arguments were passed to a non-method ACPI object (Buffer) (20201113/nsarguments-361)
wlan0: Ethernet address: a4:4e:31:02:23:6c
lo0: link state changed to UP
iwn0: iwn_read_firmware: ucode rev=0x12a80601
wlan0: link state changed to UP
umodem0 on uhub0
umodem0: <H5321 gw Mobile Broadband Modem> on usbus0
umodem0: data interface 2, has CM over data, has break
umodem1 on uhub0
umodem1: <H5321 gw Mobile Broadband Data Modem> on usbus0
umodem1: data interface 4, has CM over data, has break
umodem2 on uhub0
umodem2: <H5321 gw Mobile Broadband GPS Port> on usbus0
umodem2: data interface 10, has CM over data, has break
cdce0 on uhub0
cdce0: <Ericsson H5321 gw> on usbus0
ue0: <USB Ethernet> on cdce0
ue0: Ethernet address: 02:15:e0:ec:01:00
ubt0 on uhub3
ubt0: <Broadcom Corp BCM20702A0, rev 2.00/1.12, addr 4> on usbus1
WARNING: attempt to domain_add(bluetooth) after domainfinalize()
WARNING: attempt to domain_add(netgraph) after domainfinalize()
Security policy loaded: MAC/ntpd (mac_ntpd)
drmn0: <drmn> on vgapci0
vgapci0: child drmn0 requested pci_enable_io
vgapci0: child drmn0 requested pci_enable_io
[drm] Unable to create a private tmpfs mount, hugepage support will be disabled(-19).
Failed to add WC MTRR for [0xe0000000-0xefffffff]: -28; performance may suffer
[drm] Got stolen memory base 0xdba00000, size 0x4000000
[drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[drm] Driver supports precise vblank timestamp query.
[drm] Connector LVDS-1: get mode from tunables:
[drm]   - kern.vt.fb.modes.LVDS-1
[drm]   - kern.vt.fb.default_mode
[drm] Connector VGA-1: get mode from tunables:
[drm]   - kern.vt.fb.modes.VGA-1
[drm]   - kern.vt.fb.default_mode
[drm] Connector HDMI-A-1: get mode from tunables:
[drm]   - kern.vt.fb.modes.HDMI-A-1
[drm]   - kern.vt.fb.default_mode
[drm] Connector DP-1: get mode from tunables:
[drm]   - kern.vt.fb.modes.DP-1
[drm]   - kern.vt.fb.default_mode
[drm] Connector HDMI-A-2: get mode from tunables:
[drm]   - kern.vt.fb.modes.HDMI-A-2
[drm]   - kern.vt.fb.default_mode
[drm] Connector HDMI-A-3: get mode from tunables:
[drm]   - kern.vt.fb.modes.HDMI-A-3
[drm]   - kern.vt.fb.default_mode
[drm] Connector DP-2: get mode from tunables:
[drm]   - kern.vt.fb.modes.DP-2
[drm]   - kern.vt.fb.default_mode
[drm] Connector DP-3: get mode from tunables:
[drm]   - kern.vt.fb.modes.DP-3
[drm]   - kern.vt.fb.default_mode
sysctl_warn_reuse: can't re-use a leaf (hw.dri.debug)!
[drm] Initialized i915 1.6.0 20190822 for drmn0 on minor 0
WARNING: Device "fb" is Giant locked and may be deleted before FreeBSD 14.0.
VT: Replacing driver "vga" with new "fb".
start FB_INFO:
type=11 height=768 width=1366 depth=32
cmsize=16 size=4227072
pbase=0xe000d000 vbase=0xfffff800e000d000
name=drmn0 flags=0x0 stride=5504 bpp=32
cmap[0]=0 cmap[1]=7f0000 cmap[2]=7f00 cmap[3]=c4a000
end FB_INFO
drmn0: fb0: i915drmfb frame buffer device
uhub2: at usbus2, port 1, addr 1 (disconnected)
ugen2.2: <vendor 0x8087 product 0x0024> at usbus2 (disconnected)
uhub4: at uhub2, port 1, addr 2 (disconnected)
uhub4: detached
uhub2: detached
wlan0: link state changed to DOWN
uhub1: at usbus1, port 1, addr 1 (disconnected)
ugen1.2: <vendor 0x8087 product 0x0024> at usbus1 (disconnected)
uhub3: at uhub1, port 1, addr 2 (disconnected)
ugen1.3: <Lenovo Integrated Smart Card Reader> at usbus1 (disconnected)
ugen1.4: <Broadcom Corp BCM20702A0> at usbus1 (disconnected)
ubt0: at uhub3, port 4, addr 4 (disconnected)
ubt0: detached
ugen1.5: <Ricoh Company Ltd. Integrated Camera> at usbus1 (disconnected)
uhub3: detached
uhub1: detached
uhub0: at usbus0, port 1, addr 1 (disconnected)
ugen0.2: <Lenovo H5321 gw> at usbus0 (disconnected)
umodem0: at uhub0, port 4, addr 1 (disconnected)
umodem0: detached
umodem1: at uhub0, port 4, addr 1 (disconnected)
umodem1: detached
cdce0: at uhub0, port 4, addr 1 (disconnected)
cdce0: detached
umodem2: at uhub0, port 4, addr 1 (disconnected)
umodem2: detached
uhub0: detached
vgapci0: child drmn0 requested pci_set_powerstate
pci0: failed to set ACPI power state D3 on \134_SB_.PCI0.VID_: AE_BAD_PARAMETER
pcib0: failed to set ACPI power state D2 on \134_SB_.PCI0: AE_BAD_PARAMETER
acpi0: cleared fixed power button status
vgapci0: child drmn0 requested pci_set_powerstate
vgapci0: child drmn0 requested pci_enable_io
vgapci0: child drmn0 requested pci_enable_io
xhci0: Port routing mask set to 0xffffffff
uhub0 on usbus0
uhub0: <0x8086 XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus0
uhub0: 8 ports with 8 removable, self powered
ugen0.2: <Lenovo H5321 gw> at usbus0
ugen0.2: <Lenovo H5321 gw> at usbus0 (disconnected)
uhub1 on usbus1
uhub1: <Intel EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus1
uhub2 on usbus2
uhub2: <Intel EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus2
iwn0: iwn_read_firmware: ucode rev=0x12a80601
ugen0.2: <Lenovo H5321 gw> at usbus0
umodem0 on uhub0
umodem0: <H5321 gw Mobile Broadband Modem> on usbus0
umodem0: data interface 2, has CM over data, has break
umodem1 on uhub0
umodem1: <H5321 gw Mobile Broadband Data Modem> on usbus0
umodem1: data interface 4, has CM over data, has break
cdce0 on uhub0
cdce0: <Ericsson H5321 gw> on usbus0
ue0: <USB Ethernet> on cdce0
ue0: Ethernet address: 02:15:e0:ec:01:00
umodem2 on uhub0
umodem2: <H5321 gw Mobile Broadband GPS Port> on usbus0
umodem2: data interface 10, has CM over data, has break
uhub2: 3 ports with 3 removable, self powered
uhub1: 3 ports with 3 removable, self powered
ugen1.2: <vendor 0x8087 product 0x0024> at usbus1
uhub3 on uhub1
uhub3: <vendor 0x8087 product 0x0024, class 9/0, rev 2.00/0.00, addr 2> on usbus1
ugen2.2: <vendor 0x8087 product 0x0024> at usbus2
uhub4 on uhub2
uhub4: <vendor 0x8087 product 0x0024, class 9/0, rev 2.00/0.00, addr 2> on usbus2
wlan0: link state changed to UP
uhub3: 6 ports with 6 removable, self powered
uhub4: 8 ports with 8 removable, self powered
ugen1.3: <Lenovo Integrated Smart Card Reader> at usbus1
ugen1.4: <Broadcom Corp BCM20702A0> at usbus1
ubt0 on uhub3
ubt0: <Broadcom Corp BCM20702A0, rev 2.00/1.12, addr 4> on usbus1
ugen1.5: <Ricoh Company Ltd. Integrated Camera> at usbus1
Thanks in advance.
 
Welcome!

And probably weirdest of all - after screen goes blank after some inactivity, the laptop starts to work real hard. It gets hot, fans start to run on a max speed.
Are you by any chance using x11-wm/picom as well as x11-drivers/xf86-video-intel? I have the same bug with that combination. If that's the case, try using the "modesetting" driver instead.

By the way, please post code inside your messages, instead of attaching text files.
 
Welcome!


Are you by any chance using x11-wm/picom as well as x11-drivers/xf86-video-intel? I have the same bug with that combination. If that's the case, try using the "modesetting" driver instead.

By the way, please post code inside your messages, instead of attaching text files.
I just tried to use the "modesetting" driver and the i915kms module seems to be the devil here. Without it, the laptop normally goes to sleep (but doesn't wake up), regardless whether I use the "modesetting" or the "intel" driver.
I have the intel i5-3320m CPU.

And about posting code in messages - all noted :).
 
Without i915kms.ko from graphics/drm-kmod, you shouldn't be able to run Xorg on Intel hardware... it is possible on FreeBSD 12 and earlier, which have an older i915.ko in the base system, but this was removed in 13.0.

I noticed xf86-video-intel automatically loads it, while you have to explicitely load it yourself (typically with kld_list="i915kms" in /etc/rc.conf) when using modesetting. So, maybe you think it isn't loaded because you didn't enable anything, but the intel driver did it for you anyway. Check with kldstat.

seems to be the devil here
What else would you expect in FreeBSD land? ;)
 
Without kld_list="i915kms" and xf86-video-intel it really seems that i915kms is not loaded, at least kldstat doesn't say anything about it... This is the kldstat output:
Code:
Id Refs Address                Size Name
 1   85 0xffffffff80200000  1f1b4f8 kernel
 2    1 0xffffffff8211c000     bdf8 cuse.ko
 3    1 0xffffffff82128000     ae08 cryptodev.ko
 4    1 0xffffffff82134000   5e8eb8 zfs.ko
 5    1 0xffffffff82920000     3530 fdescfs.ko
 6    1 0xffffffff82924000     639c linprocfs.ko
 7    4 0xffffffff8292b000     dbb0 linux_common.ko
 8    1 0xffffffff82939000     3284 linsysfs.ko
 9    1 0xffffffff8293d000     4700 nullfs.ko
10    1 0xffffffff82942000     3378 acpi_wmi.ko
11    1 0xffffffff82946000     3250 ichsmb.ko
12    1 0xffffffff8294a000     2180 smbus.ko
13    1 0xffffffff8294d000     3480 umodem.ko
14    1 0xffffffff82951000     4d90 ucom.ko
15    1 0xffffffff82956000     45e0 if_cdce.ko
16    1 0xffffffff8295b000     3178 uether.ko
17    1 0xffffffff8295f000     4c20 ng_ubt.ko
18    6 0xffffffff82964000     aac8 netgraph.ko
19    2 0xffffffff8296f000     a238 ng_hci.ko
20    3 0xffffffff8297a000     25a8 ng_bluetooth.ko
21    1 0xffffffff8297d000     e250 ng_l2cap.ko
22    1 0xffffffff8298c000    1cee8 ng_btsocket.ko
23    1 0xffffffff829a9000     39c0 ng_socket.ko
24    1 0xffffffff829ad000    38908 linux.ko
25    1 0xffffffff829e6000    30ad8 linux64.ko
26    1 0xffffffff82a17000     2260 pty.ko
27    1 0xffffffff82a1a000     2a08 mac_ntpd.ko
 
Laptop goes to sleep after opening a lid. To suspend the laptop I have to close and then open the lid, only after then it goes suspend. I've tinkered in the devd.conf and it seems that the devd is catching a lid switch button signal only when opening the lid.
Maybe try:
Code:
 hw.acpi.lid_switch_state
 Suspend state (S1-S5) to enter when the lid switch (i.e., a note-   book screen) is closed.  Default is "NONE" (do nothing).
 
Maybe try:
Code:
hw.acpi.lid_switch_state
Suspend state (S1-S5) to enter when the lid switch (i.e., a note- book screen) is closed. Default is "NONE" (do nothing).
I have hw.acpi.lid_switch_state set to S3, other states do not fix the issue.
 
Definitely. But then I assume you aren't running Xorg, are you?
The thing is, I'm running Xorg.
2021-11-12:08:11:20.png
 
Welcome!

… sleep after opening …

Is BIOS/firmware up-to-date? Also, consider a reset to factory defaults.

FreeBSD 13.0-STABLE #0 main-n247642-39a1ff43ad7: Tue Nov 2 14:02:47 CET 2021 root@unix:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64

That's around a month old:
If not updated in good time, you might eventually find a mismatch between the base OS and (for example) what's required by packages of DRM-related ports for graphics.

Are you familiar with updating from source?

We can offer some pointers. <https://cgit.freebsd.org/src/tree/UPDATING?id=e641c29a006ae9f528f196386052355b42a53d75#n2455> is the most recent edition of the short story; there'll be more detail in the FreeBSD Handbook.

Alternatively, you might start afresh: install FreeBSD 13.0-RELEASE, then update (not from source).



Postscript: thanks to a hint from a moderator, I see that my earlier hint about FreeBSD Forums support for STABLE was misguided 𠄴– sorry.

These April 2021 posts help to put things in context:
 
I rebuilt the whole system (world + kernel) from source (took ~7h), now it runs on stable/13-n248055-81eae114459. All of the problems still persist 😕.

Is BIOS/firmware up-to-date? Also, consider a reset to factory defaults.
I really wouldn't bet on BIOS in this case, everything works top-notch on slackware with the generic kernel. I could try updating the BIOS but it would take some time for me as I haven't really ever done that.

I could also try to rollback to release/13.0.0 but I don't know if there is any sense to that as my installation always had those issues.
 
Hi,
I have something about that on my page. Works for my T430.
Thank you very much, this does the trick for the mic-mute button.

I was also trying to "remap" lid open and close actions in devd using the same method but what I found out kinda got me curious. I created the /etc/devd/lid.conf:
Code:
notify 30 {
  match "system" "ACPI";
  match "subsystem" "Lid";
  match "notify" "0x00";
  action "logger 000sleep000";
};

notify 30 {
  match "system" "ACPI";
  match "subsystem" "Lid";
  match "notify" "0x01";
  action "logger 000resume000";
}
And made a simple test:
At 12:52 I closed the lid
At 12:53 I opened the lid (system went to sleep)
At 12:54 I again closed the lid
At 12:55 I again opened the lid (system woke up)

And those are the contents of /var/log/messages:
Code:
Nov 15 12:52:47 unix jarmusz[21253]: 000sleep000
Nov 15 12:52:47 unix jarmusz[21257]: 000sleep000
Nov 15 12:52:47 unix jarmusz[21261]: suspended.
Nov 15 12:53:05 unix kernel: acpi0: suspend request timed out, forcing sleep now
Nov 15 12:53:05 unix jarmusz[21477]: 000resume000
Nov 15 12:53:05 unix jarmusz[21481]: 000resume000
Nov 15 12:55:16 unix kernel: uhub2: at usbus2, port 1, addr 1 (disconnected)
Nov 15 12:55:16 unix kernel: ugen2.2: <vendor 0x8087 product 0x0024> at usbus2 (disconnected)
Nov 15 12:55:16 unix kernel: uhub3: at uhub2, port 1, addr 2 (disconnected)
Nov 15 12:55:16 unix kernel: uhub3: detached
Nov 15 12:55:16 unix kernel: uhub2: detached
Nov 15 12:55:16 unix kernel: wlan0: link state changed to DOWN
Nov 15 12:55:16 unix kernel: uhub1: at usbus1, port 1, addr 1 (disconnected)
Nov 15 12:55:16 unix kernel: ugen1.2: <vendor 0x8087 product 0x0024> at usbus1 (disconnected)
Nov 15 12:55:16 unix kernel: uhub4: at uhub1, port 1, addr 2 (disconnected)
Nov 15 12:55:16 unix kernel: ugen1.3: <Lenovo Integrated Smart Card Reader> at usbus1 (disconnected)
Nov 15 12:55:16 unix kernel: ugen1.4: <Broadcom Corp BCM20702A0> at usbus1 (disconnected)
Nov 15 12:55:16 unix kernel: ubt0: at uhub4, port 4, addr 4 (disconnected)
Nov 15 12:55:16 unix kernel: ubt0: detached
Nov 15 12:55:16 unix kernel: ugen1.5: <Ricoh Company Ltd. Integrated Camera> at usbus1 (disconnected)
Nov 15 12:55:16 unix kernel: uhub4: detached
Nov 15 12:55:16 unix kernel: uhub1: detached
Nov 15 12:55:16 unix kernel: uhub0: at usbus0, port 1, addr 1 (disconnected)
Nov 15 12:55:16 unix kernel: ugen0.2: <Lenovo H5321 gw> at usbus0 (disconnected)
Nov 15 12:55:16 unix kernel: umodem0: at uhub0, port 4, addr 2 (disconnected)
Nov 15 12:55:16 unix kernel: umodem0: detached
Nov 15 12:55:16 unix kernel: umodem1: at uhub0, port 4, addr 2 (disconnected)
Nov 15 12:55:16 unix kernel: umodem1: detached
Nov 15 12:55:16 unix kernel: cdce0: at uhub0, port 4, addr 2 (disconnected)
Nov 15 12:55:16 unix kernel: cdce0: detached
Nov 15 12:55:16 unix kernel: umodem2: at uhub0, port 4, addr 2 (disconnected)
Nov 15 12:55:16 unix kernel: umodem2: detached
Nov 15 12:55:16 unix kernel: uhub0: detached
Nov 15 12:55:16 unix kernel: vgapci0: child drmn0 requested pci_set_powerstate
Nov 15 12:55:16 unix kernel: pci0: failed to set ACPI power state D3 on \_SB_.PCI0.VID_: AE_BAD_PARAMETER
Nov 15 12:55:16 unix kernel: pcib0: failed to set ACPI power state D2 on \_SB_.PCI0: AE_BAD_PARAMETER
Nov 15 12:55:16 unix kernel: acpi0: cleared fixed power button status
Nov 15 12:55:16 unix kernel: vgapci0: child drmn0 requested pci_set_powerstate
Nov 15 12:55:16 unix kernel: vgapci0: child drmn0 requested pci_enable_io
Nov 15 12:55:16 unix syslogd: last message repeated 1 times
Nov 15 12:55:16 unix kernel: xhci0: Port routing mask set to 0xffffffff
Nov 15 12:55:16 unix kernel: uhub0 on usbus0
Nov 15 12:55:16 unix kernel: uhub0: <0x8086 XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus0
Nov 15 12:55:16 unix kernel: uhub0: 8 ports with 8 removable, self powered
Nov 15 12:55:16 unix kernel: ugen0.2: <Lenovo H5321 gw> at usbus0
Nov 15 12:55:16 unix kernel: uhid0 on uhub0
Nov 15 12:55:16 unix kernel: uhid0: <Lenovo H5321 gw, class 0/0, rev 2.00/1.00, addr 1> on usbus0
Nov 15 12:55:16 unix kernel: uhid0: no report descriptor
Nov 15 12:55:16 unix kernel: device_attach: uhid0 attach returned 12
Nov 15 12:55:16 unix kernel: ugen0.2: <Lenovo H5321 gw> at usbus0 (disconnected)
Nov 15 12:55:16 unix kernel: uhub1 on usbus1
Nov 15 12:55:16 unix kernel: uhub1: <Intel EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus1
Nov 15 12:55:16 unix kernel: uhub2 on usbus2
Nov 15 12:55:16 unix kernel: uhub2: <Intel EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus2
Nov 15 12:55:16 unix kernel: iwn0: iwn_read_firmware: ucode rev=0x12a80601
Nov 15 12:55:16 unix wpa_supplicant[369]: wlan0: CTRL-EVENT-DISCONNECTED bssid=5c:c3:07:0f:c5:72 reason=3 locally_generated=1
Nov 15 12:55:16 unix jarmusz[21492]: 000resume000
Nov 15 12:55:16 unix jarmusz[21496]: resumed.
Nov 15 12:55:16 unix kernel: ugen0.2: <Lenovo H5321 gw> at usbus0
Nov 15 12:55:16 unix kernel: umodem0 on uhub0
Nov 15 12:55:16 unix kernel: umodem0: <H5321 gw Mobile Broadband Modem> on usbus0
Nov 15 12:55:16 unix kernel: umodem0: data interface 2, has CM over data, has break
Nov 15 12:55:16 unix kernel: umodem1 on uhub0
Nov 15 12:55:16 unix kernel: umodem1: <H5321 gw Mobile Broadband Data Modem> on usbus0
Nov 15 12:55:16 unix kernel: umodem1: data interface 4, has CM over data, has break
Nov 15 12:55:16 unix kernel: cdce0 on uhub0
Nov 15 12:55:16 unix kernel: cdce0: <Ericsson H5321 gw> on usbus0
Nov 15 12:55:16 unix kernel: ue0: <USB Ethernet> on cdce0
Nov 15 12:55:16 unix kernel: ue0: Ethernet address: 02:15:e0:ec:01:00
Nov 15 12:55:16 unix kernel: umodem2 on uhub0
Nov 15 12:55:16 unix kernel: umodem2: <H5321 gw Mobile Broadband GPS Port> on usbus0
Nov 15 12:55:16 unix kernel: umodem2: data interface 10, has CM over data, has break
Nov 15 12:55:17 unix kernel: uhub1: 3 ports with 3 removable, self powered
Nov 15 12:55:17 unix kernel: uhub2: 3 ports with 3 removable, self powered
Nov 15 12:55:18 unix kernel: ugen1.2: <vendor 0x8087 product 0x0024> at usbus1
Nov 15 12:55:18 unix kernel: uhub3 on uhub1
Nov 15 12:55:18 unix kernel: uhub3: <vendor 0x8087 product 0x0024, class 9/0, rev 2.00/0.00, addr 2> on usbus1
Nov 15 12:55:18 unix kernel: ugen2.2: <vendor 0x8087 product 0x0024> at usbus2
Nov 15 12:55:18 unix kernel: uhub4 on uhub2
Nov 15 12:55:18 unix kernel: uhub4: <vendor 0x8087 product 0x0024, class 9/0, rev 2.00/0.00, addr 2> on usbus2

I know next to nothing about FreeBSD's power stack but for me it looks like there may be two "systems" (maybe acpi and apm?) both trying to control the suspension state at once which results in this behavior.
 
Back
Top