Replace suspend with pm-suspend

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Post Reply
SymbolicFrank
Level 1
Level 1
Posts: 22
Joined: Fri Jan 19, 2024 5:16 am

Replace suspend with pm-suspend

Post by SymbolicFrank »

Suspend doesn't work, but pm-suspend does. What do I have to do to have that used in the power options?
t42
Level 11
Level 11
Posts: 3747
Joined: Mon Jan 20, 2014 6:48 pm

Re: Replace suspend with pm-suspend

Post by t42 »

It's systemd thing now

Code: Select all

systemctl suspend
also see systemctl status systemd-suspend.service
-=t42=-
SymbolicFrank
Level 1
Level 1
Posts: 22
Joined: Fri Jan 19, 2024 5:16 am

Re: Replace suspend with pm-suspend

Post by SymbolicFrank »

t42 wrote: Fri Jan 19, 2024 7:33 am It's systemd thing now

Code: Select all

systemctl suspend
also see systemctl status systemd-suspend.service
Yes. How can I replace that with "pm-suspend"? Because "systemctl suspend" doesn't work. It gives the screensaver and tends to make the desktop unresponsive.
t42
Level 11
Level 11
Posts: 3747
Joined: Mon Jan 20, 2014 6:48 pm

Re: Replace suspend with pm-suspend

Post by t42 »

SymbolicFrank wrote: Fri Jan 19, 2024 8:30 am Because "systemctl suspend" doesn't work. It gives the screensaver and tends to make the desktop unresponsive.
It works as intended. Look at something in your system that prevents going it to sleep or some event immediately wakes up it. Look at relevant messages of systemctl status systemd-suspend.service and journalctl. Post your system info, maybe someone will give you further advice.
-=t42=-
SymbolicFrank
Level 1
Level 1
Posts: 22
Joined: Fri Jan 19, 2024 5:16 am

Re: Replace suspend with pm-suspend

Post by SymbolicFrank »

t42 wrote: Fri Jan 19, 2024 8:53 am
SymbolicFrank wrote: Fri Jan 19, 2024 8:30 am Because "systemctl suspend" doesn't work. It gives the screensaver and tends to make the desktop unresponsive.
It works as intended. Look at something in your system that prevents going it to sleep or some event immediately wakes up it. Look at relevant messages of systemctl status systemd-suspend.service and journalctl. Post your system info, maybe someone will give you further advice.
I googled it and many people complain it doesn't work. There were two solutions: if you have an nVidia card, either use the Intel integrated GPU (if available) or the open-source mesa driver. I have an AMD Radeon 6950, the native AMD driver was installed automatically by the default installation and I like playing video games. And I also have an AMD Ryzen CPU, which doesn't have a built-in GPU. So those solutions won't work for me.

Also, while the installation went very well, I still had to spend two days debugging Mint until everything ran stable. I'm using it because I really dislike Microsoft Windows, not because I like to tinker with it. It's an OS, it's there to manage the computer and let me run the applications I want to use.

The alternative is pm-suspend, which does work. Not surprisingly, as it is the command made to suspend your computer. Newer (systemctl) isn't better if it works worse. So I would like to know if it is possible to have the power management use pm-suspend instead.
SymbolicFrank
Level 1
Level 1
Posts: 22
Joined: Fri Jan 19, 2024 5:16 am

Re: Replace suspend with pm-suspend

Post by SymbolicFrank »

So, I guess systemd is the way forward, even if it doesn't actually work. Tough luck if things stops working.

I mean, disabling (expensive) hardware, like video cards, because systemd doesn't like them, is not a solution. It encourages people to find an OS that actually works with their hardware.
User avatar
SMG
Level 25
Level 25
Posts: 32007
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Replace suspend with pm-suspend

Post by SMG »

SymbolicFrank wrote: Fri Jan 19, 2024 9:55 am There were two solutions: if you have an nVidia card, either use the Intel integrated GPU (if available) or the open-source mesa driver.
I help people with suspend issues all the time and I'm not aware of these "solutions" you found.
SymbolicFrank wrote: Tue Jan 23, 2024 10:26 pm So, I guess systemd is the way forward, even if it doesn't actually work. Tough luck if things stops working.
I don't see where you posted the requested system information so others could help you.

Please open the System Reports app and click the System Information tab on the left. Your computer's information should come up in the right pane. Then click the Copy button in the lower right and paste the results into a reply window here so we can see how Linux Mint views your hardware.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
SymbolicFrank
Level 1
Level 1
Posts: 22
Joined: Fri Jan 19, 2024 5:16 am

Re: Replace suspend with pm-suspend

Post by SymbolicFrank »

SMG wrote: Tue Jan 23, 2024 11:21 pm
SymbolicFrank wrote: Fri Jan 19, 2024 9:55 am There were two solutions: if you have an nVidia card, either use the Intel integrated GPU (if available) or the open-source mesa driver.
I help people with suspend issues all the time and I'm not aware of these "solutions" you found.
SymbolicFrank wrote: Tue Jan 23, 2024 10:26 pm So, I guess systemd is the way forward, even if it doesn't actually work. Tough luck if things stops working.
I don't see where you posted the requested system information so others could help you.

Please open the System Reports app and click the System Information tab on the left. Your computer's information should come up in the right pane. Then click the Copy button in the lower right and paste the results into a reply window here so we can see how Linux Mint views your hardware.
Sorry for the late reaction. It works worse and worse, so I would like it very much if you could help me. This is the System Information:

Code: Select all

System:
  Kernel: 5.15.0-91-generic x86_64 bits: 64 compiler: gcc v: 11.4.0 Desktop: Cinnamon 6.0.4
    tk: GTK 3.24.33 wm: muffin vt: 7 dm: LightDM 1.30.0 Distro: Linux Mint 21.3 Virginia
    base: Ubuntu 22.04 jammy
Machine:
  Type: Desktop System: Gigabyte product: B550 AORUS PRO v: N/A serial: <superuser required>
  Mobo: Gigabyte model: B550 AORUS PRO v: x.x serial: <superuser required>
    UEFI: American Megatrends LLC. v: F14 date: 01/04/2022
CPU:
  Info: 12-core model: AMD Ryzen 9 5900X bits: 64 type: MT MCP smt: enabled arch: Zen 3 rev: 2
    cache: L1: 768 KiB L2: 6 MiB L3: 64 MiB
  Speed (MHz): avg: 3578 high: 4891 min/max: 2200/3700 boost: enabled cores: 1: 3918 2: 4890
    3: 3947 4: 2903 5: 2873 6: 3965 7: 3738 8: 3624 9: 3345 10: 3702 11: 2873 12: 2874 13: 3910
    14: 4891 15: 3910 16: 3918 17: 3922 18: 3950 19: 2867 20: 3605 21: 2863 22: 2868 23: 2887
    24: 3638 bogomips: 177260
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Graphics:
  Device-1: AMD driver: amdgpu v: kernel pcie: speed: 16 GT/s lanes: 16 ports: active: HDMI-A-1
    empty: DP-1,DP-2,DP-3 bus-ID: 0b:00.0 chip-ID: 1002:73a5 class-ID: 0300
  Display: x11 server: X.Org v: 1.21.1.4 driver: X: loaded: amdgpu,ati
    unloaded: fbdev,modesetting,radeon,vesa gpu: amdgpu display-ID: :0 screens: 1
  Screen-1: 0 s-res: 3840x2160 s-dpi: 96 s-size: 1016x572mm (40.0x22.5") s-diag: 1166mm (45.9")
  Monitor-1: HDMI-A-0 mapped: HDMI-A-1 model: Philips FTV serial: <filter> res: 3840x2160 hz: 60
    dpi: 68 size: 1440x810mm (56.7x31.9") diag: 1652mm (65") modes: max: 1920x1080 min: 640x480
  OpenGL: renderer: AMD Radeon RX 6950 XT (navi21 LLVM 15.0.7 DRM 3.42 5.15.0-91-generic)
    v: 4.6 Mesa 23.2.1-1ubuntu3.1~22.04.2 direct render: Yes
Audio:
  Device-1: AMD Navi 21 HDMI Audio [Radeon RX 6800/6800 XT / 6900 XT] driver: snd_hda_intel
    v: kernel pcie: speed: 16 GT/s lanes: 16 bus-ID: 0b:00.1 chip-ID: 1002:ab28 class-ID: 0403
  Device-2: AMD Starship/Matisse HD Audio vendor: Gigabyte driver: snd_hda_intel v: kernel pcie:
    speed: 16 GT/s lanes: 16 bus-ID: 0d:00.4 chip-ID: 1022:1487 class-ID: 0403
  Sound Server-1: ALSA v: k5.15.0-91-generic running: yes
  Sound Server-2: PulseAudio v: 15.99.1 running: yes
  Sound Server-3: PipeWire v: 0.3.48 running: yes
Network:
  Device-1: Realtek RTL8125 2.5GbE vendor: Gigabyte driver: r8169 v: kernel pcie: speed: 5 GT/s
    lanes: 1 port: f000 bus-ID: 08:00.0 chip-ID: 10ec:8125 class-ID: 0200
  IF: eno1 state: up speed: 1000 Mbps duplex: full mac: <filter>
Drives:
  Local Storage: total: 64.69 TiB used: 48.03 TiB (74.2%)
  ID-1: /dev/nvme0n1 vendor: Lexar model: SSD NM790 1TB size: 953.87 GiB speed: 63.2 Gb/s
    lanes: 4 type: SSD serial: <filter> rev: 11296 temp: 38.9 C scheme: GPT
  ID-2: /dev/nvme1n1 vendor: Lexar model: SSD NM790 4TB size: 3.73 TiB speed: 63.2 Gb/s lanes: 4
    type: SSD serial: <filter> rev: 12237 temp: 36.9 C scheme: GPT
  ID-3: /dev/sda vendor: Toshiba model: MG07ACA14TE size: 12.73 TiB speed: 6.0 Gb/s type: HDD
    rpm: 7200 serial: <filter> rev: 0103 scheme: GPT
  ID-4: /dev/sdb vendor: Toshiba model: MG07ACA14TE size: 12.73 TiB speed: 6.0 Gb/s type: HDD
    rpm: 7200 serial: <filter> rev: 0104 scheme: GPT
  ID-5: /dev/sdc vendor: Toshiba model: MG08ACA16TE size: 14.55 TiB speed: 6.0 Gb/s type: HDD
    rpm: 7200 serial: <filter> rev: 0102 scheme: GPT
  ID-6: /dev/sdd vendor: Toshiba model: MG07ACA14TE size: 12.73 TiB speed: 6.0 Gb/s type: HDD
    rpm: 7200 serial: <filter> rev: 0103 scheme: GPT
  ID-7: /dev/sde vendor: Western Digital model: WD60EZAZ-00SF3B0 size: 5.46 TiB speed: 6.0 Gb/s
    type: HDD rpm: 5400 serial: <filter> rev: 0A80 scheme: GPT
  ID-8: /dev/sdf type: USB vendor: JMicron Tech model: PCIe size: 1.82 TiB type: N/A
    serial: <filter> rev: 1003 scheme: GPT
Partition:
  ID-1: / size: 937.33 GiB used: 494.16 GiB (52.7%) fs: ext4 dev: /dev/nvme0n1p2
  ID-2: /boot/efi size: 511 MiB used: 6.1 MiB (1.2%) fs: vfat dev: /dev/nvme0n1p1
Swap:
  ID-1: swap-1 type: file size: 2 GiB used: 124.9 MiB (6.1%) priority: -2 file: /swapfile
USB:
  Hub-1: 1-0:1 info: Hi-speed hub with single TT ports: 10 rev: 2.0 speed: 480 Mb/s
    chip-ID: 1d6b:0002 class-ID: 0900
  Hub-2: 1-6:2 info: Genesys Logic Hub ports: 4 rev: 2.0 speed: 480 Mb/s power: 100mA
    chip-ID: 05e3:0608 class-ID: 0900
  Device-1: 1-7:3 info: Integrated Express ITE Device type: HID driver: hid-generic,usbhid
    interfaces: 1 rev: 2.0 speed: 12 Mb/s power: 100mA chip-ID: 048d:5702 class-ID: 0300
  Hub-3: 1-10:4 info: Genesys Logic Hub ports: 4 rev: 2.0 speed: 480 Mb/s power: 100mA
    chip-ID: 05e3:0608 class-ID: 0900
  Hub-4: 2-0:1 info: Super-speed hub ports: 4 rev: 3.1 speed: 10 Gb/s chip-ID: 1d6b:0003
    class-ID: 0900
  Device-1: 2-3:2 info: JMicron / USA External type: Mass Storage driver: uas interfaces: 1
    rev: 3.2 speed: 5 Gb/s chip-ID: 152d:a581 class-ID: 0806 serial: <filter>
  Hub-5: 3-0:1 info: Hi-speed hub with single TT ports: 2 rev: 2.0 speed: 480 Mb/s
    chip-ID: 1d6b:0002 class-ID: 0900
  Device-1: 3-2:2 info: Cooler Master ARES type: Keyboard,HID driver: hid-generic,usbhid
    interfaces: 3 rev: 2.0 speed: 12 Mb/s power: 100mA chip-ID: 2516:014d class-ID: 0300
  Hub-6: 4-0:1 info: Super-speed hub ports: 1 rev: 3.1 speed: 10 Gb/s chip-ID: 1d6b:0003
    class-ID: 0900
  Hub-7: 5-0:1 info: Hi-speed hub with single TT ports: 4 rev: 2.0 speed: 480 Mb/s
    chip-ID: 1d6b:0002 class-ID: 0900
  Device-1: 5-2:2 info: Micro Star MSI GK50 LOW PROFILE TKL Gaming Keyboard type: Keyboard,HID
    driver: hid-generic,usbhid interfaces: 3 rev: 2.0 speed: 12 Mb/s power: 100mA chip-ID: 0db0:0b5c
    class-ID: 0300
  Device-2: 5-4:13 info: Cooler Master Mice Dongle type: Keyboard,Mouse,HID
    driver: hid-generic,usbhid interfaces: 5 rev: 2.0 speed: 12 Mb/s power: 98mA chip-ID: 2516:01b7
    class-ID: 0300
  Hub-8: 6-0:1 info: Super-speed hub ports: 4 rev: 3.1 speed: 10 Gb/s chip-ID: 1d6b:0003
    class-ID: 0900
Sensors:
  System Temperatures: cpu: 34.0 C mobo: N/A gpu: amdgpu temp: 50.0 C mem: 46.0 C
  Fan Speeds (RPM): cpu: 0 fan-2: 0 fan-3: 0 gpu: amdgpu fan: 0
  Power: 12v: N/A 5v: N/A 3.3v: 3.36 vbat: 3.14 gpu: amdgpu watts: 17.00
Repos:
  Packages: 3033 apt: 3012 flatpak: 21
  No active apt repos in: /etc/apt/sources.list
  No active apt repos in: /etc/apt/sources.list.d/amdgpu-proprietary.list
  Active apt repos in: /etc/apt/sources.list.d/amdgpu.list
    1: deb https: //repo.radeon.com/amdgpu/5.7.2/ubuntu jammy main
    2: deb-src https: //repo.radeon.com/amdgpu/5.7.2/ubuntu jammy main
  Active apt repos in: /etc/apt/sources.list.d/official-dbgsym-repositories.list
    1: deb http: //ddebs.ubuntu.com jammy main restricted universe multiverse
    2: deb http: //ddebs.ubuntu.com jammy-updates main restricted universe multiverse
  Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list
    1: deb https: //mirrors.evoluso.com/linuxmint-packages/linuxmint-packages virginia main upstream import backport
    2: deb http: //ftp.tudelft.nl/archive.ubuntu.com jammy main restricted universe multiverse
    3: deb http: //ftp.tudelft.nl/archive.ubuntu.com jammy-updates main restricted universe multiverse
    4: deb http: //ftp.tudelft.nl/archive.ubuntu.com jammy-backports main restricted universe multiverse
    5: deb http: //security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
  Active apt repos in: /etc/apt/sources.list.d/official-source-repositories.list
    1: deb-src https: //mirrors.evoluso.com/linuxmint-packages/linuxmint-packages virginia main upstream import backport
    2: deb-src http: //ftp.tudelft.nl/archive.ubuntu.com jammy main restricted universe multiverse
    3: deb-src http: //ftp.tudelft.nl/archive.ubuntu.com jammy-updates main restricted universe multiverse
    4: deb-src http: //ftp.tudelft.nl/archive.ubuntu.com jammy-backports main restricted universe multiverse
    5: deb-src http: //security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
  Active apt repos in: /etc/apt/sources.list.d/rocm.list
    1: deb [arch=amd64] https: //repo.radeon.com/rocm/apt/5.7.2 jammy main
  Active apt repos in: /etc/apt/sources.list.d/unityhub.list
    1: deb https: //hub.unity3d.com/linux/repos/deb stable main
  Active apt repos in: /etc/apt/sources.list.d/vscode.list
    1: deb [arch=amd64,arm64,armhf] http: //packages.microsoft.com/repos/code stable main
Info:
  Processes: 595 Uptime: 3d 12h 56m wakeups: 7 Memory: 62.69 GiB used: 16.11 GiB (25.7%)
  Init: systemd v: 249 runlevel: 5 Compilers: gcc: 11.4.0 alt: 11/12
  Client: Unknown python3.10 client inxi: 3.3.13
User avatar
SMG
Level 25
Level 25
Posts: 32007
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Replace suspend with pm-suspend

Post by SMG »

SymbolicFrank wrote: Sun Mar 10, 2024 5:40 pm System:
Kernel: 5.15.0-91-generic x86_64 bits: 64 compiler: gcc v: 11.4.0 Desktop: Cinnamon 6.0.4
tk: GTK 3.24.33 wm: muffin vt: 7 dm: LightDM 1.30.0 Distro: Linux Mint 21.3 Virginia
base: Ubuntu 22.04 jammy
I recommend you upgrade to the 6.5 kernel available in Update Manager. That will have newer graphics drivers and better support for your CPU.

Instructions for upgrading to the 6.5 kernel:
  • Open Update Manager.
  • Select View > Linux Kernels and click Continue.
  • Make sure 6.5 is selected on the left panel and then click the top-most option on the right panel. An "Install" button will appear.
  • Install the kernel and then reboot for it to become active.
If this is the correct link, the latest BIOS/UEFI is version F16. Both ones you are missing have AMD updates.

Machine:
Type: Desktop System: Gigabyte product: B550 AORUS PRO v: N/A serial: <superuser required>
Mobo: Gigabyte model: B550 AORUS PRO v: x.x serial: <superuser required>
UEFI: American Megatrends LLC. v: F14 date: 01/04/2022
Image
A woman typing on a laptop with LM20.3 Cinnamon.
SymbolicFrank
Level 1
Level 1
Posts: 22
Joined: Fri Jan 19, 2024 5:16 am

Re: Replace suspend with pm-suspend

Post by SymbolicFrank »

SMG wrote: Sun Mar 10, 2024 7:17 pm
SymbolicFrank wrote: Sun Mar 10, 2024 5:40 pm System:
Kernel: 5.15.0-91-generic x86_64 bits: 64 compiler: gcc v: 11.4.0 Desktop: Cinnamon 6.0.4
tk: GTK 3.24.33 wm: muffin vt: 7 dm: LightDM 1.30.0 Distro: Linux Mint 21.3 Virginia
base: Ubuntu 22.04 jammy
I recommend you upgrade to the 6.5 kernel available in Update Manager. That will have newer graphics drivers and better support for your CPU.

Instructions for upgrading to the 6.5 kernel:
  • Open Update Manager.
  • Select View > Linux Kernels and click Continue.
  • Make sure 6.5 is selected on the left panel and then click the top-most option on the right panel. An "Install" button will appear.
  • Install the kernel and then reboot for it to become active.
If this is the correct link, the latest BIOS/UEFI is version F16. Both ones you are missing have AMD updates.

Machine:
Type: Desktop System: Gigabyte product: B550 AORUS PRO v: N/A serial: <superuser required>
Mobo: Gigabyte model: B550 AORUS PRO v: x.x serial: <superuser required>
UEFI: American Megatrends LLC. v: F14 date: 01/04/2022
I upgraded the kernel, now it does suspend. But it doesn't wake back up. Pressing the reset button is the only thing that works. I'll see if I can get the newest BIOS installed.
SymbolicFrank
Level 1
Level 1
Posts: 22
Joined: Fri Jan 19, 2024 5:16 am

Re: Replace suspend with pm-suspend

Post by SymbolicFrank »

So, I was wondering: is fixing suspend or replacing it with pm-suspend on the table? For all the people who have updated and upgraded everything to the latest versions, while it still doesn't work?

pm-suspend is far better, in that it actually suspends and wakes the computer back up, but the "waking up" part is far too trigger-happy, in that it often wakes the computer back up before it has suspended. In general, I have to do "sudo pm-suspend" two or three times before it sticks, but last night it didn't happen after more than ten tries.

And while selecting suspend from the menu doesn't work, so does "shutdown" and "restart", most of the time. It takes at least two tries. I had to do "sudo shutdown now" in a terminal to get it to power down.

While that might not be all that interesting for a low-power laptop from a power user, my computer consumes ~150 watts when idle, and ~600 watts when doing stuff. And fortunately, I do know how it all works. And because of all the devices, hard disks and the large amount of RAM, it takes about five minutes to boot, depending. That's why I value suspend and resume quite a lot.
User avatar
SMG
Level 25
Level 25
Posts: 32007
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Replace suspend with pm-suspend

Post by SMG »

SymbolicFrank wrote: Sat Apr 20, 2024 8:07 pmWhile that might not be all that interesting for a low-power laptop from a power user, my computer consumes ~150 watts when idle, and ~600 watts when doing stuff. And fortunately, I do know how it all works. And because of all the devices, hard disks and the large amount of RAM, it takes about five minutes to boot, depending. That's why I value suspend and resume quite a lot.
Were you able to get the BIOS updated?

When one has a lot of attached drives, it can sometimes be those drives are interfering with suspend and shut down because they are not behaving as expected.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
t42
Level 11
Level 11
Posts: 3747
Joined: Mon Jan 20, 2014 6:48 pm

Re: Replace suspend with pm-suspend

Post by t42 »

SMG wrote: Sat Apr 20, 2024 8:15 pm When one has a lot of attached drives, it can sometimes be those drives are interfering with suspend and shut down because they are not behaving as expected.
Probably it is the case considering OP's impressive array of slow USB storage. It can be estimated executing udisksctl power-off /dev/XYZ for each external device before suspend
-=t42=-
Post Reply

Return to “Other topics”