France Canada

  • 1 Post
  • 230 Comments
Joined 1 year ago
cake
Cake day: June 1st, 2023

help-circle






  • Hibernation or suspend? 2 different things. For hibernation you need a swap space at least the size of your RAM, and then the laptop is powered off after this.

    For suspend, in your dmesg, see if you have:

    ACPI: PM: (supports S0 S3 S4 S5)

    if you have S3 your laptop should lost only a few percent.

    do a:

    cat /sys/power/mem_sleep

    what does it says?

    New CPU/BIOS/PC/Laptop only support something called “s0 idle” meaning it is like a cellphone, everything is running, and each drivers/components/os should enter low power themselves, if they do not, well, your battery is draining.

    S3 means “suspend to RAM”, only RAM is powered and everything else is off, your laptop can stay like this for days. I don’t know who decided that this is bad and your laptop should be like your cellphone, always running?!?





  • You need to unload your wifi module before suspend.

    Without systemd it’s easy:

    create a file /etc/pm/config.d/config containing:

    HOOK_BLACKLIST="wireless"
    SUSPEND_MODULES=”NAME_OF_YOUR_WIFI_MODULE”
    SUSPEND_MODULES=”wl”
    

    With systemd try this

    create a file /usr/lib/systemd/system-sleep/fix-wifi.sh containing (fuck this editor, replace the “##” with “&&”) :

    #!/bin/bash
    [ "$1" = "post" ] ## exec /usr/sbin/modprobe NAME_OF_YOUR_WIFI_MODULE
    [ "$1" = "pre" ] ## exec /usr/sbin/modprobe -r NAME_OF_YOUR_WIFI_MODULE
    exit 0
    

    and make it executable with chmod 755 /usr/lib/systemd/system-sleep/fix-wifi.sh




  • After using ext4 for yyyeeeaaaarrrrrsss, when I upgraded my MX21 to MX23 I used btrfs, with subvolumes, especially for easy backup/snapshot/timeshift.

    Just at install, super easy, create a small ext4 boot partition on the SSD, then a big LUKS partition, format with btrfs, create subvolumes for / /home /var /swap and that’s it. No hassle with sizing correctly.

    btrfs seems pretty stable. I see no diff in performance compared to ext4 because my application are not that dependant to FS speed, and with SSD anyway?

    oh yeah, built-in compression too!