Created attachment 207681 [details] T420s dmesg.out Just updated to 12.1-RELEASE - as in title - suspend/resume does not work. Suspend part works. Resume hangs with endless cycle of lights on an off. Screen dead all the time when trying to resume. The suspend/resume worked on 11.3-RELEASE from which I upgraded. I have attached these: 1. pciconf -lv output. 2. dmesg output. 3. /boot/loader.conf 4. /etc/sysctl.conf 5. /etc/rc.conf What else do you need? Regards, vermaden
Created attachment 207682 [details] T420s pciconf-lv.out
Created attachment 207683 [details] T420s loader.conf
Created attachment 207684 [details] T420s rc.conf
Created attachment 207685 [details] T420s sysctl.conf
I can also confirm this is hanging on my kabylake amd64 system. was working fine with 12-STABLE before the beta tag was cut, and after upgrading the 12.1-BETA1 suspend/resume no longer works. Verified it is not due to the i915kms DRM driver as i have same issue when that kmod is not loaded. Also, unable to get any debug info out of system when it hangs as well.
(In reply to pete from comment #5) Knowing the exact revision of last working 12-STABLE could be of help.
(In reply to Andriy Gapon from comment #6) yea that was a big oversight on my end. I was being silly and didn't create a new bootenv when installing beta1. I will rectify this tonight and update the ticket with hopefully a useful last known working rev.
Sorry for small error in the description - its 12.1-BETA1 of course. 12.1-RELEASE is not available yet :)
The previous version of 12-STABLE I was able to suspend resume from is this commit from git: https://github.com/freebsd/freebsd/commit/8ae0a83f32f9809e62e375979981f497bd39e71c I'll also upload two attachments from this laptop containing pciconf -lv and /var/run/dmesg.boot
Created attachment 207818 [details] dmesg.boot from kabylake laptop
Created attachment 207819 [details] pciconf -lv out from kabylake laptop
Vermaden, I think I have found what was breaking on my end. I had an older version of the drm-kmod package installed which I had forgotten to check previously. After rebuilding the package from the ports tree then rebooting suspend/resume is now working as expected. One thing to note is that when I attempt to use the pkg hosted by freebsd.org my system panics on boot with a page fault. So it seems critical to not use the upstream pre-build binary but to roll your own and install that. for reference this is the version i have installed: drm-fbsd12.0-kmod-4.16.g20190814
(In reply to pete from comment #12) I will compile that 'drm-fbsd12.0-kmod-4.16.g20190814' from Ports with 12.1-BETA1 sources when I get back home.
I have just tried with releng/12.1 sources and still same lock - or should I svnlite other tree? # uname -a FreeBSD t420s.local 12.1-BETA1 FreeBSD 12.1-BETA1 r352546 GENERIC amd64 # svnlite co https://svn0.eu.freebsd.org/base/releng/12.1/ /usr/src 107.08s user 211.03s system 34% cpu 15:10.92 total Checked out revision 352745. # make -C /usr/ports/graphics/drm-fbsd12.0-kmod build deinstall install clean (...) ===> Cleaning for drm-fbsd12.0-kmod-4.16.g20190814 # zzz Laptop suspends but does not resume. Regards, vermaden
(In reply to vermaden from comment #14) Hrm, that's the same branch I am using on my end. The only thing I can think of is to verify that you rebooted after rebuilding and reinstalling the i915kms kernel module.
(In reply to pete from comment #15) Yes, that is what I have done - I have built the module and then I rebooted and tried to zzz(8) after fresh system start. The interesting thing is - as T420s is Sandy Bridge CPU - the 'native' i915 from the Base System also suspends but does not resume ... Regards, vermaden
Whenever I try this on a spare T420 I have lying around, I can ssh back into the system when it's resumed, but I can not run reboot, su, or any other command - nor can I write anything to disk.
Whoops, forgot to add this to my last comment. Does anyone have the time to build versions of stable/12, in order that we can zero in on which revision broke suspend/resume? It should be as simple as 'svn checkout -r<revision ID>' in a folder where stable/12 is checked out in, then building mini-memstick.img with src/release/release.sh, and writing it to an USB stick.
Alternatively, as Kyle Evans pointed out on irc, there are CI artifacts on http://artifacts.ci.freebsd.org/snapshot/stable-12/ where r<revision>/amd64/amd64/disk.img.xz image between r352031 and r352546 which when extracted with unxz, can be written to +16GB disk, and booted from.
Can I go ahead and close this issue as fixed? My T420 has working suspend after 12.1 at least.
I can confirm that it works again ... but I had to change configuration files. I just removed all 'doubtful' settings from these files: /etc/sysctl.conf /etc/rc.conf /boot/loader.conf ... and found setup that works with suspend/resume and all my settings needed. I will post these files here for future reference. I was not able to find exact settings that broke suspend/resume (you need to make full reboot every time) but at least I narrowed them to several. I will post these files. /etc/sysctl.conf /etc/sysctl.conf.NOTES /etc/rc.conf /boot/loader.conf /boot/loader.conf.NOTES Files WITH the '.NOTES' suffix at the end contain the settings that I do not use and with which suspend/resume DOES NOT WORK. I do not know which single or several settings from the '.NOTES' files BRAKES the suspend/resume unfortunatelly. Hope that helps. /boot/loader.conf =============================================================================== # CONSOLE COMMON autoboot_delay=1 # OPTION '-1' MEANS NO WAIT AND 'NO' MEANS INFINITE WAIT loader_logo=none # DESIRED LOGO: fbsdbw beastiebw beastie none boot_mute=YES # SAME AS '-m' IN LOADER - MUTE CONSOLE WITH FreeBSD LOGO # MODULES - BOOT geom_eli_load=YES opensolaris_load=YES zfs_load=YES # MODULES - ETHERNET GOES OUT ON SUSPEND/RESUME USE UPDATED INTEL em(4) DRIVER if_em_updated_load=YES # INTEL DRM WITH drm-kmod PACKAGE (NEW) # TRY TO SKIP UNNECESSARY MODE SETS AT BOOT TIME compat.linuxkpi.fastboot=1 # USE SEMAPHORES FOR INTER-RING SYNC compat.linuxkpi.semaphores=1 # ENABLE POWER-SAVING RENDER C-STATE 6 compat.linuxkpi.enable_rc6=7 # ENABLE POWER-SAVING DISPLAY C-STATES compat.linuxkpi.enable_dc=2 # ENABLE FRAME BUFFER COMPRESSION FOR POWER SAVINGS compat.linuxkpi.enable_fbc=1 # ENABLE SYNAPTICS hw.psm.synaptics_support=1 # JAILS - ALLOW RAW SOCKETS security.jail.param.allow.raw_sockets=1 security.jail.allow_raw_sockets=1 # DISABLE /dev/diskid/* ENTRIES FOR DISKS kern.geom.label.disk_ident.enable=0 # DISABLE /dev/gptid/* ENTRIES FOR DISKS kern.geom.label.gptid.enable=0 # COLORS kern.vt.color.0.rgb="#000000" kern.vt.color.1.rgb="#dc322f" kern.vt.color.2.rgb="#859900" kern.vt.color.3.rgb="#b58900" kern.vt.color.4.rgb="#268bd2" kern.vt.color.5.rgb="#ec0048" kern.vt.color.6.rgb="#2aa198" kern.vt.color.7.rgb="#94a3a5" kern.vt.color.8.rgb="#586e75" kern.vt.color.9.rgb="#cb4b16" kern.vt.color.10.rgb="#859900" kern.vt.color.11.rgb="#b58900" kern.vt.color.12.rgb="#268bd2" kern.vt.color.13.rgb="#d33682" kern.vt.color.14.rgb="#2aa198" kern.vt.color.15.rgb="#6c71c4" # RACCT/RCTL RESOURCE LIMITS kern.racct.enable=1 # ZFS TUNING # vfs.zfs.prefetch_disable=1 vfs.zfs.arc_min=128M vfs.zfs.arc_max=512M # vfs.zfs.txg.timeout=1 # POWER MANAGEMENT POWER OFF DEVICES WITHOUT ATTACHED DRIVER hw.pci.do_power_nodriver=3 # POWER MANAGEMENT FOR EVERY USED AHCI CHANNEL (ahcich 0-7) hint.ahcich.0.pm_level=5 hint.ahcich.1.pm_level=5 hint.ahcich.2.pm_level=5 hint.ahcich.3.pm_level=5 hint.ahcich.4.pm_level=5 hint.ahcich.5.pm_level=5 hint.ahcich.6.pm_level=5 hint.ahcich.7.pm_level=5 # GELI THREADS kern.geom.eli.threads=4 # IPC - SQUID kern.ipc.msgmnb=8192 # 2048 kern.ipc.msgssz=64 # 8 kern.ipc.msgtql=2048 # 40 # IPC - PIPE KVA LIMIT | 320 MB kern.ipc.maxpipekva=335544320 # 331104256 =============================================================================== /boot/loader.conf.NOTES =============================================================================== # CONSOLE MODE sc + text # kern.vty=sc # hw.vga.textmode=1 # splash_bmp_load=YES # bitmap_load=YES # bitmap_name=/boot/splash.bmp # CONSOLE MODE vt # kern.vty=vt # kern.vt.fb.default_mode=1600x900 # kern.vt.fb.default_mode=1920x1080 # hw.vga.textmode=0 # DISABLE HYPER THREADING # machdep.hyperthreading_allowed=0 # INTEL DRM WITH drm-kmod PACKAGE (OLD) # drm.i915.powersave=1 # drm.i915.semaphores=1 # drm.i915.enable_rc6=7 # drm.i915.enable_fbc=1 # drm.i915.lvds_downclock=1 # drm.i915.intel_iommu_enabled=1 # SECURITY # security.bsd.allow_destructive_dtrace=0 # GEOM # kern.geom.label.disk_ident.enable=0 # kern.geom.label.gptid.enable=0 # ALLOW RAW SOCKETS IN JAILS # security.jail.param.allow.raw_sockets=1 # security.jail.allow_raw_sockets=1 # ADD /dev/diskid/* ENTRY FOR DISKS # kern.geom.label.disk_ident.enable=1 # BHYVE # vmm_load=YES # nmdm_load=YES # hw.vmm.topology.cores_per_package=1 # hw.vmm.topology.threads_per_core=1 # pptdevs="0/26/0" # pptdevs="0/29/0" # LARGE PAGE MAPPINGS # vm.pmap.pg_ps_enabled=1 # NETWORK MAX SEND QUEUE SIZE # net.link.ifqmaxlen=2048 # IPC - NUMBER OF SEGMENTS PER PROCESS # kern.ipc.shmseg=1024 # 128 # IPC - QT4 SETTINGS # kern.ipc.shmmni=1024 # 192 # kern.ipc.shmseg=1024 # 128 =============================================================================== /etc/rc.conf =============================================================================== # SILENCE # ------------------------------------------------------------------ rc_startmsgs=NO # NETWORK # ------------------------------------------------------------------ hostname=w520.local background_dhclient=YES extra_netfs_types=NFS defaultroute_delay=3 defaultroute_carrier_delay=3 wpa_supplicant_program="/usr/local/sbin/wpa_supplicant" # MODULES/COMMON/BASE # ------------------------------------------------------ kld_list="${kld_list} aesni geom_eli" kld_list="${kld_list} /boot/modules/i915kms.ko" kld_list="${kld_list} fuse coretemp sem cpuctl ichsmb" kld_list="${kld_list} libiconv cd9660_iconv msdosfs_iconv udf_iconv" # MODULES/VIRTUALBOX # ------------------------------------------------------- vboxnet_enable=YES kld_list="${kld_list} vboxdrv vboxnetadp vboxnetflt" # POWER performance_cx_lowest=C1 economy_cx_lowest=Cmax powerd_enable=YES powerd_flags="-n adaptive -a hiadaptive -b adaptive -m 800 -M 1600" powerdxx_enable=NO powerdxx_flags="-n adaptive -a hiadaptive -b adaptive -m 800 -M 1600" # DAEMONS | yes # ------------------------------------------------------------ zfs_enable=YES nfs_client_enable=YES linux_enable=YES moused_enable=YES syslogd_flags='-s -s' sshd_enable=YES # DAEMONS | no # ------------------------------------------------------------- openssh_enable=NO openssh_flags='-4 -p 23' webcamd_enable=NO sendmail_enable=NONE sendmail_submit_enable=NO sendmail_outbound_enable=NO sendmail_msp_queue_enable=NO # FS # ----------------------------------------------------------------------- fsck_y_enable=YES growfs_enable=YES # OTHER # -------------------------------------------------------------------- keyrate=fast keymap=pl.kbd virecover_enable=NO update_motd=NO devfs_system_ruleset=desktop hostid_enable=NO =============================================================================== /etc/sysctl.conf =============================================================================== # SECURITY security.bsd.see_jail_proc=0 security.bsd.unprivileged_proc_debug=0 # SECURITY/INTEL CPU MDS MITIGATION hw.mds_disable=3 # SECURITY/RANDOM PID kern.randompid=1 # DISABLE ANNOYING THINGS vfs.usermount=1 kern.coredump=0 hw.syscons.bell=0 kern.vt.enable_bell=0 # ZFS DELETE FUCKUP # vfs.zfs.vdev.trim_max_active: 64 -> 1 vfs.zfs.vdev.trim_max_active=1 # vfs.zfs.per_txg_dirty_frees_percent: 30 -> 10 vfs.zfs.per_txg_dirty_frees_percent=10 # vfs.zfs.free_max_blocks: 1000000 -> 1000 vfs.zfs.free_max_blocks=1000 # JAILS/ALLOW UPGRADES IN JAILS security.jail.chflags_allowed=1 # JAILS/ALLOW RAW SOCKETS security.jail.param.allow.raw_sockets=1 security.jail.allow_raw_sockets=1 # DESKTOP/INTERACTIVITY kern.sched.preempt_thresh=224 # DESKTOP/IRIDIUM/CHROMIUM kern.ipc.shm_allow_removed=1 # PERFORMANCE/ALL SHARED MEMORY SEGMENTS WILL BE MAPPED TO UNPAGEABLE RAM kern.ipc.shm_use_phys=1 # PERFORMANCE/MEMORY OVERCOMMIT SEE tuning(7) vm.overcommit=2 # VIRTUALBOX aio(4) SETTINGS vfs.aio.max_buf_aio=8192 vfs.aio.max_aio_queue_per_proc=65536 vfs.aio.max_aio_per_proc=8192 vfs.aio.max_aio_queue=65536 # NETWORK/DO NOT SEND RST ON SEGMENTS TO CLOSED PORTS net.inet.tcp.blackhole=2 # NETWORK/DO NOT SEND PORT UNREACHABLES FOR REFUSED CONNECTS net.inet.udp.blackhole=1 # NETWORK/LIMIT ON SYN/ACK RETRANSMISSIONS (3) net.inet.tcp.syncache.rexmtlimit=0 # NETWORK/USE TCP SYN COOKIES IF THE SYNCACHE OVERFLOWS (1) net.inet.tcp.syncookies=0 # NETWORK/ASSIGN RANDOM ip_id VALUES (0) net.inet.ip.random_id=1 # NETWORK/ENABLE SENDING IP REDIRECTS (1) net.inet.ip.redirect=0 # NETWORK/IGNORE ICMP REDIRECTS (0) net.inet.icmp.drop_redirect=1 # NETWORK/DROP TCP PACKETS WITH SYN+FIN SET (0) net.inet.tcp.drop_synfin=1 # NETWORK/RECYCLE CLOSED FIN_WAIT_2 CONNECTIONS FASTER (0) net.inet.tcp.fast_finwait2_recycle=1 # NETWORK/CERTAIN ICMP UNREACHABLE MESSAGES MAY ABORT CONNECTIONS IN SYN_SENT net.inet.tcp.icmp_may_rst=0 =============================================================================== /etc/sysctl.conf.NOTES =============================================================================== # SECURITY INTEL CPU MDS MITIGATION # hw.mds_disable=3 # ZFS ARC | % top -b -o res | grep -i arc # kern.maxvnodes=4096 # PERFORMANCE/ALL SHARED MEMORY SEGMENTS WILL BE MAPPED TO UNPAGEABLE RAM # kern.ipc.shm_use_phys=1 # ZFS/SCRUB RESILVER PERFORMANCE # vfs.zfs.scrub_delay=0 # vfs.zfs.top_maxinflight=128 # vfs.zfs.resilver_min_time_ms=5000 # vfs.zfs.resilver_delay=0 # ZFS/SWAP # vm.v_free_target=131072 # vm.v_free_min=65536 # vm.v_free_severe=65536 # vm.v_free_reserved=32768 # vfs.zfs.arc_free_target=196608 # ZFS/SWAP/NEW # vm.v_free_min=49152 # 192M # vm.v_free_severe=32768 # 128M # vm.v_free_target=65536 # 256M # ZFS MAXIMUM SCRUB/RESILVER PERFORMANCE # vfs.zfs.scrub_delay=0 # vfs.zfs.top_maxinflight=128 # vfs.zfs.resilver_min_time_ms=5000 # vfs.zfs.resilver_delay=0 # VIRTUALBOX AND AIO # vfs.aio.max_buf_aio=8192 # vfs.aio.max_aio_queue_per_proc=65536 # vfs.aio.max_aio_per_proc=8192 # vfs.aio.max_aio_queue=65536 # MEMORY OVERCOMMIT SEE tuning(7) # vm.overcommit=2 # NETWORK/ENABLE SCTP BLACKHOLING blackhole(4) FOR MORE DETAILS # net.inet.sctp.blackhole=1 # NETWORK/MAX SIZE OF AUTOMATIC RECEIVE BUFFER (2097152) [8x] # net.inet.tcp.recvbuf_max=16777216 # NETWORK/MAX SIZE OF AUTOMATIC SEND BUFFER (2097152) [8x] # net.inet.tcp.sendbuf_max=16777216 # NETWORK/MAXIMUM SOCKET BUFFER SIZE (5242880) [3.2x] # kern.ipc.maxsockbuf=16777216 # NETWORK/MAXIMUM LISTEN SOCKET PENDING CONNECTION ACCEPT QUEUE SIZE (128) [8x] # kern.ipc.soacceptqueue=1024 # NETWORK/DEFAULT tcp MAXIMUM SEGMENT SIZE (536) [2.7x] # net.inet.tcp.mssdflt=1460 # NETWORK/MINIMUM TCP MAXIMUM SEGMENT SIZE (216) [6x] # net.inet.tcp.minmss=1300 # NETWORK/USE TCP SYN COOKIES IF THE SYNCACHE OVERFLOWS (1) # net.inet.tcp.syncookies=0 # NETWORK/ENABLE TCP SEGMENTATION OFFLOAD (1) # net.inet.tcp.tso=0 # NETWORK/ENABLE IP OPTIONS PROCESSING ([LS]SRR, RR, TS) (1) # net.inet.ip.process_options=0 # NETWORK/ASSUME SO_KEEPALIVE ON ALL TCP CONNECTIONS (1) # net.inet.tcp.always_keepalive=0 # NETWORK/MAXIMUM SEGMENT LIFETIME (30000) [0.27x] # net.inet.tcp.msl=8192 # NETWORK/ENABLE PATH MTU DISCOVERY (1) # net.inet.tcp.path_mtu_discovery=0 # NETWORK/EXPIRE TIME OF TCP HOSTCACHE ENTRIES (3600) [2x] # net.inet.tcp.hostcache.expire=7200 # NETWORK/TIME BEFORE DELAYED ACK IS SENT (100) [0.2x] # net.inet.tcp.delacktime=20 # NEW/NETWORK/STEP SIZE INCREMENTOR OF AUTOMATIC RECEIVE BUFFER # net.inet.tcp.recvbuf_inc=524288 # NEW/NETWORK/STEP SIZE INCREMENTOR OF AUTOMATIC SEND BUFFER # net.inet.tcp.sendbuf_inc=524288 # NEW/NETWORK/INITIAL SEND SOCKET BUFFER SIZE # net.inet.tcp.sendspace=65536 # NEW/NETWORK/MAXIMUM OUTGOING UDP DATAGRAM SIZE # net.inet.udp.maxdgram=65536 # NEW/NETWORK/MAXIMUM SPACE FOR INCOMING UDP DATAGRAMS # net.inet.udp.recvspace=65536 # NEW/NETWORK/DEFAULT STREAM RECEIVE SPACE # net.local.stream.recvspace=65536 # NEW/NETWORK/DEFAULT STREAM SEND SPACE # net.local.stream.sendspace=65536 # UFS TRIM CONSOLODATION # vfs.ffs.dotrimcons=1 # UFS READ AHEAD # vfs.read_max=128 # UFS DIR HASH MEMORY # vfs.ufs.dirhash_maxmem=67108864 # ON FreeBSD < 11.3 Web Content PROCESS MAY FREQUENTLY CRASH DUE TO BUG 181741 # net.local.stream.recvspace=65536 # ACPI SUSPEND/RESUME # hw.acpi.verbose=0 # hw.acpi.sleep_delay=3 # hw.acpi.reset_video=1 # hw.acpi.sleep_button_state=S3 # hw.acpi.power_button_state=S5 # hw.syscons.sc_no_suspend_vtswitch=0 # SYNAPTICS SETTINGS # hw.psm.synaptics.min_pressure=220 ===============================================================================