Flatpak Problems

## NOTE: You can use **console** code block to render on websites such as Github.
# 1. Set example pre-prompt text with a leading newline ($'\n') for spacing
export PS4=$'\n(base) sglbl@pc:~$ '

# 2. Turn on trace mode
set -x

# Get system info
fastfetch --logo none
# Displays a concise system overview including OS, kernel, uptime, CPU, GPU, RAM, and other hardware/software info.

# Get NVIDIA info
nvidia-smi
# Shows NVIDIA GPU status, driver version, memory usage, running processes, and other GPU-related metrics.

# Query current PRIME GPU
prime-select query
# Displays which GPU is currently active (e.g., Intel or NVIDIA) on hybrid graphics systems.

# Check kernel messages related to NVIDIA
sudo dmesg | grep -i nvidia
# Filters kernel ring buffer for messages related to NVIDIA drivers, useful for debugging driver or GPU initialization issues.

# Check kernel messages related to DRM (Direct Rendering Manager)
sudo dmesg | grep -i drm
# Filters kernel logs for DRM-related messages, often used for graphics/display debugging.

# Recent thermal daemon logs
sudo journalctl -u thermald | tail -n 50
# Shows the last 50 log lines from the thermald service, which monitors CPU/GPU temperature and thermal throttling.

# Out of memory (OOM) events in previous boot
journalctl -b -1 | grep -i "oom"
# Searches the previous boot logs for OOM (Out of Memory) events to identify processes killed due to memory exhaustion.

# System logs in a specific time range
sudo journalctl --since "1 hour ago"
# Retrieves all system journal logs between the specified times, useful for debugging incidents during a time window.

## JOURNAL DETAILS

# GDM (GNOME Display Manager) logs from previous boot
journalctl -b -1 -u gdm

# Shows logs related to the GDM service in the previous boot, useful for login/display issues.
sudo journalctl --boot=-1 --priority=3

# Xorg logs filtered for errors
sudo journalctl -b _COMM=Xorg | grep EE
# Shows only error messages (EE) from Xorg logs for the current boot, helps diagnose display server issues.

# Full Xorg logs for current boot
sudo journalctl -b _COMM=Xorg
# Displays all Xorg logs from the current boot, including info, warnings, and errors for detailed graphics troubleshooting.

# Sensors output
sudo sensors
# Shows real-time temperature, voltage, and fan speed readings from hardware sensors.

Downgrade Linux Kernel & Nvidia Version

Downgrading from Linux Kerel Kernel: Linux 6.14.0-36-generic& Nvidia Driver 580

Safe Migration Protocol

Warning: Do not run these commands blindly via a remote script (like SSH) if you are not physically there, because if the boot fails, they will be stuck.

Step 1: Install the "Target" Kernel (6.14.0-33)

First, ensure the stable kernel exists on their machine.

sudo apt update
sudo apt install linux-image-6.14.0-33-generic linux-headers-6.14.0-33-generic

(Note: If their Ubuntu version is different, e.g., standard 24.04, the stable kernel might be 6.8.0-xx. Check apt search linux-image-generic to find their stable version.)

Step 2: Clean the Bad Nvidia Driver

Remove the bleeding-edge driver that crashes.

sudo apt purge ~nnvidia
sudo apt autoremove

Step 3: Install the Stable Nvidia Driver (535)

Install the driver that we know works.

sudo apt install nvidia-driver-535

Step 4: The Switch (Reboot Required)

You cannot delete the kernel you are currently using. You must reboot into the new one first.

  1. Restart the client's PC.