User Tools

Site Tools


opensuse

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
opensuse [2026-07-26 12:50] – [Upgrade NVidia drivers] mathogopensuse [2026-07-26 13:15] (current) – [On wake up from sleep] mathog
Line 14: Line 14:
   - Remove zypper hook from Discover   - Remove zypper hook from Discover
   - Move Flatpaks to user space   - Move Flatpaks to user space
 +  - Add swap
  
 ===== Flatpaks ===== ===== Flatpaks =====
Line 22: Line 23:
 To move to user space: To move to user space:
  
-  - `sudo flatpak list` and make a note of the apps. +  - <code>sudo flatpak list</code> 
-  - `sudo flatpak remote-delete flathub` +  - Make a note of apps. 
-  - `flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo` +  - <code>sudo flatpak remote-delete flathub</code> 
-  - Reinstall apps. `flatpak install ...` +  - <code>flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo</code> 
-  Not needed, will be pulled in when needed: `flatpak install org.freedesktop.Platform`+  - Reinstall apps. <code>flatpak install ...</code> 
 +  
 +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!!** Or just accept that they are in root. Bazaar forces it. **Discover however, does not!!**
Line 32: Line 35:
 ===== Discover ===== ===== Discover =====
  
-**Always update with commandline:** `sudo zypper dup`!!!!!+**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: To that end, it's advantageous to remove zypper hook into Discover. Native packages should **not** be updated with it and notifications become useless:
Line 53: Line 57:
 ===== Steam permissions ===== ===== Steam permissions =====
  
-Fuck SELinux and install with AppArmor instead. +==== Context menu ==== 
-Btw: Install to fix context menu <code>libdbusmenu-qt5-2-32bit</code> of Steam in the tray.+Install to fix context menu of Steam in the tray: 
 +<code>sudo zypper in libdbusmenu-qt5-2-32bit</code> 
 + 
 +==== AppArmor ==== 
 +Fuck SELinux and install AppArmor instead.
  
 ==== SELinux ==== ==== SELinux ====
Line 74: Line 82:
  
 ===== Swap ===== ===== Swap =====
-The default 2 GB can easily be filled, causing freezes with 16 GB RAM. Add more swap! +The default 2 GB can easily be filled, causing freezes with 16 GB RAM. Add more swap and use zswap!
- +
-The default 2GB is not enough. Add more swap space for medium to low RAM:+
  
 ==== Add/change swap (btrfs) ==== ==== Add/change swap (btrfs) ====
Line 106: Line 112:
  
 More detailed but mostly unecessary: More detailed but mostly unecessary:
-  zswap.enabled=1 zswap.compressor=lzo zswap.max_pool_percent=25 +<code>zswap.enabled=1 zswap.compressor=lzo zswap.max_pool_percent=25</code> 
-  * [https://linuxblog.io/zswap-better-than-zram/|Linux Blod: zswap better than zram]+  * [[https://linuxblog.io/zswap-better-than-zram/|Linux Blod: zswap better than zram]]
  
 ==== zram ==== ==== zram ====
Line 130: Line 136:
  
 Best work around is to create a call of `nvidia-smi` as an autostart .desktop file. Best work around is to create a call of `nvidia-smi` as an autostart .desktop file.
 +  ~/.config/autostart/wake_nvidia.desktop 
 +<code> 
 +[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 
 +</code>
 ===== Migrate rolling release plan (TW/Slowroll) ===== ===== Migrate rolling release plan (TW/Slowroll) =====
 I have had bad luck with this. Would recommend reinstalling altogether. I have had bad luck with this. Would recommend reinstalling altogether.
Line 139: Line 156:
   sudo opensuse-migration-tool   sudo opensuse-migration-tool
   sudo reboot   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
 +<code bash>
 +#!/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
 +</code>
 +Then make a system ini file:
 +  sudo nano /etc/systemd/system/bluetooth-wakeup.service
 +<code ini>
 +[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
 +</code>
 +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.
 +
 +
opensuse.1785070217.txt · Last modified: by mathog

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki