How to configure pm-utils to not set --quirk-no-chvt in /var/run/pm-utils/pm-suspend/storage/parameters[.rm] after resuming?

Ubuntu Version:
24.04.2 Server LTS

Desktop Environment :
Xorg+FVWM3

Problem Description:
Fresh install of Ubunti Server 24.04.02 LTS.
Ubuntu did not offer an UEFI install (e.g. with EFI partition), installed BIOS boot system.
Systemd refuses to hibernate on non-UEFI systems since version 255.

Thus I have to use traditional pm-utils, which I installed as first package.
This works fine from console.
Then I installed the second package - Xorg.
But in graphics mode (Xorg) hibernate only works if I truncate the /var/run/pm-utils/pm-suspend/storage/parameters[.rm] files to zero.
These files contain the option “–quirk-no-chvt”.

Unfortunately, with my system configuration, hibernating from Xorg seems to only work with the traditional chvt method (i.e. changing to console/vt mode before doing the actual hibernation).
With the incorrect option “–quirk-no-chvt” pm-hibernate just returns, doing nothing.
With the incorrect option removed, hibernate+resume just works fine, hibernating the system and correctly resuming it.

Relevant System Information:
Supermicro X9DRi-LN4F: Ordinary server/workstation mobo with 256GB RAM, various HDD and SSD, 4k graphics card (CEDAR, radeon driver)

What I’ve Tried:
I would love to be able to directly hibernate from xorg, that is, without having to remember to truncate the two files mentioned above.
I searched for, but didn’ t find any pm-utils configuration file.
Alternatively I just switch to a root text mode vt console and do the pm-hibernate call from there.

So my question:
Is there a way to cleanly configure the system to not restore the incorrect “–quirk-no-chvt” option after each and every resume from hibernation?

How did you make this happen ? Ubuntu defaults to use UEFI if the BIOS settings are set to it … is your BIOS forcefully set to not allow UEFI ?

With an installation DVD AFAIU it defaults to BIOS, as El Torito is no EFI loader.

Thus it would IMHO be better to leave the decision to the user which loaders to install on the target disks, either EFI or BIOS (or both, when it needs to be booted on all systems).

Edit: If Ubuntu would offer to install both types of loaders, the user could instruct the BIOS to either prioritize or allow exclusively one type of loader…

The installer only checks for /sys/firmware/efi/efivars at the end of the install process and based on its existence it will pick the correct bootloader type for the system, how you booted the install media should not matter …

The BIOS is set to allow both iirc, and gives BIOS mode preference over if the boot media contains a BIOS loader.
For this reason imho it would be nice to give the user the choice which loaders to install and which ones not.

Otherwise, the only surefire way to set the computer into EFI mode would be to crippling the system by explicitly disallowing BIOS mode, making almost all other disks unbootable.

Anyway, the question was, how to “officially correctly” configure pm-utils so it does no longer uses the –quirk-no-chvt option, in case anybody knows this or has links in that direction…

I got that but was hoping to solve the root cause that forced you to use obsolete technology at all :wink:
(legacy BIOS mode as well as pm-tools are pretty dead horses nowadays)

I’d grep through the contents of the pm-utils scripts for that option, it’s likely just something you can easily tweak …

EDIT: looking at the source it is set in pm/sleep.d/98video-quirk-db-handler:

        elif using_kms; then
            # Using kernel modesetting?  No quirks, and do not change vts.
            remove_parameters $possible_video_quirks
            add_parameters --quirk-no-chvt
            echo "Kernel modesetting video driver detected, not using quirks."

That file is just a shell script you can easily hack (I’d just comment the whole elif block)

1 Like

Well, UEFI stuff is not yet always as reliable as good old BIOS stuff.
Did you know that FreeBSD for example only configures mirrored bootloaders in CSM mode only, but not in UEFI mode? This old bug is an example why it is not always best to be early adopter.
As I also use FreeBSD, I thus am in no hurry to disable CSM boot.

Anyway you seem to be proficient in Ubuntu installation… the ZFS on root installer on the desktop version crashed on this system so I could not give it a try :frowning:
Having official ZFS support is my reason for trying Ubuntu again…

I used to work on the old debian-installer based installers (including Ubiquity), but am not super familiar with the newer code and have also never used zfs … so i fear I’m of not much help with this …

1 Like