Skip to content

Instantly share code, notes, and snippets.

@vshymanskyy
Last active May 14, 2021 13:50
Show Gist options
  • Save vshymanskyy/82cb6fb1c39890b657f3ae31e3b8295e to your computer and use it in GitHub Desktop.
Save vshymanskyy/82cb6fb1c39890b657f3ae31e3b8295e to your computer and use it in GitHub Desktop.
Ubuntu Kubuntu Linux Setup

Ubuntu setup

  • Install keyboard layout, Alt+Shift
  • KWin shortcuts - remove Ctrl+F3, Ctrl+F4
  • Remove popping on Vol. Up, Vol. Down
  • Dolphin - use common view properties for all folders

/etc/pulse/default.pa: Comment-out load-module module-suspend-on-idle, run systemctl restart --user pulseaudio

sudo apt update
sudo apt dist-upgrade

sudo apt install hardinfo i2c-tools mesa-utils acpi-call
sudo apt install curl wget tree nano mc htop cu
sudo apt install krusader meld yakuake filelight

sudo apt install exfat-fuse exfat-utils

zsh

sudo apt-get install git zsh
curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | bash
sudo chsh -s $(which zsh) $(whoami)

Dev tools

sudo apt install build-essential
sudo apt install clang lldb lld
sudo apt install cmake ninja-build ccache
sudo apt install ckermit git
sudo apt install sqlitebrowser
sudo apt install qemu-kvm qemu-system-arm valgrind

Node.js

sudo apt-get purge nodejs*
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
nvm install v10.1.0
nvm ls

VirtualBox

sudo sh -c 'echo "deb http://download.virtualbox.org/virtualbox/debian $(lsb_release -sc) contrib" >> /etc/apt/sources.list.d/virtualbox.list'

wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -

sudo apt update
sudo apt-get install virtualbox-6.0

sudo usermod -a -G vboxusers $USER

SSD optimization

sudo apt install htop sysstat mc
echo -e "vm.swappiness=0" | sudo tee -a /etc/sysctl.conf
mount

Disable wireless power mgmt (fix inbound ping latency)

/etc/network/interfaces

auto wlan0
iface wlan0 inet dhcp
  wpa-ssid ssid
  wpa-psk pass
  wireless-power off
  post-up (sleep 10 && iwconfig wlan0 power off)

Stress

sudo apt install stress
stress --cpu 5 --timeout 60s
stress --cpu 4 --io 4 --vm 2 --vm-bytes 128M --timeout 30s

Watch thermal status

watch cat /sys/class/thermal/thermal_zone0/temp

Watch CPU freq

sudo apt install cpufrequtils
watch "cpufreq-info | grep 'CPU frequency'"

Power optimization

Install TLP

sudo apt install powertop
sudo powertop --html
grep 'echo ' powertop.html | sed 's/.*\(echo.*\);.*/\1/g'

sudo nano /etc/rc.local

sudo hdparm -I /dev/sda | grep "TRIM supported"
sudo fstrim -v /

Test Keyboard

showkey -a

xinput list
xinput test 15

Wakeup configuration

sudo cat /proc/acpi/wakeup | grep enabled

echo USBE | sudo tee /proc/acpi/wakeup
echo USE2 | sudo tee /proc/acpi/wakeup

USB devices

sudo adduser $USER dialout
...
[TODO]
sudo service udev restart

GPU info

xrandr --listproviders
prime-select query
glxinfo | grep renderer

DRI_PRIME=1 glxinfo | grep "OpenGL renderer"
DRI_PRIME=0 glxinfo | grep "OpenGL renderer"

Network info

https://superuser.com/questions/945517/how-to-determine-what-type-of-wifi-networks-are-supported-by-your-driver-on-linu

iw phy | grep "HT TX/RX"

Kernel cmdline

SUDO_EDITOR=kate sudoedit /etc/default/grub
sudo update-grub
cat /proc/cmdline

Screen Brightness

qdbus org.freedesktop.PowerManagement /org/kde/Solid/PowerManagement/Actions/BrightnessControl brightnessMax
qdbus org.freedesktop.PowerManagement /org/kde/Solid/PowerManagement/Actions/BrightnessControl setBrightnessSilent 300

/etc/udev/rules.d/backlight.rules

ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="acpi_video0", RUN+="/bin/chgrp video /sys/class/backlight/%k/brightness"
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="acpi_video0", RUN+="/bin/chmod g+w /sys/class/backlight/%k/brightness"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment