Hello, There's quite a bit to unpick here - some errors, some assumptions.
On Tue, Feb 08, 2022 at 04:50:55AM GMT, [email protected] wrote: > > Noticed that my laptop ThinkPad T530 doesn't hibernate: > > ZZZ > Hibernating system... > > blinking cursor and nothing more, equal outcome with regular user and root. > Laptop is being powered via A/C via dockstation; battery is pulled out. > > apmd_flags=-A -t 60 -z 15 On a system without a battery, using '-z' is nonsensical and '-t' is redundant as, without the battery, the power state will never change... unless, of course, you unplug the power in which case none of it will matter anyway ;^) > # cat /etc/apm/{powerup,resume} > #! /bin/sh > [ "$(apm -av)" = 'A/C adapter state: connected' ] && anacron -s root's PATH does contain /usr/local/sbin, however... > # crontab -l > PATH=/bin:/sbin:/usr/bin:/usr/sbin ... crontab's PATH, does not. > 30 1 * * * [ "$(apm -av)" = 'A/C adapter state: > connected' ] && anacron -s You'll either have to use the full path - /usr/local/sbin/anacron - or adjust PATH accordingly. > # cat /etc/anacrontab > RANDOM_DELAY=0 > START_HOURS_RANGE=0-23 > #period #delay #ID #command > @daily 0 id_daily /bin/sh /etc/daily > @weekly 0 id_weekly /bin/sh /etc/weekly > @monthly 0 id_monthly /bin/sh /etc/monthly anacrontab(5) from this port doesn't supports @-strings known from crontab(5) or 3rd-party updates to anacron(8). > so additional quotes are probably required like this: > /bin/sh -c '[ "$(apm -av)" = 'A/C adapter state: connected' ] && anacron -s' You can't use (') quotes inside (') quotes without escaping them first. Either fix your quoting: [ "$(apm -av)" = "A/C adapter state: connected" ] && /usr/local/sbin/anacron -s or drop '-v' altogether: test $(apm -a) = 1 && /usr/local/sbin/anacron -s > acpi0 at bios0: ACPI 5.0 > acpi0: sleep states S0 S3 S4 S5 BTW, it your laptop's BIOS supports it so, normally, it shouldn't be a problem to hibernate. > sd1 at scsibus3 targ 1 lun 0: <OPENBSD, SR CRYPTO, 006> > sd1: 476937MB, 512 bytes/sector, 976767473 sectors > root on sd1a (942f936162d34584.a) swap on sd1b dump on sd1b Lastly, you're using SoftRAID. Have you allocated disk space the standard/automatic way? Is your swap space large enough[0]? [0] https://marc.info/?l=openbsd-bugs&m=164221152419752&w=2 Regards, Raf
