This guide provides a set of solutions for common hardware and software issues encountered on Fedora immutable systems (like Bluefin or Silverblue), particularly on laptops with NVIDIA GPUs.
1. Sleep & Resume Crash Fixes
This section addresses kernel panics, GPU hangs, and hardware errors related to suspending and resuming the system.
Part A: Fix Kernel Panic on Wake
A common cause of a system crash after waking from sleep is a conflict between the kernel’s memory initialization and the system’s firmware.
The Fix:
-
Open a terminal.
-
Run the following command to add the necessary kernel argument. This disables the “initialize on allocation” feature, which can resolve the conflict.
sudo rpm-ostree kargs --append=init_on_alloc=0 -
Reboot the system for the change to take effect:
sudo systemctl reboot
Part B: Fix NVIDIA GPU Hang on Resume
This is the most common issue, where the NVIDIA GPU fails to re-initialize properly after sleep, leading to a black screen or system freeze.
Step 1: Disable Unnecessary Video Memory Preservation (Primary Fix)
By default, the NVIDIA driver tries to save the entire contents of your video card’s memory (VRAM) to system RAM before sleeping. This process is often buggy and unnecessary on modern systems, frequently causing the resume process to fail.
-
Create a
modprobeconfiguration file to tell the kernel module to disable this feature when it loads. The99-prefix ensures this rule is loaded last and overrides any defaults.sudo nano /etc/modprobe.d/99-nvidia-disable-vram-save.conf -
Add the following single line to the file. This is the master switch to turn the feature off.
options nvidia NVreg_PreserveVideoMemory=0 -
Save the file and exit the editor (in
nano, pressCtrl+X, thenY, thenEnter). -
Reboot the system. On an immutable OS, the system will automatically apply this setting on the next boot.
Step 2: Disable ASPM for PCIe Stability
If you still experience issues, buggy firmware might be causing hardware communication glitches. Turning off Active State Power Management (ASPM) can improve stability at the cost of slightly higher power consumption.
-
Add the kernel argument to disable ASPM:
sudo rpm-ostree kargs --append=pcie_aspm=off -
Reboot to apply the change.
Step 3: Set a More Compatible Sleep Mode (Fallback)
As a final measure, you can force the system to use the freeze sleep state, which is more broadly compatible than the deeper s2idle state.
-
Create the directory for the systemd sleep configuration:
sudo mkdir -p /etc/systemd/sleep.conf.d -
Create and edit the configuration file:
sudo nano /etc/systemd/sleep.conf.d/20-use-freeze.conf -
Add the following content to the file:
[Sleep] SuspendState=freeze -
Save the file and reboot.
2. Fix Boot Failures & SELinux Denials
If you experience boot failures, the cause is often an overly restrictive SELinux policy preventing ostree from working correctly. These steps create a local SELinux policy module to allow the necessary operations.
Step 1: Temporarily Switch to Permissive Mode
First, we allow the system to boot properly so we can capture the required logs. Permissive mode tells SELinux to log errors without blocking the actions.
-
In a terminal, run:
sudo setenforce 0 -
Reboot your computer. The system should now start without failing, confirming SELinux is the culprit.
Step 2: Generate and Install the Local Policy Fix
After rebooting, the system will have logged all the actions it would have denied. We use these logs to automatically generate a permanent fix.
-
Generate the policy module. This command reads the recent denial logs and creates a local fix module named
my-ostree-fix.sudo ausearch -m AVC -ts recent | audit2allow -M my-ostree-fix -
Install the module. This command loads the fix you just created into your system’s core SELinux policy.
sudo semodule -i my-ostree-fix.pp
Step 3: Re-enable Enforcing Mode and Verify
Now, we return the system to its most secure state and confirm the fix is working.
-
Re-enable Enforcing mode:
sudo setenforce 1 -
Reboot your system:
reboot -
Run final verification checks in the terminal after rebooting:
-
Check that SELinux is enforcing (Expected output:
Enforcing):getenforce -
Check that the custom module is loaded (Expected output:
my-ostree-fix):sudo semodule -l | grep my-ostree-fix -
Check for any new SELinux denials (Expected output:
<no matches>):sudo ausearch -m AVC -ts recent
-
If all commands give the expected output, the SELinux boot failures are resolved.
3. General Kernel & Systemd Fixes
These commands resolve common, minor errors that may appear in your system logs.
-
systemd-remount-fsFailure-
Problem: The service fails on boot because the root filesystem on an ostree system is read-only by design.
-
Fix: Mask the service to stop it from running and generating these harmless errors.
-
Command:
sudo systemctl mask systemd-remount-fs.service
-
-
systemd-logindBootloader Errors-
Problem: A core system process can’t properly read the bootloader configuration.
-
Fix: Update the systemd-boot files to ensure they are correct and consistent.
-
Command:
sudo bootctl update
-
-
“Unknown Group” Errors
-
Problem: The system is missing definitions for standard user groups like ‘audio’ and ‘tty’.
-
Fix: Force the system to create any missing system users and groups from its default configuration files.
-
Command:
sudo systemd-sysusers
-
4. ACPI Fan Control Fix
Fan control on some laptop models is often broken out-of-the-box and requires manual configuration to work correctly.
-
Solution: Use
NBFC-Linux(NoteBook FanControl) to manage the fans. -
Steps:
-
Install NBFC-Linux: Follow the installation instructions from the official repository: GitHub - nbfc-linux/nbfc-linux
-
Find and apply the correct profile: Select the configuration file for your laptop model from NBFC’s list of profiles (e.g.,
HP Victus 15-fb0xxx). -
Set NBFC to auto mode: This allows the service to control fan speeds automatically based on temperature.
-
Stress test to verify: Run a CPU-intensive task to confirm that the fans ramp up correctly.
-
Enable the service: Ensure the NBFC service is enabled to start automatically on every boot.
-