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
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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 :
and here is the full log
and here is my usbconfig
I'll attach here my configs.
any help is greatly appreciated.
-----------------------------------------------------------------------------------------------------------------------------------------------
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
---------------------------------------------
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
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]
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
might be the cause ! any ideas pleaseuhub1: 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
---------------------------------------------
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: