Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep running programs but suspend while not consuming almost at all battery #178

Open
Benjamin-Loison opened this issue Dec 21, 2024 · 149 comments

Comments

@Benjamin-Loison
Copy link
Owner

Benjamin-Loison commented Dec 21, 2024

At least twice I suspended my Linux Mint 22 Cinnamon Framework 13 with 5% of battery and try resuming it afterwards but it shutted down.

According to Benjamin_Loison/Debian/issues/105, I am looking for S4 state.

Related to #115 and Benjamin_Loison/linux/issues/29.

+4

@Benjamin-Loison
Copy link
Owner Author

Related to #62.

@Benjamin-Loison
Copy link
Owner Author

@Benjamin-Loison
Copy link
Owner Author

The person:
-----BEGIN PGP MESSAGE-----

hF4DTQa9Wom5MBgSAQdA7RBVTjI0NIaAhnEN0uGpoVerRbHf6acGapzwVCCnRhIw
5DqUDpf11B+A0TRE7bjQ+TocWV90A22kgLraWSQCFNCACUyimLu8xKo2bUVCRTNL
1EoBCQIQH2W621WY0CCeQimplzFmXecG4iqjZE3D0cSyQcuBPoyVsB2AEO+exW8s
1+giCT0cb6URe/ol07Rey7i6CIpP4D7OsRaP2A==
=5/Tv
-----END PGP MESSAGE-----

would be interested by this.

@Benjamin-Loison
Copy link
Owner Author

@Benjamin-Loison
Copy link
Owner Author

Benjamin-Loison commented Jan 7, 2025

On my Linux Mint 22 Cinnamon Framework 13:

According to the person:
-----BEGIN PGP MESSAGE-----

hF4DTQa9Wom5MBgSAQdAwTK6HqtmJbLnBYIy0+vWaLlzy59h2p03uHSPfVJoa0Ew
h89Z7dRWZGnGwznNwom4A2bB/YongtylfApL6NphRPGzHqwI7WZhUvt2zjBTXUdY
1EwBCQIQm6YuixxWjCbt8+C9cU6v/PxPN9wGPJR++46L7YLUSHD1cxnbAEC6OU7j
TW9XCouAUXWJIURFHqgyk7TVr83VdQ9ojm/p0n6l
=TY6/
-----END PGP MESSAGE-----
systemctl hibernate
Call to Hibernate failed: Not enough suitable swap space for hibernation available on compatible block devices and file systems

htop shows 33 G of swap and 4.17 GB of RAM used over 31.3. So as the mentioned person uses a swap partition, it may require a swap partition and not a swap file.

ls -lh /file.swap
-rw------- 1 root root 32G Mar 10  2024 /file.swap

@Benjamin-Loison
Copy link
Owner Author

df -h /
Output:
Filesystem               Size  Used Avail Use% Mounted on
/dev/mapper/vgmint-root  1.8T  1.5T  211G  88% /

@Benjamin-Loison
Copy link
Owner Author

Benjamin-Loison commented Jan 7, 2025

According to the person on another OS booted from the same disk when hibernate the home folder is shown as encrypted by ecryptfs (after ecryptfs-migrate-home).

Unclear if have to decrypt swap then home folder or the other way around, as possibly decrypting swap requires decrypting the home folder first or the other way around according to the person.

So according to the person have to specify 2 passwords. Maybe 2 passwords as the purpose of swap is to be common to all users but not the home folder.

As the swap is encrypted in theory, we reach strong encryption while keeping running state it seems.

@Benjamin-Loison
Copy link
Owner Author

The person achieved with 40 GB of swap for the 32 GB RAM work laptop.

@Benjamin-Loison
Copy link
Owner Author

Benjamin-Loison commented Jan 7, 2025

ls -lh /swap.img
-rw------- 1 root root 8.0G Nov 26 19:44 /swap.img

on my Ubuntu 24 default install.

htop shows this amount of swap correctly.

@Benjamin-Loison
Copy link
Owner Author

sudo swapoff /swap.img

Source: doc.ubuntu-fr.org: swap#Activer/Désactiver l'utilisation du swap (1698589132)

htop shows now 0K of swap.

@Benjamin-Loison
Copy link
Owner Author

sudo rm /swap.img

@Benjamin-Loison
Copy link
Owner Author

Benjamin-Loison commented Jan 7, 2025

gparted from Debian 12 GNOME:

sudo apt install -y gparted
Output:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  gparted-common policykit-1 polkitd-pkla
Suggested packages:
  dmraid gpart jfsutils kpartx mtools reiser4progs reiserfsprogs udftools
The following NEW packages will be installed:
  gparted gparted-common policykit-1 polkitd-pkla
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 2,586 kB of archives.
After this operation, 8,876 kB of additional disk space will be used.
Get:1 http://ftp.fr.debian.org/debian bookworm/main amd64 gparted-common all 1.3.1-1 [1,711 kB]
Get:2 http://ftp.fr.debian.org/debian bookworm/main amd64 policykit-1 amd64 122-3 [11.8 kB]
Get:3 http://ftp.fr.debian.org/debian bookworm/main amd64 gparted amd64 1.3.1-1 [831 kB]
Get:4 http://ftp.fr.debian.org/debian bookworm/main amd64 polkitd-pkla amd64 122-3 [31.9 kB]
Fetched 2,586 kB in 1s (5,049 kB/s)     
Selecting previously unselected package gparted-common.
(Reading database ... 368122 files and directories currently installed.)
Preparing to unpack .../gparted-common_1.3.1-1_all.deb ...
Unpacking gparted-common (1.3.1-1) ...
Selecting previously unselected package policykit-1.
Preparing to unpack .../policykit-1_122-3_amd64.deb ...
Unpacking policykit-1 (122-3) ...
Selecting previously unselected package gparted.
Preparing to unpack .../gparted_1.3.1-1_amd64.deb ...
Unpacking gparted (1.3.1-1) ...
Selecting previously unselected package polkitd-pkla.
Preparing to unpack .../polkitd-pkla_122-3_amd64.deb .......................] 
Unpacking polkitd-pkla (122-3) ...
Setting up polkitd-pkla (122-3) ...
Setting up gparted-common (1.3.1-1) ...
Setting up policykit-1 (122-3) ...
Setting up gparted (1.3.1-1) ...
Processing triggers for mailcap (3.70+nmu1) ...
Processing triggers for desktop-file-utils (0.26-1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for gnome-menus (3.36.0-1.1) ...
Processing triggers for man-db (2.11.2-2) ...

Should Resize/Move the given partition to shrink it enough.
Maybe it does not have 40 free GB, even if it does not solve my issue.

Screenshot from 2025-01-07 16-15-21

image

image

apt show e2fsprogs
Output:
Package: e2fsprogs
Version: 1.47.0-2
Priority: required
Important: yes
Section: admin
Maintainer: Theodore Y. Ts'o <[email protected]>
Installed-Size: 1,532 kB
Pre-Depends: libblkid1 (>= 2.36), libc6 (>= 2.34), libcom-err2 (>= 1.43.9), libext2fs2 (= 1.47.0-2), libss2 (>= 1.38), libuuid1 (>= 2.16)
Depends: logsave
Recommends: e2fsprogs-l10n
Suggests: gpart, parted, fuse2fs, e2fsck-static
Homepage: http://e2fsprogs.sourceforge.net
Tag: admin::configuring, admin::filesystem, hardware::storage,
 implemented-in::c, interface::commandline, role::program,
 scope::utility, security::integrity, use::checking, use::configuring
Download-Size: 571 kB
APT-Manual-Installed: yes
APT-Sources: http://ftp.fr.debian.org/debian bookworm/main amd64 Packages
Description: ext2/ext3/ext4 file system utilities
 The ext2, ext3 and ext4 file systems are successors of the original ext
 ("extended") file system. They are the main file system types used for
 hard disks on Debian and other Linux systems.
 .
 This package contains programs for creating, checking, and maintaining
 ext2/3/4-based file systems.  It also includes the "badblocks" program,
 which can be used to scan for bad blocks on a disk or other storage device.

So the version is fine.

df -h ubuntu/
Output:
Filesystem      Size  Used Avail Use% Mounted on
/dev/nvme0n1p7   60G   37G   21G  65% /home/benjamin_loison/ubuntu

S3 idle shut everything except RAM while S2 idle requests all components to not consume.

Shrinking the next big encrypted Debian partition does not look like a good idea but the previous partition with Windows using BitLocker may be better.
It does not propose shrinking Windows. Let us try temporarily disable BitLocker.

The person let about 90 GB for Windows.

@Benjamin-Loison
Copy link
Owner Author

Screenshot from 2025-01-07 23-22-07

image

Waiting the mouse icon to switch back to normal does not help.

Screenshot from 2025-01-07 23-23-30

@Benjamin-Loison
Copy link
Owner Author

@Benjamin-Loison
Copy link
Owner Author

Benjamin-Loison commented Jan 9, 2025

image

Is this screenshot from another OS instance? If not, should try another OS instance.

I would say that it is the same OS as trying to reproduce the screenshot leads to a very similar result:

Untitled

So let us try on currently installed Ubuntu.

image

Maybe opening the encryption helps.

@Benjamin-Loison
Copy link
Owner Author

Benjamin-Loison commented Jan 9, 2025

So need even on my personal laptop know how to shrink a fully encrypted partition.

@Benjamin-Loison
Copy link
Owner Author

DuckDuckGo search Shrink encrypted Debian.

@Benjamin-Loison
Copy link
Owner Author

Benjamin-Loison commented Jan 12, 2025

https://forums.debian.net/viewtopic.php?t=160708

Can probably free space not next to the considered partition to leverage it as swap anyway.

@Benjamin-Loison
Copy link
Owner Author

Benjamin-Loison commented Jan 12, 2025

On Debian 12 GNOME work laptop Virtual Machine Manager Debian 12 GNOME virtual machine:

Screenshot_Debian_2025-01-11_19:47:43

Screenshot_Debian_2025-01-11_20:00:51

Screenshot_Debian_2025-01-11_20:00:57

Screenshot_Debian_2025-01-11_20:01:02

Screenshot_Debian_2025-01-11_20:01:13

Screenshot_Debian_2025-01-11_20:02:39

Screenshot_Debian_2025-01-11_20:03:21

Screenshot_Debian_2025-01-11_20:03:46

Screenshot_Debian_2025-01-11_20:05:44

Screenshot_Debian_2025-01-11_22:15:02

Screenshot_Debian_2025-01-11_22:19:30

Screenshot_Debian_2025-01-11_22:23:35

@Benjamin-Loison
Copy link
Owner Author

The Unix Stack Exchange 41091 is when do not use LVM which is possibly my case despite Guided - use entire disk and set up encrypted LVM, as it is the third boot of my triple one.

@Benjamin-Loison
Copy link
Owner Author

No matter if provide the correct encryption password on Ubuntu 24 or Debian 12 GNOME I get:

Screenshot from 2025-01-12 23-58-45

@Benjamin-Loison
Copy link
Owner Author

Benjamin-Loison commented Jan 12, 2025

DuckDuckGo and Google search "Failed to open LUKS encryption".

@Benjamin-Loison
Copy link
Owner Author

Benjamin-Loison commented Jan 13, 2025

/sbin/gparted
Output:
GParted 1.3.1
configuration --enable-libparted-dmraid --enable-online-resize
libparted 3.5
Failed to execute child process “dmsetup” (No such file or directory)
Failed to execute child process “cryptsetup” (No such file or directory)

The last line is displayed when specified a decryption password.

As root:

PATH=/usr/sbin:/sbin:$PATH
gparted
Output:
GParted 1.3.1
configuration --enable-libparted-dmraid --enable-online-resize
libparted 3.5

@Benjamin-Loison
Copy link
Owner Author

image

@Benjamin-Loison
Copy link
Owner Author

On Ubuntu 24:

sudo gparted
Output:
GParted 1.5.0
configuration --enable-libparted-dmraid --enable-online-resize
libparted 3.6
Failed to execute child process “cryptsetup” (No such file or directory)

Get the last line once have specified a decryption password.

@Benjamin-Loison
Copy link
Owner Author

cryptsetup
Command 'cryptsetup' not found, but can be installed with:
sudo apt install cryptsetup-bin

@Benjamin-Loison
Copy link
Owner Author

sudo apt install -y cryptsetup-bin
Output:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  cryptsetup-bin
0 upgraded, 1 newly installed, 0 to remove and 3 not upgraded.
Need to get 211 kB of archives.
After this operation, 618 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 cryptsetup-bin amd64 2:2.7.0-1ubuntu4.1 [211 kB]
Fetched 211 kB in 1s (346 kB/s)        
Selecting previously unselected package cryptsetup-bin.
(Reading database ... 212955 files and directories currently installed.)
Preparing to unpack .../cryptsetup-bin_2%3a2.7.0-1ubuntu4.1_amd64.deb ...
Unpacking cryptsetup-bin (2:2.7.0-1ubuntu4.1) ...
Setting up cryptsetup-bin (2:2.7.0-1ubuntu4.1) ...
Processing triggers for man-db (2.12.0-4build2) ...

@Benjamin-Loison
Copy link
Owner Author

cryptsetup
Output:
Usage: cryptsetup [-?VqrvyN] [-?|--help] [--usage] [-V|--version] [--active-name=STRING] [--align-payload=SECTORS] [--allow-discards]
        [-q|--batch-mode] [--cancel-deferred] [-c|--cipher=STRING] [--debug] [--debug-json] [--decrypt] [--deferred] [--device-size=bytes]
        [--disable-blkid] [--disable-external-tokens] [--disable-keyring] [--disable-locks] [--disable-veracrypt] [--dump-json-metadata]
        [--dump-volume-key] [--encrypt] [--external-tokens-path=STRING] [--force-password] [--force-offline-reencrypt] [-h|--hash=STRING]
        [--header=STRING] [--header-backup-file=STRING] [--hotzone-size=bytes] [--hw-opal] [--hw-opal-factory-reset] [--hw-opal-only]
        [--init-only] [-I|--integrity=STRING] [--integrity-legacy-padding] [--integrity-no-journal] [--integrity-no-wipe] [-i|--iter-time=msecs]
        [--iv-large-sectors] [--json-file=STRING] [--keep-key] [--key-description=STRING] [-d|--key-file=STRING] [-s|--key-size=BITS]
        [-S|--key-slot=INT] [--keyfile-offset=bytes] [-l|--keyfile-size=bytes] [--keyslot-cipher=STRING] [--keyslot-key-size=BITS]
        [--label=STRING] [--link-vk-to-keyring=STRING] [--luks2-keyslots-size=bytes] [--luks2-metadata-size=bytes] [--new-keyfile=STRING]
        [--new-keyfile-offset=bytes] [--new-keyfile-size=bytes] [--new-key-slot=INT] [--new-token-id=INT] [-o|--offset=SECTORS] [--pbkdf=STRING]
        [--pbkdf-force-iterations=LONG] [--pbkdf-memory=kilobytes] [--pbkdf-parallel=threads] [--perf-no_read_workqueue]
        [--perf-no_write_workqueue] [--perf-same_cpu_crypt] [--perf-submit_from_crypt_cpus] [--persistent] [--priority=STRING] [--progress-json]
        [--progress-frequency=secs] [-r|--readonly] [--reduce-device-size=bytes] [--refresh] [--resilience=STRING] [--resilience-hash=STRING]
        [--resume-only] [--sector-size=INT] [--serialize-memory-hard-pbkdf] [--shared] [-b|--size=SECTORS] [-p|--skip=SECTORS]
        [--subsystem=STRING] [--test-args] [--test-passphrase] [-t|--timeout=secs] [--token-id=INT] [--token-only] [--token-replace]
        [--token-type=STRING] [--tcrypt-backup] [--tcrypt-hidden] [--tcrypt-system] [-T|--tries=INT] [-M|--type=STRING] [--unbound]
        [--use-random] [--use-urandom] [--uuid=STRING] [--veracrypt] [--veracrypt-pim=INT] [--veracrypt-query-pim] [-v|--verbose]
        [-y|--verify-passphrase] [--volume-key-file=STRING] [--volume-key-keyring=STRING] [-B|--block-size=MiB] [-N|--new] [--use-directio]
        [--use-fsync] [--write-log] [--dump-master-key] [--master-key-file=STRING] [OPTION...] <action> <action-specific>
cryptsetup: Argument <action> missing.

@Benjamin-Loison
Copy link
Owner Author

Screenshot from 2025-01-13 01-09-13

Can't shrink further so it seems to possibly detect correctly available space.

@Benjamin-Loison
Copy link
Owner Author

DuckDuckGo search Linux How to figure out if running on EFI?

@Benjamin-Loison
Copy link
Owner Author

Image
Image
Image

@Benjamin-Loison
Copy link
Owner Author

The Ask Ubuntu answer 162896 shows EFI by selecting Virtual Machine Manager Firmware UEFI.

@Benjamin-Loison
Copy link
Owner Author

Benjamin-Loison commented Jan 18, 2025

With encrypted LVM:

With a swap file got:

systemctl hibernate
Call to Hibernate failed: Sleep verb 'hibernate' is not configured or configuration is not supported by kernel

Even if modify /etc/fstab and /etc/default/grub and update-grub, then it does not help.

@Benjamin-Loison
Copy link
Owner Author

Benjamin-Loison commented Jan 18, 2025

If use Virtual Machine Manager Firmware UEFI, then instead of:

Image

Source: #issuecomment-2600208059

have:

systemctl hibernate
Call to Hibernate failed: Sleep verb 'hibernate' is not configured or configuration is not supported by kernel

@Benjamin-Loison
Copy link
Owner Author

Image

@Benjamin-Loison
Copy link
Owner Author

Benjamin-Loison commented Jan 18, 2025

DuckDuckGo and Google search Linux delete logical volume.

@Benjamin-Loison
Copy link
Owner Author

Benjamin-Loison commented Jan 18, 2025

Image

No issue on reboot if comment /etc/fstab /dev/mapper/vgmint-swap_1 line.

htop correctly shows 0K as swap.

Removing resume in /etc/default/grub maybe makes the reboot longer but still works fine.

@Benjamin-Loison
Copy link
Owner Author

Benjamin-Loison commented Jan 18, 2025

DuckDuckGo search Linux shrink volume group and Linux reduce volume group to logical group.

@Benjamin-Loison
Copy link
Owner Author

lvreduce --help
Output:
  WARNING: Running as a non-root user. Functionality may be unavailable.
  lvreduce - Reduce the size of a logical volume

  lvreduce -L|--size [-]Size[m|UNIT] LV
	[ -l|--extents [-]Number[PERCENT] ]
	[ -A|--autobackup y|n ]
	[ -f|--force ]
	[ -n|--nofsck ]
	[ -r|--resizefs ]
	[    --noudevsync ]
	[    --reportformat basic|json ]
	[ COMMON_OPTIONS ]

  Common options for lvm:
	[ -d|--debug ]
	[ -h|--help ]
	[ -q|--quiet ]
	[ -v|--verbose ]
	[ -y|--yes ]
	[ -t|--test ]
	[    --commandprofile String ]
	[    --config String ]
	[    --driverloaded y|n ]
	[    --nolocking ]
	[    --lockopt String ]
	[    --longhelp ]
	[    --profile String ]
	[    --version ]
	[    --devicesfile String ]
	[    --devices PV ]
	[    --nohints ]
	[    --journal String ]

  Use --longhelp to show all options and advanced commands.
lvreduce
Output:
  WARNING: Running as a non-root user. Functionality may be unavailable.
  No command with matching syntax recognised.  Run 'lvreduce --help' for more information.
  Correct command syntax is:
  lvreduce -L|--size [-]Size[m|UNIT] LV
man lvreduce
Output:
LVREDUCE(8)                                                                                System Manager's Manual                                                                                LVREDUCE(8)

NAME
       lvreduce — Reduce the size of a logical volume

SYNOPSIS
       lvreduce option_args position_args
           [ option_args ]

DESCRIPTION
       lvreduce  reduces  the  size  of  an LV. The freed logical extents are returned to the VG to be used by other LVs. A copy-on-write snapshot LV can also be reduced if less space is needed to hold COW
       blocks. Use lvconvert(8) to change the number of data images in a RAID or mirrored LV.

       Be careful when reducing an LV's size, because data in the reduced area is lost. Ensure that any file system on the LV is resized before running lvreduce so that the removed extents are not  in  use
       by the file system.

       Sizes will be rounded if necessary. For example, the LV size must be an exact number of extents, and the size of a striped segment must be a multiple of the number of stripes.

       In the usage section below, --size Size can be replaced with --extents Number.  See both descriptions the options section.

USAGE
       lvreduce -L|--size [-]Size[m|UNIT] LV
           [ -l|--extents [-]Number[PERCENT] ]
           [ -A|--autobackup y|n ]
           [ -f|--force ]
           [ -n|--nofsck ]
           [ -r|--resizefs ]
           [    --noudevsync ]
           [    --reportformat basic|json ]
           [ COMMON_OPTIONS ]

       Common options for lvm:
           [ -d|--debug ]
           [ -h|--help ]
           [ -q|--quiet ]
           [ -t|--test ]
           [ -v|--verbose ]
           [ -y|--yes ]
           [    --commandprofile String ]
           [    --config String ]
           [    --devices PV ]
           [    --devicesfile String ]
           [    --driverloaded y|n ]
           [    --journal String ]
           [    --lockopt String ]
           [    --longhelp ]
           [    --nohints ]
           [    --nolocking ]
           [    --profile String ]
           [    --version ]

OPTIONS
       -A|--autobackup y|n
              Specifies if metadata should be backed up automatically after a change.  Enabling this is strongly advised! See vgcfgbackup(8) for more information.

       --commandprofile String
              The command profile to use for command configuration.  See lvm.conf(5) for more information about profiles.

       --config String
              Config  settings for the command. These override lvm.conf(5) settings.  The String arg uses the same format as lvm.conf(5), or may use section/field syntax.  See lvm.conf(5) for more informa‐
              tion about config.

       -d|--debug ...
              Set debug level. Repeat from 1 to 6 times to increase the detail of messages sent to the log file and/or syslog (if configured).

       --devices PV
              Restricts the devices that are visible and accessible to the command.  Devices not listed will appear to be missing. This option can be repeated, or accepts a comma separated list of devices.
              This overrides the devices file.

       --devicesfile String
              A  file  listing  devices that LVM should use.  The file must exist in /etc/lvm/devices/ and is managed with the lvmdevices(8) command.  This overrides the lvm.conf(5) devices/devicesfile and
              devices/use_devicesfile settings.

       --driverloaded y|n
              If set to no, the command will not attempt to use device-mapper.  For testing and debugging.

       -l|--extents [-]Number[PERCENT]
              Specifies the new size of the LV in logical extents.  The --size and --extents options are alternate methods of specifying size.  The total number of physical extents  used  will  be  greater
              when  redundant data is needed for RAID levels.  An alternate syntax allows the size to be determined indirectly as a percentage of the size of a related VG, LV, or set of PVs. The suffix %VG
              denotes the total size of the VG, the suffix %FREE the remaining free space in the VG, and the suffix %PVS the free space in the specified PVs.  For a snapshot, the size can be expressed as a
              percentage  of  the  total size of the origin LV with the suffix %ORIGIN (100%ORIGIN provides space for the whole origin).  When expressed as a percentage, the size defines an upper limit for
              the number of logical extents in the new LV. The precise number of logical extents in the new LV is not determined until the command has completed.  When the plus + or minus - prefix is used,
              the value is not an absolute size, but is relative and added or subtracted from the current size.

       -f|--force ...
              Override various checks, confirmations and protections.  Use with extreme caution.

       -h|--help
              Display help text.

       --journal String
              Record  information  in the systemd journal.  This information is in addition to information enabled by the lvm.conf log/journal setting.  command: record information about the command.  out‐
              put: record the default command output.  debug: record full command debugging.

       --lockopt String
              Used to pass options for special cases to lvmlockd.  See lvmlockd(8) for more information.

       --longhelp
              Display long help text.

       -n|--nofsck
              Do not perform fsck before resizing filesystem when filesystem requires it. You may need to use --force to proceed with this option.

       --nohints
              Do not use the hints file to locate devices for PVs. A command may read more devices to find PVs when hints are not used. The command will still perform standard hint file invalidation  where
              appropriate.

       --nolocking
              Disable locking. Use with caution, concurrent commands may produce incorrect results.

       --noudevsync
              Disables  udev synchronisation. The process will not wait for notification from udev. It will continue irrespective of any possible udev processing in the background. Only use this if udev is
              not running or has rules that ignore the devices LVM creates.

       --profile String
              An alias for --commandprofile or --metadataprofile, depending on the command.

       -q|--quiet ...
              Suppress output and log messages. Overrides --debug and --verbose.  Repeat once to also suppress any prompts with answer 'no'.

       --reportformat basic|json
              Overrides current output format for reports which is defined globally by the report/output_format setting in lvm.conf(5).  basic is the original format with columns and  rows.   If  there  is
              more than one report per command, each report is prefixed with the report name for identification. json produces report output in JSON format. See lvmreport(7) for more information.

       -r|--resizefs
              Resize underlying filesystem together with the LV using fsadm(8).

       -L|--size [-]Size[m|UNIT]
              Specifies the new size of the LV.  The --size and --extents options are alternate methods of specifying size.  The total number of physical extents used will be greater when redundant data is
              needed for RAID levels.  When the plus + or minus - prefix is used, the value is not an absolute size, but is relative and added or subtracted from the current size.

       -t|--test
              Run in test mode. Commands will not update metadata.  This is implemented by disabling all metadata writing but nevertheless returning success to the calling function. This may  lead  to  un‐
              usual error messages in multi-stage operations if a tool relies on reading back metadata it believes has changed but hasn't.

       -v|--verbose ...
              Set verbose level. Repeat from 1 to 4 times to increase the detail of messages sent to stdout and stderr.

       --version
              Display version information.

       -y|--yes
              Do not prompt for confirmation interactively but always assume the answer yes. Use with extreme caution.  (For automatic no, see -qq.)

VARIABLES
       LV     Logical Volume name.  See lvm(8) for valid names.  An LV positional arg generally includes the VG name and LV name, e.g. VG/LV.

       String See the option description for information about the string content.

       Size[UNIT]
              Size  is an input number that accepts an optional unit.  Input units are always treated as base two values, regardless of capitalization, e.g. 'k' and 'K' both refer to 1024.  The default in‐
              put unit is specified by letter, followed by |UNIT.  UNIT represents other possible input units: b|B is bytes, s|S is sectors of 512 bytes, k|K is KiB, m|M is MiB, g|G is GiB, t|T is TiB, p|P
              is PiB, e|E is EiB.  (This should not be confused with the output control --units, where capital letters mean multiple of 1000.)

ENVIRONMENT VARIABLES
       See lvm(8) for information about environment variables used by lvm.  For example, LVM_VG_NAME can generally be substituted for a required VG parameter.

EXAMPLES
       Reduce the size of an LV by 3 logical extents:
       lvreduce -l -3 vg00/lvol1

SEE ALSO
       lvm(8), lvm.conf(5), lvmconfig(8), lvmdevices(8),

       pvchange(8), pvck(8), pvcreate(8), pvdisplay(8), pvmove(8), pvremove(8), pvresize(8), pvs(8), pvscan(8),

       vgcfgbackup(8), vgcfgrestore(8), vgchange(8), vgck(8), vgcreate(8), vgconvert(8), vgdisplay(8), vgexport(8), vgextend(8), vgimport(8), vgimportclone(8), vgimportdevices(8), vgmerge(8), vgmknodes(8),
       vgreduce(8), vgremove(8), vgrename(8), vgs(8), vgscan(8), vgsplit(8),

       lvcreate(8), lvchange(8), lvconvert(8), lvdisplay(8), lvextend(8), lvreduce(8), lvremove(8), lvrename(8), lvresize(8), lvs(8), lvscan(8),

       lvm-fullreport(8), lvm-lvpoll(8), blkdeactivate(8), lvmdump(8),

       dmeventd(8), lvmpolld(8), lvmlockd(8), lvmlockctl(8), cmirrord(8), lvmdbusd(8), fsadm(8),

       lvmsystemid(7), lvmreport(7), lvmraid(7), lvmthin(7), lvmcache(7)

Red Hat, Inc.                                                                         LVM TOOLS 2.03.16(2) (2022-05-18)                                                                           LVREDUCE(8)

@Benjamin-Loison
Copy link
Owner Author

DuckDuckGo and Google search Linux reduce physical volume.

@Benjamin-Loison
Copy link
Owner Author

As I don't know how to reduce LVM size to the logical volume of it, let us try with default ext4, as on the laptop owned by the person:
-----BEGIN PGP MESSAGE-----

hF4DTQa9Wom5MBgSAQdAY9XJPACoA/l2QqcpZw0Iv42gR5OQp60ubkSGYc1doj4w
bOWt9rdnCJr0+JHpca/reLjgQcwkjpx5i5kM7GAW1khPJK/Vpem9wEaEDvKmcuo6
0kABqAOTM3Kq19wICaQh/vL11z5XSXZFCDHdYx04AIXU1GOL9gPaj3t1odIC9+Yx
qGtEA5sM5RMMYbMzTSvdfnYp
=GPZB
-----END PGP MESSAGE-----

@Benjamin-Loison
Copy link
Owner Author

Image
Image
Image
Image
Image
Image
Image
Image
Image

@Benjamin-Loison
Copy link
Owner Author

Benjamin-Loison commented Jan 19, 2025

Face:

systemctl hibernate
Call to Hibernate failed: Not running on EFI and resume= is not set. No available method to resume from hibernation

without having specified Firmware UEFI in Virtual Machine Manager, so as htop shows correctly the request password at boot encrypted swap, it should work on an actual computer.

I accordingly proposed to the mentioned person to encrypt his laptop, see Signal of 19/06/25 at 12:00.

The person orally told me that not much interested finally.

@Benjamin-Loison
Copy link
Owner Author

Maybe searching Linux Mint hibernation with full disk encryption would help.

@Benjamin-Loison
Copy link
Owner Author

Benjamin-Loison commented Jan 19, 2025

Image

on my Debian 12 GNOME work laptop.

Can't have 2 partitions under the same LUKS encrypted container?

So contrarily to Linux Mint 22.1 Cinnamon, see #issuecomment-2600090787, Debian 12 GNOME does not use LVM intermediary container, so it is not a must.

@Benjamin-Loison
Copy link
Owner Author

It is what Linux Mint 22.1 Cinnamon does on disk encryption install with LVM but as shown above does not work. So the question is more precisely can we put 2 partitions like ext4 and swap without LVM in a singled dncrypted LUKS container?

The aim being to request a single password assuming a single user usage, especially the case on work laptop.

@Benjamin-Loison
Copy link
Owner Author

If I remember correctly since I established this setup on my Debian 12 GNOME work laptop, I sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y and installed a new kernel and before and after this new kernel install systemctl hibernate and resuming from hibernation works fine.

@Benjamin-Loison
Copy link
Owner Author

Related to Benjamin_Loison/openssh/issues/40.

@Benjamin-Loison
Copy link
Owner Author

nvidia-smi

works fine with secure boot disabled even after reboot.

@Benjamin-Loison
Copy link
Owner Author

Maybe related to Benjamin_Loison/Debian/issues/129.

@Benjamin-Loison
Copy link
Owner Author

Let us try to add graphical button to hibernate as in work tutorial at:
-----BEGIN PGP MESSAGE-----

hF4DTQa9Wom5MBgSAQdA2Lr237T4vIYMR+R8KDEk6dzoxCOQMOnyHEgOm3KWog8w
ffPi24UO8RC+Sv1QJm9aDf21nmgNx9y66818qW2XtlFGHGP7Td/8Pht60y/KQs7I
1KsBCQIQXyTaT5L31kGuWWVL9fy82paWkKIopFY8RmUwYYGjud/oPW0Kkx19YKdb
KywuKVX5NLFEBDyhKUc1SEuPxgNb/zkvPfeim78A26TNUOveZ78SlS4EE7dYCtAt
ny0UZwZ0Ufm5Y98YxwlPE/ncZ/4RZUU+0ldp/zRyhlswNbbNhsYdtw9vjLStspZT
429GLgvRaG5dLJC3oHUsKDaPEJmcsfkHA2unk6o=
=5UKR
-----END PGP MESSAGE-----

@Benjamin-Loison
Copy link
Owner Author

Benjamin-Loison commented Jan 22, 2025

/etc/polkit-1/rules.d/ was already existing but adding to /etc/polkit-1/rules.d/10-enable-hibernate.rules:
polkit.addRule(function(action, subject) {
    if (action.id == "org.freedesktop.login1.hibernate" ||
        action.id == "org.freedesktop.login1.hibernate-multiple-sessions")
    {
        return polkit.Result.YES;
    }
});

have not graphically added an option even after a reboot on Debian 12 GNOME.

@Benjamin-Loison
Copy link
Owner Author

Image

Image

@Benjamin-Loison
Copy link
Owner Author

Benjamin-Loison commented Jan 22, 2025

The person:
-----BEGIN PGP MESSAGE-----

hF4DTQa9Wom5MBgSAQdAmuzuRuWm1m8KlIqeggVfwsdAGTkhB7cnxDSKOu7iADIw
I+TJ3WeyVhsyxWBnDm0InRJufc0e3WQYIRDrVQvWBu4suz+jMONBe7cln/2tw0ZR
1EwBCQIQerR8DwhXgoa9YwlVf3xnkrKi84nKch5BJoTL/IYHA1MVocLu3F1cNviV
62tdWMPcLSlcMVHPNYOUGJjosoF0SFii5ebyNiWi
=prcI
-----END PGP MESSAGE-----

does not know how to shrink LUKS (he only knows how to do for LVM with documentation) but he is fine taking 30 minutes to do so it seems.

@Benjamin-Loison
Copy link
Owner Author

Benjamin-Loison commented Jan 23, 2025

According to the person:
-----BEGIN PGP MESSAGE-----

hF4DTQa9Wom5MBgSAQdAhf8V2TPOw3YouA1nDxgqlmxiNsMztGWi0sXHt49eN18w
qgQ8uBxKETC2SexwEvmC7bIwMIPmP5kLovUHhudV6Z4qDaq9+PIjoAE3kCM0jrCb
0kIBf5/Jk7g3C7E3I/Fg4QwnniD2yiU1VwyPHXTykHuvdyPd/rAsfLRzvm7PIrk1
2y9YWNqCk93pZDpLTaKEGzZGGhs=
=YmJy
-----END PGP MESSAGE-----

an alternative concerning LUKS would be to delete and recreate shorter but then have to copy the data elsewhere.

According to this person the hibernate button should work fine on GNOME even if I told him that no. As far as I remember he uses XFCE on Ubuntu 24.

@Benjamin-Loison
Copy link
Owner Author

See calendar event of 23/01/25 at 10:00.

@Benjamin-Loison
Copy link
Owner Author

Benjamin_Loison/firefox/issues/156 would help.

@Benjamin-Loison
Copy link
Owner Author

Benjamin-Loison commented Jan 27, 2025

Image

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant