Trackpad and WIFI are disabled after waking HP laptop from Suspend

My laptop’s default lid closing behaviour is set to suspend.
After lifting the laptop, the wifi and trackpad are disabled.
How do I restart them right after lifting the lid.

The wifi is usually able to be fixed by writing a systemd service. I have worked on many of those issues. The trackpad issue could probably be fixed in the same way, but I have never worked on that issue and am unfamiliar with the particulars of that end.

Here are some links with pertinent information:

You will find many other posts on this topic if you search the forum. Here are some other links:

https://forum.manjaro.org/t/kernel-4-19-0-3-not-network-after-suspending-gnome-edition/63544/2

https://forum.manjaro.org/t/wifi-adapter-tp-link-tl-wn823n-must-be-reconnected-for-it-to-work/52968/19

https://forum.manjaro.org/t/surface-pro-1796-wifi-not-resuming-after-suspend/48133/47

https://forum.manjaro.org/t/thinkpad-x230t-wont-suspend-under-kernel-419rc4-4-18-4-17-4-14-4-9/59798/21

Here are some external links with excellent systemd reference material:

The ArchWiki - systemd

Red Hat - systemd-targets

Red Hat - systemd unit files

Systemd manpage

Please post:

inxi -Fxxz

Information on how to properly post hardware specs and logs:

Please format any terminal output with three backticks before and after, as shown in this picture:

5 Likes

Thanks for writing such a comprehensive answer.

➜  ~ inxi -Fxxz
System:    Host: Amnesiac Kernel: 4.19.16-1-MANJARO x86_64 bits: 64 compiler: gcc v: 8.2.1 Desktop: KDE Plasma 5.14.5 
           tk: Qt 5.12.0 wm: kwin_x11 dm: SDDM Distro: Manjaro Linux 
Machine:   Type: Laptop System: Hewlett-Packard product: HP Pavilion Notebook v: Type1ProductConfigId serial: <filter> 
           Chassis: type: 10 serial: <filter> 
           Mobo: Hewlett-Packard model: 8096 v: 89.33 serial: <filter> UEFI: Insyde v: F.80 date: 06/14/2016 
Battery:   ID-1: BAT0 charge: 18.2 Wh condition: 37.8/37.8 Wh (100%) volts: 14.3/14.6 model: Hewlett-Packard Primary 
           serial: <filter> status: Discharging 
CPU:       Topology: Dual Core model: Intel Core i7-5500U bits: 64 type: MT MCP arch: Broadwell rev: 4 L2 cache: 4096 KiB 
           flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 19161 
           Speed: 798 MHz min/max: 500/3000 MHz Core speeds (MHz): 1: 798 2: 799 3: 798 4: 799 
Graphics:  Device-1: Intel HD Graphics 5500 vendor: Hewlett-Packard driver: i915 v: kernel bus ID: 00:02.0 
           chip ID: 8086:1616 
           Device-2: NVIDIA GM108M [GeForce 940M] driver: N/A bus ID: 0a:00.0 chip ID: 10de:1347 
           Display: x11 server: X.Org 1.20.3 driver: intel compositor: kwin_x11 resolution: 1920x1080~60Hz 
           OpenGL: renderer: Mesa DRI Intel HD Graphics 5500 (Broadwell GT2) v: 4.5 Mesa 18.3.2 compat-v: 3.0 
           direct render: Yes 
Audio:     Device-1: Intel Broadwell-U Audio vendor: Hewlett-Packard driver: snd_hda_intel v: kernel bus ID: 00:03.0 
           chip ID: 8086:160c 
           Device-2: Intel Wildcat Point-LP High Definition Audio vendor: Hewlett-Packard driver: snd_hda_intel v: kernel 
           bus ID: 00:1b.0 chip ID: 8086:9ca0 
           Sound Server: ALSA v: k4.19.16-1-MANJARO 
Network:   Device-1: Realtek RTL8723BE PCIe Wireless Network Adapter vendor: Hewlett-Packard driver: rtl8723be v: kernel 
           port: 5000 bus ID: 08:00.0 chip ID: 10ec:b723 
           IF: wlo1 state: up mac: <filter> 
           Device-2: Realtek RTL810xE PCI Express Fast Ethernet vendor: Hewlett-Packard driver: r8169 v: kernel port: 4000 
           bus ID: 09:00.0 chip ID: 10ec:8136 
           IF: eno1 state: down mac: <filter> 
Drives:    Local Storage: total: 931.51 GiB used: 43.47 GiB (4.7%) 
           ID-1: /dev/sda vendor: Toshiba model: MQ01ABD100 size: 931.51 GiB speed: 6.0 Gb/s serial: <filter> 
Partition: ID-1: / size: 97.93 GiB used: 43.36 GiB (44.3%) fs: ext4 dev: /dev/sda11 
Sensors:   System Temperatures: cpu: 40.0 C mobo: N/A 
           Fan Speeds (RPM): N/A 
Info:      Processes: 209 Uptime: 1h 03m Memory: 7.71 GiB used: 2.14 GiB (27.7%) Init: systemd v: 239 Compilers: 
           gcc: 8.2.1 Shell: zsh v: 5.6.2 running in: konsole inxi: 3.0.30 

1 Like

This adapter is a litany of horrors. Which adapter driver are you using.

Upgrade to kernel 4.20 through Manjaro Settings Manager.

Please do this troubleshooting:

  • Boot to your session/DE
  • Record your session details
loginctl show-session $XDG_SESSION_ID > mysession.log
  • Let your system suspend, or manually suspend (however your issue would appear)
  • Wake up your system and record again your session to the same file
echo "====After suspend====" >> mysession.log
loginctl show-session $XDG_SESSION_ID >> mysession.log
  • Post mysession.log
1 Like
➜  ~ cat mysession.log
Id=1
User=1000
Name=arpit
Timestamp=Wed 2019-01-30 21:12:37 IST
TimestampMonotonic=26401304
VTNr=1
Seat=seat0
Display=:0
Remote=no
Service=sddm-autologin
Desktop=KDE
Scope=session-1.scope
Leader=709
Audit=1
Type=x11
Class=user
Active=yes
State=active
IdleHint=no
IdleSinceHint=0
IdleSinceHintMonotonic=0
LockedHint=no
====After suspend====
Id=1
User=1000
Name=arpit
Timestamp=Wed 2019-01-30 21:12:37 IST
TimestampMonotonic=26401304
VTNr=1
Seat=seat0
Display=:0
Remote=no
Service=sddm-autologin
Desktop=KDE
Scope=session-1.scope
Leader=709
Audit=1
Type=x11
Class=user
Active=yes
State=active
IdleHint=no
IdleSinceHint=0
IdleSinceHintMonotonic=0
LockedHint=no

Upgrading the kernel did not help. The issue still persists.

Sorry, no fish in the net… :disappointed_relieved:

About your wifi, either restart NetworkManager, or use one of @tbg service units

sudo systemctl restart NetworkManager

About your trackpad, check if changing TTY back and forth will make it wake.

  • After suspend, Ctrl+Alt+F3 and then Ctrl+Alt+F1 (or other “Fx” depending…)

Please post the output of the following command:

hwinfo --netcard --wlan --bluetooth | grep -Ei "model\:|driver\:|status\:|cmd\:|file\:|detected\:" | grep -v "Config Status" 
➜  ~ hwinfo --netcard --wlan --bluetooth | grep -Ei "model\:|driver\:|status\:|cmd\:|file\:|detected\:" | grep -v "Config Status"
  Model: "Realtek RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller"
  Driver: "r8169"
  Device File: eno1
  Link detected: no
    Driver Status: r8169 is active
    Driver Activation Cmd: "modprobe r8169"
  Model: "Realtek RTL8723BE PCIe Wireless Network Adapter"
  Driver: "rtl8723be"
  Device File: wlo1
  Link detected: yes
    Driver Status: rtl8723be is active
    Driver Activation Cmd: "modprobe rtl8723be"
  Model: "Realtek Bluetooth Radio"
  Driver: "btusb"
    Driver Status: btusb is active
    Driver Activation Cmd: "modprobe btusb"

Both of these solutions don’t work.

What solutions. Post what you tried. If you tried to fix this with a service file then post the unit (s) you used.

Please give details when you have tested different solutions. If you are running commands post both the input and output and all errors received. You cannot possibly expect anyone to troubleshoot your issues when you provide no details on your troubleshooting efforts.

Here are two service units that should enable your wifi when you resume.

You will need to enable both services after you create the service files.

Suspend unit:

#/etc/systemd/system/network-suspend.service
#sudo systemctl enable network-suspend.service
#sudo systemctl start network-suspend.service
#sudo systemctl status network-suspend.service
#sudo systemctl daemon-reload
[Unit]
Description=Network suspend service 
Before=sleep.target
StopWhenUnneeded=yes

[Service]
User=root
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/sudo -u $USER /bin/bash -lc 'nmcli networking off'
ExecStart=/usr/bin/sleep 1
ExecStart=/usr/bin/systemctl stop NetworkManager
ExecStart=/usr/bin/sleep 1
ExecStart=/usr/bin/ip link set wlo1  down  
ExecStart=/usr/bin/sleep 1
ExecStartPost=/usr/bin/modprobe -r rtl8723be

[Install]
WantedBy=sleep.target

Resume unit:

#/etc/systemd/system/network-resume.service
#sudo systemctl enable network-resume.service
#sudo systemctl start network-resume.service
#sudo systemctl status network-resume.service
#sudo systemctl daemon-reload
[Unit]
Description=Network resume service
After=suspend.target
StopWhenUnneeded=yes

[Service]
User=root
Type=oneshot
RemainAfterExit=yes
ExecStartPre=/usr/bin/sleep 10
ExecStart=/usr/bin/modprobe rtl8723be
ExecStart=/usr/bin/sleep 2
ExecStart=/usr/bin/ip link set wlo1 up
ExecStart=/usr/bin/sleep 2
ExecStart=/usr/bin/systemctl start NetworkManager
ExecStart=/usr/bin/sleep 2
ExecStart=/usr/bin/sudo -u $USER /bin/bash -lc 'nmcli networking on'
ExecStart=/usr/bin/sleep 2
ExecStart=/usr/bin/sudo -u $USER /bin/bash -lc 'nmcli r wifi off'
ExecStart=/usr/bin/sleep 2
ExecStart=/usr/bin/sudo -u $USER /bin/bash -lc 'nmcli r wifi on'

[Install]
WantedBy=suspend.target

If you have any further questions regarding writing, enabling, or checking the current status of your service please read the links posted several times already on this thread.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by Bytemark