pm-suspend works only occasionally, often fails

Message
Author
venik212
Posts: 151
Joined: Mon Jul 06, 2020 9:42 am

pm-suspend works only occasionally, often fails

#1 Post by venik212 »

On my Dell XPS 13 (9310) laptop (mx 21.3, systemd), suspension with lid closing fails more often than it succeeds. Typing in the terminal:
sudo pm-suspend
works sometimes, but at other times it fails. I cannot tell the difference between the situations which lead to failure and those that succeed. Can someone please help? Ideally, closing the lid should do it, but it seems like that would be too much to ask.

Code: Select all

Snapshot created on: 20221126_0604
System:    Kernel: 6.1.0-7mx-ahs-amd64 [6.1.20-1~mx21+1] x86_64 bits: 64 compiler: gcc v: 10.2.1 
           parameters: BOOT_IMAGE=/boot/vmlinuz-6.1.0-7mx-ahs-amd64 
           root=UUID=<filter> ro quiet splash 
           init=/lib/systemd/systemd 
           Desktop: Xfce 4.18.1 tk: Gtk 3.24.24 info: xfce4-panel wm: xfwm 4.18.0 vt: 7 
           dm: LightDM 1.26.0 Distro: MX-21.3_x64 Wildflower November 26  2022 
           base: Debian GNU/Linux 11 (bullseye) 
Machine:   Type: Laptop System: Dell product: XPS 13 9310 v: N/A serial: <filter> Chassis: 
           type: 10 serial: <filter> 
           Mobo: Dell model: 0MRT12 v: A00 serial: <filter> UEFI: Dell v: 3.13.1 date: 02/20/2023 
Battery:   ID-1: BAT0 charge: 47.4 Wh (100.0%) condition: 47.4/51.0 Wh (93.0%) volts: 8.4 min: 7.6 
           model: BYD DELL FP86V09 type: Li-poly serial: <filter> status: Full 
CPU:       Info: Quad Core model: 11th Gen Intel Core i7-1185G7 bits: 64 type: MT MCP 
           arch: Tiger Lake family: 6 model-id: 8C (140) stepping: 1 microcode: A6 cache: 
           L2: 12 MiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 47923 
           Speed: 1007 MHz min/max: 400/4800 MHz Core speeds (MHz): 1: 810 2: 1236 3: 3000 4: 676 
           5: 3000 6: 1259 7: 945 8: 1221 
           Vulnerabilities: Type: itlb_multihit status: Not affected 
           Type: l1tf status: Not affected 
           Type: mds status: Not affected 
           Type: meltdown status: Not affected 
           Type: mmio_stale_data status: Not affected 
           Type: retbleed status: Not affected 
           Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl 
           Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization 
           Type: spectre_v2 
           mitigation: Enhanced IBRS, IBPB: conditional, RSB filling, PBRSB-eIBRS: SW sequence 
           Type: srbds status: Not affected 
           Type: tsx_async_abort status: Not affected 
