Ubuntu 19.10 Lenovo amd a9 s145-15ast

Screen flicker:

sudoedit /etc/default/grub

Find the line beginning GRUB_CMDLINE_LINUX_DEFAULT and add the text amdgpu.dc=0 between the double quotes (""). Leave any other parameters as they are. For example, you may end up with a line like this:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash amdgpu.dc=0"

Save the file and exit, and then run

sudo update-grub

to write the configuration, and reboot.

ubuntu 19 speed up local samba access

sudo nano /etc/nsswitch.conf

hosts:          files wins dns mdns4_minimal [NOTFOUND=return]

sudo nano /etc/avahi/avahi-daemon.conf


disable ipv6 in wifi/eth0 interfaces

sudo ufw disable
sudo sysctl vm.swappiness=10

sudo su
echo "#disable ipv6" >> /etc/sysctl.conf
echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.conf
echo "net.ipv6.conf.default.disable_ipv6 = 1" >> /etc/sysctl.conf
echo "net.ipv6.conf.lo.disable_ipv6 = 1" >> /etc/sysctl.conf

sudo nano /etc/samba/smb.conf

netbios name = linuxlap1
name resolve order = lmhosts wins bcast host

backup /etc with tar

The following is an exemplary command of how to archive your system.

tar -cvpzf backup.tar.gz --exclude=/backup.tar.gz --one-file-system /etc

back.sh (backup with timestamp) – add to cron (sh /back.sh)

DATE=$(date +%Y-%m-%d-%H%M%S)
tar -cvzpf $BACKUP_DIR/backup-$DATE.tar.gz $SOURCE

headless ubuntu fsck waits for Y key during bootup

I have a headless Ubuntu 12.04 server in a datacenter 1500 miles away. Twice now on reboot the system decided it had to fsck. Unfortunately Ubuntu ran fsck in interactive mode, so I had to ask someone at my datacenter to go over, plug in a console, and press the Y key. How do I set it up so that fsck runs in non-interactive mode at boot time with the -y or -p (aka -a) flag?

For Ubuntu 15,16,17+ the FSCKFIX value setting is located in /lib/init/vars.sh

sudo nano /lib/init/vars.sh

change FSCKFIX=no to FSCKFIX=yes