When deploying openSUSE Tumbleweed on bare-metal hardware using the Agama installer, certain GPU and HDMI monitor combinations can stall at the SDDM login screen after the first reboot. Below are two practical, repeatable ways to bypass SDDM and launch KDE Plasma Wayland directly via TTY1: first by embedding a `chroot` post-install hook directly inside Agama's `profile.json` , and second via a standalone, idempotent post-reboot bash script executed over SSH .
Actually, it is always safe to allow agama reboot the target box. Then run bypass-sddm-wayland.sh via remote SSH connection in post installation phase (Method 2)
This update of profile.json and script bypass-sddm-wayland.sh are closely linked to the final part of the post Agama Unattended installation openSUSE Tumbleweed via profile.json on remote host (bare metal ) at Lxer.com
### Method 1: Embedding a Chroot Post-Install Hook in `profile.json` (*)
Add a `"scripts"` block to your exported `profile.json` (*):
* Disable `sddm.service` and set the default target to `multi-user.target`.
* Configure a systemd service override for `getty@tty1` to auto-login your target user (`id -nu 1000`).
* Update `~/.bash_profile` to automatically execute `/usr/bin/startplasma-wayland` when logging in on TTY1 (`XDG_VTNR` equals 1).
UPDATE as 11/13/26 Both versions of profile.json were successfully tested on bare metal.
Version 01
agama:~ # cat /tmp/profile.json
{
"product": {
"id": "Tumbleweed"
},
"software": {
"patterns": {
"add": [
"kde",
"selinux",
"kvm_tools"
],
"remove": [
"office"
]
}
},
"storage": {
"boot": {
"configure": true
},
"drives": [
{
"partitions": [
{
"filesystem": {
"mountOptions": [],
"path": "/boot/efi",
"reuseIfPossible": false,
"type": "vfat"
},
"id": "esp",
"size": {
"max": 1073741824,
"min": 1073741824
}
},
{
"filesystem": {
"mountOptions": [],
"path": "/boot",
"reuseIfPossible": false,
"type": "ext4"
},
"size": {
"max": 2684354560,
"min": 2684354560
}
},
{
"filesystem": {
"mountOptions": [],
"path": "/",
"reuseIfPossible": false,
"type": {
"btrfs": {
"snapshots": true
}
}
},
"size": {
"max": 274877906944,
"min": 274877906944
}
},
{
"filesystem": {
"mountOptions": [],
"path": "/opt",
"reuseIfPossible": false,
"type": "xfs"
},
"size": {
"max": 274877906944,
"min": 274877906944
}
},
{
"delete": true,
"search": {
"ifNotFound": "skip"
}
}
],
"search": {
"condition": {
"name": "/dev/sda"
},
"ifNotFound": "error"
}
}
],
"mdRaids": [],
"volumeGroups": []
},
"user": {
"fullName": "boris",
"password": "qwerty1010",
"hashedPassword": false,
"userName": "boris",
"sshPublicKeys": []
},
"root": {
"password": "qwerty1010",
"hashedPassword": false,
"sshPublicKeys": [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINkww6OT9f4dghgBF1JVh3WluNNYpox+Hfv6dS6RCZTK name@example.com"
]
},
"scripts": {
"post": [
{
"name": "setup-tty1-autologin-kde",
"chroot": true,
"content": "#!/usr/bin/bash\n\nsystemctl disable sddm.service --force\nsystemctl set-default multi-user.target\n\nmkdir -p /etc/systemd/system/getty@tty1.service.d\ncat << 'EOF' > /etc/systemd/system/getty@tty1.service.d/override.conf\n[Service]\nExecStart=\nExecStart=-/sbin/agetty --autologin boris --noclear %I $TERM\nEOF\n\nTARGET_HOME=\"/home/boris\"\nmkdir -p \"$TARGET_HOME\"\n\ncat << 'EOF' >> \"$TARGET_HOME/.bash_profile\"\nif [ -f ~/.bashrc ]; then\n . ~/.bashrc\nfi\n\nif [ -z \"${DISPLAY}\" ] && [ \"${XDG_VTNR}\" -eq 1 ]; then\n exec /usr/bin/startplasma-wayland\nfi\nEOF\n\nchown -R boris:users \"$TARGET_HOME\"\nchmod 644 \"$TARGET_HOME/.bash_profile\"\n"
}
]
}
}
agama:~ # mount /dev/sda3 /mnt
agama:~ # # Check the systemd override
agama:~ # cat /mnt/etc/systemd/system/getty@tty1.service.d/override.conf
[Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin boris --noclear %I $TERM
agama:~ #
agama:~ # # Check Boris's custom .bash_profile settings
agama:~ # cat /mnt/home/boris/.bash_profile
cat: /mnt/home/boris/.bash_profile: No such file or directory
agama:~ # vi loginSetup
agama:~ # chmod +x loginSetup
agama:~ # ./loginSetup
agama:~ # cat /mnt/home/boris/.bash_profile
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
if [ -z "${DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ]; then
exec /usr/bin/startplasma-wayland
fi
agama:~ # systemctl reboot
Version 2. Requires same hook as Version 1
{
"product": {
"id": "Tumbleweed"
},
"software": {
"patterns": {
"add": [
"kde",
"selinux",
"kvm_tools"
],
"remove": [
"office"
]
}
},
"storage": {
"boot": {
"configure": true
},
"drives": [
{
"partitions": [
{
"filesystem": {
"mountOptions": [],
"path": "/boot/efi",
"reuseIfPossible": false,
"type": "vfat"
},
"id": "esp",
"size": {
"max": 1073741824,
"min": 1073741824
}
},
{
"filesystem": {
"mountOptions": [],
"path": "/boot",
"reuseIfPossible": false,
"type": "ext4"
},
"size": {
"max": 2684354560,
"min": 2684354560
}
},
{
"filesystem": {
"mountOptions": [],
"path": "/",
"reuseIfPossible": false,
"type": {
"btrfs": {
"snapshots": true
}
}
},
"size": {
"max": 274877906944,
"min": 274877906944
}
},
{
"filesystem": {
"mountOptions": [],
"path": "/opt",
"reuseIfPossible": false,
"type": "xfs"
},
"size": {
"max": 274877906944,
"min": 274877906944
}
},
{
"delete": true,
"search": {
"ifNotFound": "skip"
}
}
],
"search": {
"condition": {
"name": "/dev/sda"
},
"ifNotFound": "error"
}
}
],
"mdRaids": [],
"volumeGroups": []
},
"user": {
"fullName": "boris",
"password": "qwerty1010",
"hashedPassword": false,
"userName": "boris",
"sshPublicKeys": []
},
"root": {
"password": "qwerty1010",
"hashedPassword": false,
"sshPublicKeys": [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINkww6OT9f4dghgBF1JVh3WluNNYpox+Hfv6dS6RCZTK name@example.com"
]
},
"post": [
{
"name": "setup-tty1-autologin-kde",
"chroot": false,
"content": "#!/usr/bin/bash\n\nTARGET_ROOT=\"/mnt\"\n\n# 1. Modify systemd targets using offline root flag\nsystemctl --root=\"$TARGET_ROOT\" disable sddm.service --force\nsystemctl --root=\"$TARGET_ROOT\" set-default multi-user.target\n\n# 2. Deploy Getty TTY1 Autologin Override configuration\nmkdir -p \"$TARGET_ROOT/etc/systemd/system/getty@tty1.service.d\"\ncat << 'EOF' > \"$TARGET_ROOT/etc/systemd/system/getty@tty1.service.d/override.conf\"\n[Service]\nExecStart=\nExecStart=-/sbin/agetty --autologin boris --noclear %I $TERM\nEOF\n\n# 3. Explicitly force creation of the user home directory path\nTARGET_HOME=\"$TARGET_ROOT/home/boris\"\nmkdir -p \"$TARGET_HOME\"\n\n# 4. Safely construct the .bash_profile inside the generated structure\ncat << 'EOF' > \"$TARGET_HOME/.bash_profile\"\nif [ -f ~/.bashrc ]; then\n . ~/.bashrc\nfi\n\nif [ -z \"${DISPLAY}\" ] && [ \"${XDG_VTNR}\" -eq 1 ]; then\n exec /usr/bin/startplasma-wayland\nfi\nEOF\n\n# 5. Enforce precise directory and file ownership for UID/GID 1000\nchown -R 1000:1000 \"$TARGET_HOME\"\nchmod 644 \"$TARGET_HOME/.bash_profile\"\n"
}
]
}
}
END UPDATE
### Method 2: Standalone Post-Reboot Bash Script (`bypass-sddm-wayland.sh`)
If using a standard `profile.json` without embedded hooks, execute the standalone script over SSH as `root` after rebooting (*) to apply the same `sddm` disablement, `getty@tty1` auto-login override, and `.bash_profile` Plasma Wayland startup sequence for the target user.
#!/bin/bash
#
#==========================================================
# openSUSE Tumbleweed Post-Install SDDM Bypass & Auto-Login to Plasma Wayland
# Purpose: Bypasses broken SDDM HDMI login prompts by enabling automatic TTY1
# console login and launching KDE Plasma Wayland directly.
# Usage: Run as root via SSH after first reboot:
# sudo ./bypass-sddm-wayland.sh [username]
#=========================================================
set -euo pipefail
# 1. Verify root privileges
if [[ "${EUID}" -ne 0 ]]; then
echo "ERROR: This script must be run as root." >&2
exit 1
fi
# 2. Resolve target desktop user (defaults to passed argument or UID 1000)
TARGET_USER="${1:-$(id -nu 1000 2>/dev/null || true)}"
if [[ -z "${TARGET_USER}" ]] || ! id "${TARGET_USER}" &>/dev/null; then
echo "ERROR: Valid non-root user not found. Pass username explicitly: $0 <username>" >&2
exit 1
fi
USER_HOME=$(getent passwd "${TARGET_USER}" | cut -d: -f6)
USER_GROUP=$(id -gn "${TARGET_USER}")
echo "Configuring TTY1 autologin and Plasma Wayland startup for user: ${TARGET_USER}"
# 3. Disable SDDM display manager and switch default boot target to multi-user CLI
echo "Disabling SDDM and setting default target to multi-user.target..."
systemctl disable sddm.service --force
systemctl set-default multi-user.target
# 4. Configure systemd getty@tty1 drop-in override for automatic console login
echo "Creating systemd override for getty@tty1.service..."
OVERRIDE_DIR="/etc/systemd/system/getty@tty1.service.d"
mkdir -p "${OVERRIDE_DIR}"
cat << EOF > "${OVERRIDE_DIR}/override.conf"
[Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin ${TARGET_USER} --noclear %I \$TERM
EOF
# 5. Configure user's ~/.bash_profile to source ~/.bashrc and start Plasma Wayland on TTY1
echo " Updating ${USER_HOME}/.bash_profile..."
BASH_PROFILE="${USER_HOME}/.bash_profile"
# Create .bash_profile with standard .bashrc sourcing if it does not exist yet
if [[ ! -f "${BASH_PROFILE}" ]]; then
cat << 'EOF' > "${BASH_PROFILE}"
# Source the user's primary bash configuration if it exists
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
EOF
fi
# Append startplasma-wayland block only if not already present (idempotent)
if ! grep -q "startplasma-wayland" "${BASH_PROFILE}"; then
cat << 'EOF' >> "${BASH_PROFILE}"
# Automatically launch KDE Plasma Wayland if logging in on TTY1
if [ -z "${DISPLAY}" ] && [ "${XDG_VTNR:-0}" -eq 1 ]; then
exec /usr/bin/startplasma-wayland
fi
EOF
fi
# 6. Restore proper file ownership and reload systemd daemon
echo "Setting permissions and reloading systemd..."
chown "${TARGET_USER}:${USER_GROUP}" "${BASH_PROFILE}"
systemctl daemon-reload
echo "========================================================="
echo "Done! Reboot the system ('systemctl reboot') to boot straight into Plasma."
echo "========================================================="
P.S. Standard unattended Tumbleweed deployment via python Web server per my experience would work fine if remote Web source was setup under openSUSE Tumbleweed ( python v.3.13) and would fail if python Web Server was setup on F45 Server (python v3.15)
REFERENCES
(*) Proposed by Google AI

No comments:
Post a Comment