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:59] – [zswap] 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 34: 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 110: 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 155: 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.1785070751.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