Solved resume from suspend on thinkpad x250.

EDIT :

After upgrading to RC2 after resume X server crashes
I have tried both port and pkg drm kmod both the same issue
If I did zzz the x server can be launched again or after reload i915kms but if don't do that will never restore the GUI
the below problem is not considered now as I lose all open files and work now after resume

the problem happens 100% when PICOM compositor is running but less when not running
I use GLX backend
please any Ideas how to help with this ?
here is the xorg log
and ill attach full log

[ 31.140] (II) modeset(0): Modeline "1366x768"x0.0 76.93 1366 1414 1446 1560 768 771 783 822 -hsync -vsync (49.3 kHz eP)
[ 45.610] (II) event0 - System mouse: device removed
[ 45.610] (II) event1 - System keyboard multiplexer: device removed
[ 45.610] (II) event3 - Sleep Button: device removed
[ 45.610] (II) event4 - AT keyboard: device removed
[ 45.610] (II) event5 - SynPS/2 Synaptics TouchPad: device removed
[ 45.610] (II) event6 - TPPS/2 IBM TrackPoint: device removed
[ 45.645] (II) AIGLX: Suspending AIGLX clients for VT switch
[ 54.402] (EE)
[ 54.402] (EE) Backtrace:
[ 54.432] (EE) 0: /usr/local/bin/Xorg (?+0x0) [0x41e2aa]
[ 54.435] (EE) 1: /lib/libthr.so.3 (_pthread_sigmask+0x54e) [0x80093358e]
[ 54.439] (EE) 2: /lib/libthr.so.3 (_pthread_setschedparam+0x82f) [0x800932b3f]
[ 54.442] (EE) 3: ? (?+0x0) [0x7ffffffff8a3]
[ 54.446] (EE) 4: /lib/libc.so.7 (__sys_thr_kill+0xa) [0x800a7e33a]
[ 54.448] (EE) 5: /lib/libthr.so.3 (_pthread_setschedparam+0x6f0) [0x800932a00]
[ 54.451] (EE) 6: ? (?+0x0) [0x0]
[ 54.455] (EE) 7: /lib/libc.so.7 (__raise+0x34) [0x8009f6c74]
[ 54.455] (EE) unw_step failed: unspecified (general) error [-1]
[ 54.455] (EE)
[ 54.455] (EE)
Fatal server error:
[ 54.455] (EE) Caught signal 6 (Abort trap). Server aborting
[ 54.455] (EE)
[ 54.455] (EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
[ 54.455] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[ 54.455] (EE)
[ 54.464] (EE) Server terminated with error (1). Closing log file.
...skipping...
[ 31.140] (II) modeset(0): Modeline "1366x768"x0.0 76.93 1366 1414 1446 1560 768 771 783 822 -hsync -vsync (49.3 kHz eP)
[ 45.610] (II) event0 - System mouse: device removed
[ 45.610] (II) event1 - System keyboard multiplexer: device removed
[ 45.610] (II) event3 - Sleep Button: device removed
[ 45.610] (II) event4 - AT keyboard: device removed
[ 45.610] (II) event5 - SynPS/2 Synaptics TouchPad: device removed
[ 45.610] (II) event6 - TPPS/2 IBM TrackPoint: device removed
[ 45.645] (II) AIGLX: Suspending AIGLX clients for VT switch
[ 54.402] (EE)
[ 54.402] (EE) Backtrace:
[ 54.432] (EE) 0: /usr/local/bin/Xorg (?+0x0) [0x41e2aa]
[ 54.435] (EE) 1: /lib/libthr.so.3 (_pthread_sigmask+0x54e) [0x80093358e]
[ 54.439] (EE) 2: /lib/libthr.so.3 (_pthread_setschedparam+0x82f) [0x800932b3f]
[ 54.442] (EE) 3: ? (?+0x0) [0x7ffffffff8a3]
[ 54.446] (EE) 4: /lib/libc.so.7 (__sys_thr_kill+0xa) [0x800a7e33a]
[ 54.448] (EE) 5: /lib/libthr.so.3 (_pthread_setschedparam+0x6f0) [0x800932a00]
[ 54.451] (EE) 6: ? (?+0x0) [0x0]
[ 54.455] (EE) 7: /lib/libc.so.7 (__raise+0x34) [0x8009f6c74]
[ 54.455] (EE) unw_step failed: unspecified (general) error [-1]
[ 54.455] (EE)
[ 54.455] (EE)
Fatal server error:
[ 54.455] (EE) Caught signal 6 (Abort trap). Server aborting
[ 54.455] (EE)
[ 54.455] (EE)

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


I have a Thinkpad x250 with freebsd 13.1 beta 2 p0. all works as expected and battery life is optimized and its very good running except that when I resume from suspend the screen immediatly lit up but the Keyboard and Touchpad are frozen for 3 seconds then it works normally as usual. I have tried to debug this issue and found out that the USB ports are slow to wake up even if they are no devices connected to it. this issue do not happen in Arch linux or windows 10 so I can confim its not a hardware issue or a firmware issue as well.


the keyboard can respond after this kernel messages :
Code:
rtsx0: Resume
xhci0: Port routing mask set to 0xffffffff
uhub0 on usbus0
uhub0: <Intel XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus0
uhub0: 15 ports with 15 removable, self powered
uhub1 on usbus1
uhub1: <Intel EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus1 <------------------- [SIZE=26px][B](here I can see pressed keys)[/B][/SIZE]
and here is the full log
Code:
uhub1: at usbus1, port 1, addr 1 (disconnected)
ugen1.2: <vendor 0x8087 product 0x8001> at usbus1 (disconnected)
uhub2: at uhub1, port 1, addr 2 (disconnected)
uhub2: detached
uhub1: detached
wlan0: link state changed to DOWN
rtsx0: Suspend
uhub0: at usbus0, port 1, addr 1 (disconnected)
ugen0.2: <Lenovo N5321 gw> at usbus0 (disconnected)
ugen0.3: <Generic EMV Smartcard Reader> at usbus0 (disconnected)
ugen0.4: <vendor 0x138a product 0x0017> at usbus0 (disconnected)
ugen0.5: <vendor 0x8087 product 0x0a2a> at usbus0 (disconnected)
ugen0.6: <SunplusIT Inc Integrated Camera> at usbus0 (disconnected)
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
rtsx0: Resume
xhci0: Port routing mask set to 0xffffffff
uhub0 on usbus0
uhub0: <Intel XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus0
uhub0: 15 ports with 15 removable, self powered
uhub1 on usbus1
uhub1: <Intel EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus1
ugen0.2: <Lenovo N5321 gw> at usbus0
umodem0 on uhub0
umodem0: <N5321 gw Mobile Broadband Modem> on usbus0
umodem0: data interface 2, has CM over data, has break
umodem1 on uhub0
umodem1: <N5321 gw Mobile Broadband Data Modem> on usbus0
umodem1: data interface 4, has CM over data, has break
cdce0 on uhub0
cdce0: <Ericsson N5321 gw> on usbus0
ue0: <USB Ethernet> on cdce0
ue0: Ethernet address: 02:15:e0:ec:01:00
umodem2 on uhub0
umodem2: <N5321 gw Mobile Broadband GPS Port> on usbus0
umodem2: data interface 10, has CM over data, has break
ugen0.3: <Generic EMV Smartcard Reader> at usbus0
uhub1: 3 ports with 3 removable, self powered
ugen0.4: <vendor 0x138a product 0x0017> at usbus0
Mar 20 14:27:28 x250 wpa_supplicant[354]: ioctl[SIOCS80211, op=20, val=0, arg_len=7]: Can't assign requested address
wlan0: link state changed to UP
Mar 20 14:27:29 x250 dhclient[929]: send_packet: No buffer space available
ugen0.5: <vendor 0x8087 product 0x0a2a> at usbus0
ugen1.2: <vendor 0x8087 product 0x8001> at usbus1
uhub2 on uhub1
uhub2: <vendor 0x8087 product 0x8001, class 9/0, rev 2.00/0.03, addr 2> on usbus1
ugen0.6: <SunplusIT Inc Integrated Camera> at usbus0
uhub2: 8 ports with 8 removable, self powered
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
Mar 20 14:27:29 x250 syslogd: last message repeated 1 times
Mar 20 14:27:29 x250 webcamd[25994]: webcamd: Cannot find USB device
Mar 20 14:27:34 x250 webcamd[26225]: Webcamd is already running for ugen0.6.0

and here is my usbconfig

Code:
ugen0.1: <Intel XHCI root HUB> at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=SAVE (0mA)
ugen1.1: <Intel EHCI root HUB> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen0.2: <Lenovo N5321 gw> at usbus0, cfg=255 md=HOST spd=HIGH (480Mbps) pwr=OFF (0mA)
ugen0.3: <Generic EMV Smartcard Reader> at usbus0, cfg=255 md=HOST spd=FULL (12Mbps) pwr=OFF (50mA)
ugen0.4: <vendor 0x138a product 0x0017> at usbus0, cfg=255 md=HOST spd=FULL (12Mbps) pwr=OFF (100mA)
ugen0.5: <vendor 0x8087 product 0x0a2a> at usbus0, cfg=255 md=HOST spd=FULL (12Mbps) pwr=OFF (100mA)
ugen1.2: <vendor 0x8087 product 0x8001> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen0.6: <SunplusIT Inc Integrated Camera> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (500mA)

I'll attach here my configs.
any help is greatly appreciated.

Code:
/boot/loader.conf

kern.vty="vt"
kern.vt.fb.default_mode="1366x768"
allscreens_flags="-f vgarom-thin-8x16"
screen.font="8x16"
cpufreq_load="YES"

# POWER OFF DEVICES WITHOUT ATTACHED DRIVER
hw.em.smart_pwr_down="1"
hw.pci.do_power_nodriver=3
hw.snd.latency="7"
hint.p4tcc.0.disabled="1"
hint.acpi_throttle.0.disabled="1"
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"
# enable IBM ACPI
acpi_ibm_load="YES"
#acpi_video_load="YES"

# enable cuse for webcamd
cuse_load="YES"

# fusefs for ntfs
fusefs_load="YES"

compat.linuxkpi.enable_rc6="7"  # ENABLE POWER SAVING RENDER C-STATE 6
compat.linuxkpi.enable_dc="2"   # ENABLE POWER SAVING DISPLAY C-STATES
compat.linuxkpi.enable_fbc="1"  # ENABLE FRAME BUFFER COMPRESSION FOR POWER SAVINGS
compat.linuxkpi.i915_fastboot="1" # SKIP UNNECESSARY MODE SETS AT BOOT TIME
compat.linuxkpi.i915_nuclear_pageflip="1"
compat.linuxkpi.semaphores="1"  # USE SEMAPHORES FOR INTER RING SYNC

# simplified boot
boot_mute="NO"
beastie_disable="YES"
autoboot_delay="-1"
hw.usb.no_boot_wait=1


# these values need to be bumped up a bit for desktop usage
kern.maxproc="100000"
kern.ipc.shmseg="1024"
kern.ipc.shmmni="1024"

# enable the nub and the touchpad
hw.psm.trackpoint_support="1"
hw.psm.synaptics_support="1"

# Enables a faster but possibly buggy implementation of soreceive
net.inet.tcp.soreceive_stream="1"

# increase the network interface queue link - the default (50) is way
# too low
net.link.ifqmaxlen="2048"

# enable hardware accelerated AES (can speed up TLS)
aesni_load="YES"

# Load the H-TCP algorithm. It has a more aggressive ramp-up to max
# bandwidth, and is optimized for high-speed, high-latency connections.
cc_htcp_load="YES"

# enable CPU firmware updates
cpuctl_load="YES"

# enable CPU temperature monitoring
coretemp_load="YES"


# load firmware for wireless card - I have Intel 6300-N
iwm7265Dfw_load="YES"

# desktop-ish filesystems, webcam driver, etc
cuse4bsd_load="YES"
libiconv_load="YES"
libiconv_load="YES"
libmchain_load="YES"
cd9660_iconv_load="YES"
msdosfs_iconv_load="YES"
#tmpfs_load="YES"

Code:
/etc/rc.conf

syslogd_flags="-ss"
sendmail_enable="NONE"
hostname="x250"
keymap="fi"
wlans_iwm0="wlan0"
ifconfig_wlan0="WPA DHCP powersave"

# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="NO"

rc_startmsgs="NO"

kld_list="i915kms rtsx.ko coretemp"

seatd_enable="YES"

allscreens_flags="-f vgarom-thin-8x16"

powerdxx_enable=YES

#powerdxx_flags="-n adaptive -a hiadaptive -b adaptive -m 500 -M 2300"

performance_cx_lowest="Cmax"
economy_cx_lowest="Cmax"

#defaultroute_delay="0"
#background_dhclient="YES"

# enable bluetooth (haven't tried this yet)
hcsecd_enable="yes"
sdpd_enable="YES"

# I compile my ports with sndio - it's like the BSD-equivalent of
#sndiod_enable="YES"

# enable printing
cupsd_enable="YES"

# enable use of the webcam (haven't tested yet)
webcamd_enable="YES"

# enable dbus & hald
dbus_enable="YES"
hald_enable="YES"

microcode_update_enable="YES"

#bthidd_enable="yes"

create_args_wlan0="powersave"

Code:
/etc/rc.local

/usr/sbin/usbconfig -d ugen0.2 power_off
/usr/sbin/usbconfig -d ugen0.3 power_off
/usr/sbin/usbconfig -d ugen0.4 power_off
/usr/sbin/usbconfig -d ugen0.5 power_off
/usr/sbin/usbconfig -d ugen0.6 power_save
/usr/sbin/usbconfig -d ugen1.2 power_save

exit 0

Code:
/etc/sysctl.conf


# $FreeBSD$
#
#  This file is read when going to multi-user and its contents piped thru
#  ``sysctl'' to adjust kernel values.  ``man 5 sysctl.conf'' for details.
#

# Uncomment this to prevent users from seeing information about processes that
# are being run under another UID.
#security.bsd.see_other_uids=0

dev.cpu.0.cx_lowest="Cmax"
dev.cpu.1.cx_lowest="Cmax"
dev.cpu.2.cx_lowest="Cmax"
dev.cpu.3.cx_lowest="Cmax"

hw.acpi.lid_switch_state=S3

# increase UFS readahead
vfs.read_max=256

# allow users to mount disks without root permissions
vfs.usermount=1

# make desktop more responsive under high CPU load
kern.sched.preempt_thresh=224

# disable annoying system beep
hw.syscons.bell=0
kern.vt.enable_bell=0

# needed for chromium to work
kern.ipc.shm_allow_removed=1

# enable IPv6 autoconfiguration
net.inet6.ip6.accept_rtadv=1

# suspend on lid close
hw.acpi.lid_switch_state=S3

# increase the nub's tracking sensitivity - tweak to your liking
hw.psm.trackpoint.sensitivity=255
hw.psm.trackpoint.upper_plateau=125

# uncomment this to disable the touchpad - I never use it
# hw.psm.synaptics.touchpad_off=1

# some tweaks to boost network performance over long, fat pipes - see the
# networking section of my server guide for details.
net.inet.tcp.cc.algorithm=htcp
net.inet.tcp.cc.htcp.adaptive_backoff=1
net.inet.tcp.cc.htcp.rtt_scaling=1
net.inet.tcp.rfc6675_pipe=1
net.inet.tcp.syncookies=0
net.inet.tcp.nolocaltimewait=1
kern.ipc.soacceptqueue=1024
kern.ipc.maxsockbuf=8388608
kern.ipc.maxsockbuf=2097152
net.inet.tcp.sendspace=262144
net.inet.tcp.recvspace=262144
net.inet.tcp.sendbuf_max=16777216
net.inet.tcp.recvbuf_max=16777216
net.inet.tcp.sendbuf_inc=32768
#net.inet.tcp.recvbuf_inc=65536
net.local.stream.sendspace=16384
net.local.stream.recvspace=16384
net.inet.raw.maxdgram=16384
net.inet.raw.recvspace=16384
net.inet.tcp.abc_l_var=44
net.inet.tcp.initcwnd_segments=44
net.inet.tcp.mssdflt=1448
net.inet.tcp.minmss=524
net.inet.ip.intr_queue_maxlen=2048
net.route.netisr_maxqlen=2048

#dev.acpi_ibm.0.bluetooth=1
-----------------------------------------------------------------------------------------------------------------------------------------------
EDIT1:

The default for all devices except USB HUBs is power on. You should check the configuration descriptor of your device, that the "bmAttributes" field indicates that the device supports remote wakeup before enabling power save on a random USB device. It is not recommended to set the system timer tick rate below 250 HZ and enable USB power save, due to some USB suspend and resume delays which must comply to the USB specification. The power save feature also applies in the same way to USB device/gadget mode.


that might be the issue ?!
-----------------------------------------------------------------------------------------------------------------------------------------------

EDIT 2
uhub1: 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
might be the cause ! any ideas please
---------------------------------------------
is there any thing I can do to avoid this freeze (even it's so short and I can live with) but Its not normal behaviour.
Regards
Amr
 
Last edited:
What comes into mind... HDD or SSD?
On my T520 with SSD, resume is practically immediate.
On my desktops, with multiple HDD, resume can take a bit longer. I suspect it might be related to HDD spinup.
 
What comes into mind... HDD or SSD?
On my T520 with SSD, resume is practically immediate.
On my desktops, with multiple HDD, resume can take a bit longer. I suspect it might be related to HDD spinup.
actually I have SSD and this issue not in either linux or windows
 
… Keyboard and Touchpad … any thing I can do to avoid this freeze (even it's so short and I can live with) but Its not normal behaviour. …

Maybe an expected delay, with FreeBSD with some types of hardware.

I wait probably much more than three seconds for a keyboard and trackball that are connected via a USB hub in a Philips display:

Code:
root@mowa219-gjp4-8570p-freebsd:~ # lsusb | sort
Bus /dev/usb Device /dev/ugen0.1: ID 0000:0000
Bus /dev/usb Device /dev/ugen0.2: ID 0424:5434 Microchip Technology, Inc. (formerly SMSC) Hub
Bus /dev/usb Device /dev/ugen0.3: ID 058f:6387 Alcor Micro Corp. Flash Drive
Bus /dev/usb Device /dev/ugen0.4: ID 174c:5106 ASMedia Technology Inc. ASM1051 SATA 3Gb/s bridge
Bus /dev/usb Device /dev/ugen0.5: ID 0424:5434 Microchip Technology, Inc. (formerly SMSC) Hub
Bus /dev/usb Device /dev/ugen0.6: ID 0951:1666 Kingston Technology DataTraveler 100 G3/G4/SE9 G2/50
Bus /dev/usb Device /dev/ugen1.10: ID 03f0:3d1d HP, Inc
Bus /dev/usb Device /dev/ugen1.1: ID 0000:0000
Bus /dev/usb Device /dev/ugen1.2: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus /dev/usb Device /dev/ugen1.3: ID 0951:1666 Kingston Technology DataTraveler 100 G3/G4/SE9 G2/50
Bus /dev/usb Device /dev/ugen1.4: ID 04f2:b230 Chicony Electronics Co., Ltd Integrated HP HD Webcam
Bus /dev/usb Device /dev/ugen1.5: ID 0424:2514 Microchip Technology, Inc. (formerly SMSC) USB 2.0 Hub
Bus /dev/usb Device /dev/ugen1.6: ID 0424:2514 Microchip Technology, Inc. (formerly SMSC) USB 2.0 Hub
Bus /dev/usb Device /dev/ugen1.7: ID 047d:2048 Kensington Orbit Trackball with Scroll Ring
Bus /dev/usb Device /dev/ugen1.8: ID 03f0:0024 HP, Inc KU-0316 Keyboard
Bus /dev/usb Device /dev/ugen1.9: ID 0bda:5822 Realtek Semiconductor Corp.
Bus /dev/usb Device /dev/ugen2.1: ID 0000:0000
Bus /dev/usb Device /dev/ugen2.2: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus /dev/usb Device /dev/ugen2.3: ID 0a5c:21e1 Broadcom Corp. HP Portable SoftSailing
root@mowa219-gjp4-8570p-freebsd:~ #

<https://bsd-hardware.info/?probe=dafb1bbb92&d=freebsd>

I'll try with a direct connection to both devices …
 
Maybe an expected delay, with FreeBSD with some types of hardware.

I wait probably much more than three seconds for a keyboard and trackball that are connected via a USB hub in a Philips display:

Code:
root@mowa219-gjp4-8570p-freebsd:~ # lsusb | sort
Bus /dev/usb Device /dev/ugen0.1: ID 0000:0000
Bus /dev/usb Device /dev/ugen0.2: ID 0424:5434 Microchip Technology, Inc. (formerly SMSC) Hub
Bus /dev/usb Device /dev/ugen0.3: ID 058f:6387 Alcor Micro Corp. Flash Drive
Bus /dev/usb Device /dev/ugen0.4: ID 174c:5106 ASMedia Technology Inc. ASM1051 SATA 3Gb/s bridge
Bus /dev/usb Device /dev/ugen0.5: ID 0424:5434 Microchip Technology, Inc. (formerly SMSC) Hub
Bus /dev/usb Device /dev/ugen0.6: ID 0951:1666 Kingston Technology DataTraveler 100 G3/G4/SE9 G2/50
Bus /dev/usb Device /dev/ugen1.10: ID 03f0:3d1d HP, Inc
Bus /dev/usb Device /dev/ugen1.1: ID 0000:0000
Bus /dev/usb Device /dev/ugen1.2: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus /dev/usb Device /dev/ugen1.3: ID 0951:1666 Kingston Technology DataTraveler 100 G3/G4/SE9 G2/50
Bus /dev/usb Device /dev/ugen1.4: ID 04f2:b230 Chicony Electronics Co., Ltd Integrated HP HD Webcam
Bus /dev/usb Device /dev/ugen1.5: ID 0424:2514 Microchip Technology, Inc. (formerly SMSC) USB 2.0 Hub
Bus /dev/usb Device /dev/ugen1.6: ID 0424:2514 Microchip Technology, Inc. (formerly SMSC) USB 2.0 Hub
Bus /dev/usb Device /dev/ugen1.7: ID 047d:2048 Kensington Orbit Trackball with Scroll Ring
Bus /dev/usb Device /dev/ugen1.8: ID 03f0:0024 HP, Inc KU-0316 Keyboard
Bus /dev/usb Device /dev/ugen1.9: ID 0bda:5822 Realtek Semiconductor Corp.
Bus /dev/usb Device /dev/ugen2.1: ID 0000:0000
Bus /dev/usb Device /dev/ugen2.2: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus /dev/usb Device /dev/ugen2.3: ID 0a5c:21e1 Broadcom Corp. HP Portable SoftSailing
root@mowa219-gjp4-8570p-freebsd:~ #

<https://bsd-hardware.info/?probe=dafb1bbb92>

I'll try with a direct connection to both devices …
That might be some bug on some USB devices that needs to be reported to devs and I think that we are talking about the same issue here that might have some sysctl to fix ?
 

Check this
The default for all devices except USB HUBs is power on. You should check the configuration descriptor of your device, that the "bmAttributes" field indicates that the device supports remote wakeup before enabling power save on a random USB device. It is not recommended to set the system timer tick rate below 250 HZ and enable USB power save, due to some USB suspend and resume delays which must comply to the USB specification. The power save feature also applies in the same way to USB device/gadget mode.
I thinks this is related
amr
 
With the keyboard and trackball connected to the hub in the Philips display:
  • following a press on the power button, to wake the computer, around thirteen seconds before the OS begins responding to the keyboard.
I should add:
  • the hub in the display is connected to the hub in the HP dock (not a direct connection to the notebook).
I'll try with a direct connection to both devices …
  • a little longer, maybe fourteen or fifteen seconds.
The waiting period doesn't bother me.
 
uhub1: 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
might be the cause ! any ideas please
 
After upgrading to RC2 after resume X server crashes
Tried both port and pkg drm kmod both the same issue
If I did zzz the x server can be launched again or after reload i915kms but if don't do that will never restore the GUI



[ 30.816] (II) config/udev: Adding input device TPPS/2 IBM TrackPoint (/dev/input/event6)
[ 30.816] (**) TPPS/2 IBM TrackPoint: Applying InputClass "libinput pointer catchall"
[ 30.816] (II) Using input driver 'libinput' for 'TPPS/2 IBM TrackPoint'
[ 30.816] (**) TPPS/2 IBM TrackPoint: always reports core events
[ 30.816] (**) Option "Device" "/dev/input/event6"
[ 30.816] (**) Option "_source" "server/udev"
[ 30.817] (II) event6 - TPPS/2 IBM TrackPoint: is tagged by udev as: Mouse
[ 30.818] (II) event6 - TPPS/2 IBM TrackPoint: device is a pointer
[ 30.821] (II) event6 - TPPS/2 IBM TrackPoint: device removed
[ 30.821] (**) Option "config_info" "udev:/dev/input/event6"
[ 30.821] (II) XINPUT: Adding extended input device "TPPS/2 IBM TrackPoint" (type: MOUSE, id 11)
[ 30.821] (**) Option "AccelerationScheme" "none"
[ 30.821] (**) TPPS/2 IBM TrackPoint: (accel) selected scheme none/0
[ 30.821] (**) TPPS/2 IBM TrackPoint: (accel) acceleration factor: 2.000
[ 30.821] (**) TPPS/2 IBM TrackPoint: (accel) acceleration threshold: 4
[ 30.823] (II) event6 - TPPS/2 IBM TrackPoint: is tagged by udev as: Mouse
[ 30.824] (II) event6 - TPPS/2 IBM TrackPoint: device is a pointer
[ 31.140] (II) modeset(0): EDID vendor "IVO", prod id 1251
[ 31.140] (II) modeset(0): Printing DDC gathered Modelines:
[ 31.140] (II) modeset(0): Modeline "1366x768"x0.0 76.93 1366 1414 1446 1560 768 771 783 822 -hsync -vsync (49.3 kHz eP)
[ 45.610] (II) event0 - System mouse: device removed
[ 45.610] (II) event1 - System keyboard multiplexer: device removed
[ 45.610] (II) event3 - Sleep Button: device removed
[ 45.610] (II) event4 - AT keyboard: device removed
[ 45.610] (II) event5 - SynPS/2 Synaptics TouchPad: device removed
[ 45.610] (II) event6 - TPPS/2 IBM TrackPoint: device removed
[ 45.645] (II) AIGLX: Suspending AIGLX clients for VT switch
[ 54.402] (EE)
[ 54.402] (EE) Backtrace:
[ 54.432] (EE) 0: /usr/local/bin/Xorg (?+0x0) [0x41e2aa]
[ 54.435] (EE) 1: /lib/libthr.so.3 (_pthread_sigmask+0x54e) [0x80093358e]
[ 54.439] (EE) 2: /lib/libthr.so.3 (_pthread_setschedparam+0x82f) [0x800932b3f]
[ 54.442] (EE) 3: ? (?+0x0) [0x7ffffffff8a3]
[ 54.446] (EE) 4: /lib/libc.so.7 (__sys_thr_kill+0xa) [0x800a7e33a]
[ 54.448] (EE) 5: /lib/libthr.so.3 (_pthread_setschedparam+0x6f0) [0x800932a00]
[ 54.451] (EE) 6: ? (?+0x0) [0x0]
[ 54.455] (EE) 7: /lib/libc.so.7 (__raise+0x34) [0x8009f6c74]
[ 54.455] (EE) unw_step failed: unspecified (general) error [-1]
[ 54.455] (EE)
[ 54.455] (EE)
Fatal server error:
[ 54.455] (EE) Caught signal 6 (Abort trap). Server aborting
[ 54.455] (EE)
[ 54.455] (EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
[ 54.455] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[ 54.455] (EE)
[ 54.464] (EE) Server terminated with error (1). Closing log file.
 
Did you also try with drm-devel-kmod from ports?


Assuming it's not through zzz, how do you usually suspend the system?
yes I did try both the port and pkg versions and they are the same issue but I noticed after deinstalling PICOM the issue resolved and after reinstall the issue comes back
but that was not happending in BETA versions

Regards
Amr
 
drm-devel-kmod is not distributed as a package (except on CURRENT).
Are you sure you did try both graphics/drm-kmod and graphics/drm-devel-kmod ports?


Does running picom with --experimental-backends option (which only works from command line, not in ~/.config/picom.conf) change anything?
actually i deinstalled it and the issue is still happening its looking to be not 100% related to GLX
I am now deinstalled it completely and issue still happens
and No I was not using experemental-backends
and No I use drm-kmod drm-fbsd13-kmod
I appreciate your effort to help me
amr
 
I have found a work around which works even if PICOM with GLX backend is running
I have to switch VT to tty2 for example and login then zzz
then it will resume to this tty and then I switch back with ctrl+alt+f9 then no crash
may be it tries to switch to the tty too early before its ready!
any help to make switch tty via command line is appreciated
thank you
amr
 
Changing the accelmrthod to uxa or sna fixes the issue but screen tearing and no transparency as picom won’t run at all
 
switching tty before closing laptop lid is not solution AFAIK
I agree.

I may try OpenBSD and see how it goes
Probably better. But you'll come back to FreeBSD for other reasons anyway :)

Changing the accelmrthod to uxa or sna fixes the issue but screen tearing and no transparency as picom won’t run at all
SNA and UXA are features of graphics/xf86-video-intel. Is this driver installed?

Either use
Code:
Driver "intel"
Option "AccelMethod" "SNA" [or "UXA"]
or
Code:
Driver "modesetting"
(no AccelMethod choice with modesetting, it's either default "glamor" or disabled)

In my experience, when no configuration is specified: if installed, xf86-video-intel with UXA acceleration will be used over modesetting. Otherwise modesetting is used.
 
I agree.


Probably better. But you'll come back to FreeBSD for other reasons anyway :)


SNA and UXA are features of graphics/xf86-video-intel. Is this driver installed?

Either use
Code:
Driver "intel"
Option "AccelMethod" "SNA" [or "UXA"]
or
Code:
Driver "modesetting"
(no AccelMethod choice with modesetting, it's either default "glamor" or disabled)

In my experience, when no configuration is specified: if installed, xf86-video-intel with UXA acceleration will be used over modesetting. Otherwise modesetting is used.
Actually it's alot of effort to redo a new install of openbsd I may wait until final version. Thank you for your precious explanation which I may try it may be a work around to use old Intel driver instead of the new i915kms

Thank you
Amr
 
Finnaly,
after a lot of digging and searching I found a work around
looks like the suspend tries to switch vt while usb still resuming which make the whole system freeze for 3 seconds and then it considers X if frozen then terminates.

this sysctl fixed it for me

kern.vt.suspendswitch=0 #prevent tty switch
kern.vt.deadtimer=60 # I am not sure if this helps or not but I did change the value from 15 any ways
hw.usb.no_suspend_wait=1 # this is very important
 
Back
Top