Graphics:  Device-1: Intel TigerLake-LP GT2 [Iris Xe Graphics] vendor: Dell driver: i915 v: kernel 
           bus-ID: 00:02.0 chip-ID: 8086:9a49 class-ID: 0300 
           Device-2: Microdia Integrated_Webcam_HD type: USB driver: uvcvideo bus-ID: 3-6:3 
           chip-ID: 0c45:672a class-ID: 0e02 
           Display: x11 server: X.Org 1.20.11 compositor: xfwm4 v: 4.18.0 driver: 
           loaded: modesetting unloaded: fbdev,vesa display-ID: :0.0 screens: 1 
           Screen-1: 0 s-res: 1920x1200 s-dpi: 96 s-size: 508x318mm (20.0x12.5") 
           s-diag: 599mm (23.6") 
           Monitor-1: eDP-1 res: 1920x1200 hz: 60 dpi: 169 size: 288x180mm (11.3x7.1") 
           diag: 340mm (13.4") 
           OpenGL: renderer: Mesa Intel Xe Graphics (TGL GT2) v: 4.6 Mesa 20.3.5 
           direct render: Yes 
Audio:     Device-1: Intel Tiger Lake-LP Smart Sound Audio vendor: Dell 
           driver: sof-audio-pci-intel-tgl alternate: snd_hda_intel,snd_sof_pci_intel_tgl 
           bus-ID: 00:1f.3 chip-ID: 8086:a0c8 class-ID: 0401 
           Sound Server-1: ALSA v: k6.1.0-7mx-ahs-amd64 running: yes 
           Sound Server-2: PulseAudio v: 14.2 running: yes 
Network:   Device-1: Qualcomm QCA6390 Wireless Network Adapter vendor: Rivet Networks 
           driver: ath11k_pci v: kernel port: efa0 bus-ID: 72:00.0 chip-ID: 17cb:1101 
           class-ID: 0280 
           IF: wlan0 state: up mac: <filter> 
           IF-ID-1: surfshark_ipv6 state: unknown speed: N/A duplex: N/A mac: <filter> 
Drives:    Local Storage: total: 2.1 TiB used: 223.37 GiB (10.4%) 
           ID-1: /dev/mmcblk0 maj-min: 179:0 model: FE4S5 size: 238.75 GiB block-size: 
           physical: 512 B logical: 512 B type: SSD serial: <filter> scheme: MBR 
           SMART Message: Unknown smartctl error. Unable to generate data. 
           SMART Message: Unable to run smartctl. Root privileges required. 
           ID-2: /dev/nvme0n1 maj-min: 259:0 vendor: KIOXIA model: KXG60PNV2T04 NVMe 2048GB 
           size: 1.86 TiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s lanes: 4 
           type: SSD serial: <filter> rev: 10704104 temp: 42.9 C scheme: GPT 
Partition: ID-1: / raw-size: 949.97 GiB size: 933.99 GiB (98.32%) used: 223.29 GiB (23.9%) 
           fs: ext4 dev: /dev/nvme0n1p4 maj-min: 259:4 
           ID-2: /boot/efi raw-size: 100 MiB size: 96 MiB (96.00%) used: 86.2 MiB (89.8%) fs: vfat 
           dev: /dev/nvme0n1p1 maj-min: 259:1 
Swap:      Alert: No swap data was found. 
Sensors:   System Temperatures: cpu: 47.0 C mobo: 43.0 C 
           Fan Speeds (RPM): cpu: 4681 fan-2: 4383 
Repos:     Packages: 2558 note: see --pkg apt: 2552 lib: 1126 flatpak: 6 
           No active apt repos in: /etc/apt/sources.list 
           Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list 
           1: deb http://deb.debian.org/debian bullseye-updates main contrib non-free
           Active apt repos in: /etc/apt/sources.list.d/debian.list 
           1: deb http://deb.debian.org/debian bullseye main contrib non-free
           2: deb http://security.debian.org/debian-security bullseye-security main contrib non-free
           Active apt repos in: /etc/apt/sources.list.d/google-chrome.list 
           1: deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main
           Active apt repos in: /etc/apt/sources.list.d/mx.list 
           1: deb http://ftp.tsukuba.wide.ad.jp/Linux/mxlinux/mx/repo/ bullseye main non-free
           Active apt repos in: /etc/apt/sources.list.d/skype-stable.list 
           1: deb [arch=amd64] https://repo.skype.com/deb stable main
           Active apt repos in: /etc/apt/sources.list.d/surfshark.list 
           1: deb https://ocean.surfshark.com/debian stretch main
           Active apt repos in: /etc/apt/sources.list.d/teamviewer.list 
           1: deb http://linux.teamviewer.com/deb stable main
Info:      Processes: 280 Uptime: 2h 3m wakeups: 2647 Memory: 31.06 GiB used: 2.67 GiB (8.6%) 
           Init: systemd v: 247 runlevel: 5 default: 5 tool: systemctl Compilers: gcc: 10.2.1 
           alt: 10 Client: shell wrapper v: 5.1.4-release inxi: 3.3.06 
Boot Mode: UEFI

User avatar
j2mcgreg
Global Moderator
Posts: 6547
Joined: Tue Oct 23, 2007 12:04 pm

Re: pm-suspend works only occasionally, often fails

#2 Post by j2mcgreg »

Your lack of a swap partition is the most likely cause of your problems with suspend. There are a lot of folks touting the idea that with enough ram available you can forgo creating a swap partition or file, but the reality is that applications like suspend and hibernate still expect it to be there (even though it may never be used) and can give unpredictable results when swap space is not present. The good news is that you can add a swap file at any time and here’s how:

https://www.digitalocean.com/community/ ... -debian-11
HP 15; ryzen 3 5300U APU; 500 Gb SSD; 8GB ram
HP 17; ryzen 3 3200; 500 GB SSD; 12 GB ram
Idea Center 3; 12 gen i5; 256 GB ssd;

In Linux, newer isn't always better. The best solution is the one that works.

venik212
Posts: 151
Joined: Mon Jul 06, 2020 9:42 am

Re: pm-suspend works only occasionally, often fails

#3 Post by venik212 »

J2-- You might be right-- I installed a swap file as instructed by the very nice tutorial your link pointed to. I have 32 gb of ram, so it might not really be used, but since the swap file installation it looks like suspension is less temperamental. I am still monitoring it, but it looks like things have improved. Thanks!

venik212
Posts: 151
Joined: Mon Jul 06, 2020 9:42 am

Re: pm-suspend works only occasionally, often fails

#4 Post by venik212 »

My glee was premature-- suspend still fails occasionally when I close the lid or issue a sudo pm-suspend command. The plot thickens...

User avatar
j2mcgreg
Global Moderator
Posts: 6547
Joined: Tue Oct 23, 2007 12:04 pm

Re: pm-suspend works only occasionally, often fails

#5 Post by j2mcgreg »

You are in the same boat I am IE you have a really new laptop and Linux hasn't quite caught up yet. If you can endure the problem in the short term, MX 23 will be released in a couple of months and your suspend problem may solve itself. In my case, my HP 15 had multiple problems and I was able to resolve most of them by installing the Liquorix 6.2.xxx kernel and headers that are available in the Enabled Repos section of MXPI. If you do install the new kernel, you will afterwards have to use Boot Options in MX Tools to make it the default. YMMV.
HP 15; ryzen 3 5300U APU; 500 Gb SSD; 8GB ram
HP 17; ryzen 3 3200; 500 GB SSD; 12 GB ram
Idea Center 3; 12 gen i5; 256 GB ssd;

In Linux, newer isn't always better. The best solution is the one that works.

venik212
Posts: 151
Joined: Mon Jul 06, 2020 9:42 am

Re: pm-suspend works only occasionally, often fails

#6 Post by venik212 »

My laptop is not REALLY that new-- I think it was made in 2020 or 2021, which-- in computer years-- is a long time ago ;-) In any event, I am using the AHS version of mx linux, thinking that it will provide better support for "new" hardware. I shall take a look at the Liquorix kernel-- thanks for the tip.

venik212
Posts: 151
Joined: Mon Jul 06, 2020 9:42 am

Re: pm-suspend works only occasionally, often fails

#7 Post by venik212 »

It looks as if the ONLY reliable way to suspend this laptop is to go to the whisker menu, and choose Suspend from the logout options. If I only knew what command is being used there, I could attach it to some keyboard shortcut...

User avatar
CharlesV
Global Moderator
Posts: 7058
Joined: Sun Jul 07, 2019 5:11 pm

Re: pm-suspend works only occasionally, often fails

#8 Post by CharlesV »

I believe this is what your after

Code: Select all

xfce4-session-logout --suspend
and if you want it to lock and have trouble with it locking, then this

Code: Select all

xscreensaver-command -lock ; xfce4-session-logout --suspend
*QSI = Quick System Info from menu (Copy for Forum)
*MXPI = MX Package Installer
*Please check the solved checkbox on the post that solved it.
*Linux -This is the way!

venik212
Posts: 151
Joined: Mon Jul 06, 2020 9:42 am

Re: pm-suspend works only occasionally, often fails

#9 Post by venik212 »

Thanks-- it seems to work (for now..;-) Where did you find that command? More importantly-- how can I attach it to lid closing of the laptop? Selecting the appropriate option in the Power manager didn't do the trick-- it worked only occasionally.

venik212
Posts: 151
Joined: Mon Jul 06, 2020 9:42 am

Re: pm-suspend works only occasionally, often fails

#10 Post by venik212 »

Sadly, quite often suspend fail now. I cannot figure out what is different between the times that it fails and the times that it manages to accomplish the feat of suspension when I close the lid. Often, after I close the lid, and touch the back after 10 minutes of being closed, it is rather hot. I have NO IDEA what is going on. If I had a TV crew here I would make a video of me dumping this otherwise nice laptop into the river, and send it to Dell, in the hope that just ONCE they will pay attention to their customers.
In addition, I have set a swapfile, which I tested and it works, but the idiotic no-suspend circus continue.
Last edited by venik212 on Fri Jul 28, 2023 3:45 am, edited 1 time in total.

Post Reply

Return to “XFCE Desktop Environment”