Ubuntu Tips


Ubuntu Tips

  • Disable audio power save mode to avoid static noise when no player active
  •     # Change live setting
        echo "0" | sudo tee /sys/module/snd_hda_intel/parameters/power_save
    
        # Change permanent setting
        echo "options snd_hda_intel power_save=0" | sudo tee -a /etc/modprobe.d/audio_disable_powersave.conf
      


Ubuntu Auto Upgrade


Configure Ubuntu Auto Upgrade in terminal

  • Install dependencies
  •         sudo apt install unattended-upgrades
          
  • Edit /etc/apt/apt.conf.d/50unattended-upgrades and change the following:
  •         # Enable this setting in Unattended-Upgrade::Allowed-Origins
            "${distro_id}:${distro_codename}-updates";
          
  • To keep /boot folder small
  •         Unattended-Upgrade::Remove-Unused-Kernel-Packages "true";
            Unattended-Upgrade::Remove-Unused-Dependencies "true";
          
  • Optional:
  •         # Replace email address with administrator address and insure that email can be sent from cli
            Unattended-Upgrade::Mail "you@some.site";
    
            # Enable auto reboot
            Unattended-Upgrade::Automatic-Reboot "true";
            Unattended-Upgrade::Automatic-Reboot-Time "02:38";
            # For non-critical servers, add this:
            Unattended-Upgrade::Automatic-Reboot-WithUsers "true";
          
  • Edit /etc/apt/apt.conf.d/20auto-upgrades and change the following:
  •         # Some of these settings may already be active
            APT::Periodic::Update-Package-Lists "1";
            APT::Periodic::Download-Upgradeable-Packages "1";
            APT::Periodic::AutocleanInterval "7";
            APT::Periodic::Unattended-Upgrade "1";
          
  • Check if it works:
  •         sudo unattended-upgrades --dry-run --debug
          

References