Skip to content

Instantly share code, notes, and snippets.

@vpiotr
Last active May 6, 2022 23:01
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vpiotr/ce4d636b3f2db1a6912ec4e638856a06 to your computer and use it in GitHub Desktop.
Save vpiotr/ce4d636b3f2db1a6912ec4e638856a06 to your computer and use it in GitHub Desktop.
First things to do after Linux Mint fresh install

Linux - first things to do after install

These commands were tested on Linux Mint 20.03

Use most recent kernel version

From distribution repo - using Update Manager

Select the latest version which works for you: https://www.makeuseof.com/upgrade-kernel-linux-mint/

From cutting edge repo

  1. Add tuxinvider repo: sudo add-apt-repository ppa:tuxinvader/lts-mainline -y

  2. Run package list update: sudo apt update

  3. Use Update Manager to install & use most recent version of kernel (see above).

Power management - for laptop

Switch on/off Wifi power management

  1. Open file:

/etc/NetworkManager/conf.d/default-wifi-powersave-on.conf

  1. Find line:
# Values are 0 (use default), 1 (ignore/don't touch), 2 (disable) or 3 (enable).
wifi.powersave = 2
  1. To switch on power management change this line to:

wifi.powersave = 3

Install lm-sensors

It is required for correct hardware temperature monitoring.

sudo apt install lm-sensors

Install hddtemp

sudo apt install hddtemp

Config sensors

For each question just press Enter.

sudo sensors-detect

At the end it will show you lines it added to config file, verify config file doesn't have double lines after this change.

Monitor sensors

To monitor sensors run:

watch sensors

Install GUI tool for sensor monitoring

sudo apt install psensor

Install TLP for automatic fan control

It will spin your fans accordingly to hardware temperature.

sudo add-apt-repository ppa:linrunner/tlp
sudo apt-get update
sudo apt install tlp tlp-rdw

(if not needed anymore) to uninstall TLP run:

sudo apt-get remove tlp
sudo add-apt-repository --remove ppa:linrunner/tlp

Dual boot & time zone

When you use Windows in parallel with Linux they interfere with each other because of time zone handling differences.

One of solutions is to:

  • keep Windows as-is (e.g. it handles RTC time with local time zone, synchronizes time and handles daylight saving).
  • change Linux configuration to handle RTC time as with local time zone instead of default mode UTC

Verify how Linux is configured

Run:

timedatectl

After fresh install, at the end of output you should see something like this:

RTC in local TZ: no

Configure Linux to use RTC in local TZ

Run:

sudo timedatectl set-local-rtc 1

SSD configuration

Disable last-access-time on your SSD

Linux stores timestamp of last file access every time you touch it, so disabling this feature is recommended for SSDs to prolong their's lifetime.

Open:

sudo nano /etc/fstab

Find line responsible for mapping your SSD:

UUID=f3381111-fb76-459a-9837-aabbccdd1234 /               ext4    errors=remount-ro 0       1

Add "noatime" before "errors":

UUID=f3381111-fb76-459a-9837-aabbccdd1234 /               ext4    noatime,errors=remount-ro 0       1

Check & configure TRIM

Check TRIM process has been run recently:

systemctl status fstrim

If not - activate timer for it's scheduled execution:

sudo systemctl enable fstrim.timer && sudo systemctl start fstrim.timer

Problems & solutions

System hangs when going to sleep mode

  1. Change kernel ACPI configuration:
  • sudo nano /etc/default/grub
  • find line: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
  • change to:
GRUB_CMDLINE_LINUX_DEFAULT="nouveau.blacklist=1 acpi_rev_override=1 acpi_osi=Linux nouveau.modeset=0 pcie_aspm=force drm.vblankoffdelay=1 scsi_mod.use_blk_mq=1 nouveau.runpm=0 mem_sleep_default=deep"

where Linux can be anything from list:

After this run: sudo update-grub

  1. If it doesn't help, consider also switching to "dGPU-only mode" (see below).

  2. Switch off hardware acceleration in Firefox (or Chrome) if hangs appear during web browsing sessions.

See: https://support.mozilla.org/en-US/kb/hardware-acceleration-and-windowblinds-crash

External monitor is not recognized

If you have dual-GPU setup (iGPU + dGPU) then monitor can be ignored when working on iGPU (Intel). In order to avoid that switch to on-demand mode or dGPU only.

For nVidia:

  • toolbar, nvidia icon, right-click
  • "Switch-to NVIDIA On-Demand" for on-demand mode
  • "Switch-to NVIDIA (Performance mode)" for dGPU only mode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment