====== openSUSE basic usage ======
===== Installation process tl;dr =====
Install options to deblote!! It is also worth concidering getting rid of Discover altogether and favor Myrlyn and Bazaar.
- Install system with EN (UK)
- In the installer\*, on the final screen before installation starts, change security to AppArmor
- Click on “Software”, which will bring up a package selection screen
- Untick “KDE Applications” pattern (assuming you chose the KDE desktop when the installer asked previously, but it should be the same logic if you chose GNOME or Xfce)
- Re-tick “KDE Base” pattern (this gets unselected in the step above)
- Then click on “Details” and install a few more packages, I would suggest “spectacle” for the KDE screenshot program, “konsole” for the KDE terminal (otherwise you just get xterm) and "discover". Read more below.
- Install
- Remove zypper hook from Discover
- Move Flatpaks to user space
- Add swap
===== Flatpaks =====
Flatpaks are installed in root.
To move to user space:
- sudo flatpak list
- Make a note of apps.
- sudo flatpak remote-delete flathub
- flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
- Reinstall apps. flatpak install ...
Not needed, will be pulled in when needed: `flatpak install org.freedesktop.Platform`
Or just accept that they are in root. Bazaar forces it. **Discover however, does not!!**
===== Discover =====
**Always update with commandline!!!!**
sudo zypper dup
To that end, it's advantageous to remove zypper hook into Discover. Native packages should **not** be updated with it and notifications become useless:
sudo zypper remove -u PackageKit-backend-zypp && sudo zypper addlock PackageKit-backend-zypp
Possibly this is needed aswell:
sudo zypper addlock discover6-backend-packagekit
===== Regarding bloat =====
Even if installing debloated, patterns can force back installs later on. Locks are needed.
sudo zypper addlock MozillaFirefox
===== Decoration =====
Ned Aurorae by jomada.
or
sudo zypper in oxygen6
===== Steam permissions =====
==== Context menu ====
Install to fix context menu of Steam in the tray:
sudo zypper in libdbusmenu-qt5-2-32bit
==== AppArmor ====
Fuck SELinux and install AppArmor instead.
==== SELinux ====
[[https://en.opensuse.org/Portal:SELinux/Common_issues|Issue with exec permissions]]
sudo zypper in selinux-policy-targeted-gaming
To be able to start games?
However that one is already installed.
So:
* temp fix: sudo setsebool selinuxuser_execmod 1
* perm fix: sudo setsebool -P selinuxuser_execmod 1
However it only seem to be semi temporary.
https://en.opensuse.org/Portal:MicroOS/SELinux
Permanently disable it in Grub
===== Swap =====
The default 2 GB can easily be filled, causing freezes with 16 GB RAM. Add more swap and use zswap!
==== Add/change swap (btrfs) ====
sudo btrfs subvolume create /swap
sudo btrfs filesystem mkswapfile --size 8G /swap/swapfile
sudo swapon /swap/swapfile
Make permanent by adding a row in `/etc/fstab`
/swap/swapfile none swap defaults 0 0
Change the swap file size:
sudo swapoff /swap/swapfile
sudo rm /swap/swapfile
sudo btrfs filesystem mkswapfile --size 16G /swap/swapfile
sudo swapon /swap/swapfile
Swapfile will be added to the total swap (including partitions) seamlessly by btrfs.
==== zswap ====
Compresses before storing in RAM. When RAM is full, decompresses and store on disc. **This is recommended.**
Add to bootloader parameters using YaST:
zswap.enabled=1
More detailed but mostly unecessary:
zswap.enabled=1 zswap.compressor=lzo zswap.max_pool_percent=25
* [[https://linuxblog.io/zswap-better-than-zram/|Linux Blod: zswap better than zram]]
==== zram ====
Do not mix with zswap!
zram is an older way of using compressed RAM as swap, not recommended anymore.
sudo zypper in systemd-zram-service
systemctl enable --now zramswap.service
===== Upgrade NVidia drivers =====
**Note:** Make sure there's a password for root!! Mokutils (for NVidia w/ secureboot) asks for root password!!
* [[https://forums.opensuse.org/t/migrating-from-nvidia-g06-580-g07-595-on-tumbleweed/192805|Upgrade from 580 to 595]]
* [[https://en.opensuse.org/SDB:NVIDIA_drivers|openSUSE documentation on NVidia drivers]]
**Note:** Use Myrlyn! 580-packages needs to be removed one by one since it was not installed from the start using meta package. Install 595 meta package. From now on it will also be easier to switch.
https://sndirsch.github.io/nvidia/2025/07/16/nvidia-drivers.html
===== nvidia-smi =====
For some reason, some games doesn't detect NVidia card unless nvidia-smi is run in the terminal.
Best work around is to create a call of `nvidia-smi` as an autostart .desktop file.
~/.config/autostart/wake_nvidia.desktop
[Desktop Entry]
Comment=Runs nvidia-smi
Exec=/bin/sh -c nvidia-smi '>' /dev/null '2>&1' '&'
Hidden=false
Name=nvidia-smi
NoDisplay=false
StartupNotify=true
Terminal=false
Type=Application
===== Migrate rolling release plan (TW/Slowroll) =====
I have had bad luck with this. Would recommend reinstalling altogether.
https://en.opensuse.org/Portal:Slowroll
sudo zypper in opensuse-migration-tool
sudo opensuse-migration-tool --dry-run
sudo opensuse-migration-tool
sudo reboot
===== Bluetooth =====
==== On log in ====
Make a .desktop file in the ~/.config/autostart directory with the command:
/bin/sh -c 'bluetoothctl connect E8:07:BF:3C:06:F0'
==== On wake up from sleep ====
Having specifik devices connect on bluetooth when logging in or waking from sleep requires a systemd service.
Make a script with contents:
sudo nano /usr/local/bin/bluetooth-reconnect
#!/bin/sh
LOCK_FILE="/tmp/bluetooth-wakeup.lock"
# LOG_FILE="/var/log/bluetooth-wakeup.log"
# Exit if another instance is running
#if [ -f "$LOCK_FILE" ]; then
# echo "Script already running, exiting." >> "$LOG_FILE"
# exit 0
#fi
# Create lock file
# echo $$ > "$LOCK_FILE"
# trap 'rm -f "$LOCK_FILE"' EXIT
# Log the start of the script
# echo "Bluetooth wakeup script started at $(date)" >> "$LOG_FILE"
# Wait for the Bluetooth adapter to initialize (max 10 seconds)
MAX_RETRIES=10
RETRY_DELAY=1
for i in $(seq 1 $MAX_RETRIES); do
if bluetoothctl show | grep -q "Powered: yes"; then
echo "Bluetooth adapter is powered on, attempting to connect..." >> "$LOG_FILE"
bluetoothctl connect E8:07:BF:3C:06:F0
if [ $? -eq 0 ]; then
# echo "Successfully connected to Bluetooth device" >> "$LOG_FILE"
exit 0
else
# echo "Failed to connect to Bluetooth device (attempt $i)" >> "$LOG_FILE"
sleep $RETRY_DELAY
fi
else
# echo "Bluetooth adapter not ready, retrying in $RETRY_DELAY seconds... (attempt $i/$MAX_RETRIES)" >> "$LOG_FILE"
sleep $RETRY_DELAY
fi
done
Then make a system ini file:
sudo nano /etc/systemd/system/bluetooth-wakeup.service
[Unit]
Description=Reconnect Bluetooth after wakeup from sleep
After=suspend.target hibernate.target hybrid-sleep.target
[Service]
Type=oneshot
RemainAfterExit=no
ExecStart=/usr/local/bin/bluetooth-reconnect
[Install]
WantedBy=suspend.target hibernate.target hybrid-sleep.target
Note that adding **WantedBy=multi-user.target** is for logging in, and could potentially make autostart not needed. Untested, probably affected by **After** so more work needed.