Skip to content

Instantly share code, notes, and snippets.

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 nitingupta910/4c155f899fe3ba4ab5948df1697446e2 to your computer and use it in GitHub Desktop.
Save nitingupta910/4c155f899fe3ba4ab5948df1697446e2 to your computer and use it in GitHub Desktop.

my laptop:

I'm writing this here because a view things in here are spesific to this model laptop.
Dell XPS 15 9560 (4k) touch screen

Some notes:

Most things after setup are not specific for this laptop
# = run as root
$ = run as normal user (you)

Install and On first boot

When grub shows up press e
Add the following to the boot parameter nouveau.modeset=0

To start the installer

Yes i know this is kinda stupid but for some reason sometimes the installer wont start
Do not touch the touchscreen after bootup!
Do not close the install screen!
Go to the upper left hot coner and click the install fedora.

When installed and first booted up

NOTE: Make sure to add the boot parameter to the first bootup

$ sudo su
# passwd
# dnf update
# dnf install nano -y
# nano /etc/default/grub

Add the following ot the GRUB_CMDLINE_LINUX parameter nouveau.modeset=0

# grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
# shutdown 0 -rf

If the laptop makes it to the desktop it works

Install latest kernel

This is more of a personl preferment because fedora uses usually an onder kernel.

sudo dnf install kernel --enablerepo=updates-testing --best --allowerasing

Insatll nvidia drivers (only this laptop)

$ su
# dnf install fedora-workstation-repositories -y
# dnf config-manager --set-enabled rpmfusion-nonfree-nvidia-driver
# dnf config-manager --add-repo=https://negativo17.org/repos/fedora-nvidia.repo

Reboot..
Open the software app. Click Add-ons > Hardware Drivers > NVIDIA Linux Graphics Driver > Install. (in the software center you will notice that there are 2 nvidia linux graphics driver chose the one where the source is NOT from rpmfusion.org this one is less bugy, but if it doesn't work out for you chose the other one)

Install Chrome, vlc, ffmpeg

$ su
# dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
# dnf install fedora-workstation-repositories
# dnf config-manager --set-enabled google-chrome
# dnf install google-chrome-beta ffmpeg vlc -y

Themes, icons and gnome extensions

i have quite a lot of icons and themes i like

$ cd ~/Downloads
$ git clone https://github.com/vinceliuice/vimix-gtk-themes && cd vimix-gtk-themes
$ ./Install
$ cd ..
$ rm -rf vimix-gtk-themes
$ git clone https://github.com/vinceliuice/Sierra-gtk-theme && cd Sierra-gtk-theme
$ ./install.sh
$ cd ..
$ rm -rf Sierra-gtk-theme
$ su
# dnf copr enable snwh/paper
# dnf makecache
# dnf install gtk-murrine-engine gtk2-engines gnome-tweak-tool chrome-gnome-shell arc-theme paper-icon-theme

Packages i usually install: user themes, dash to dock, block caribou, topicons Plus, caffeine Intel cpu power manager
Open tweak tools to set a theme to youre wish

Make the laptop more power efficent (might result in boot errors with other laptops)

While doing these steps UNPLUG the laptop from power

$ su 
# dnf install powertop tlp tuned-utils thermald -y
# systemctl start powertop
# systemctl enable powertop
# powertop --auto-tune
# nano /etc/default/tlp

In this file uncomment the CPU_SCALING_MAX_FREQ_.... lines and lower the value to make the cpu less power hungry

# systemctl enable tlp
# shutdown 0 -rf 

Install i8kutils a better fan curf (only dell)

$ su
# dnf install acpi
# dnf config-manager --add-repo https://copr.fedorainfracloud.org/coprs/uriesk/i8kutils/repo/fedora-28/uriesk-i8kutils-fedora-28.repo
# dnf install i8kutils
# echo "i8k" >> /etc/modules
# echo "options i8k force=1" > /etc/modprobe.d/i8k.conf
# curl https://gist.githubusercontent.com/mjarkk/eadcd2e793bb5baa0c77f7a539ee7a23/raw/c01dda8f512a42037c446067eab33b4a62ebc0c6/Z-i8kmon.conf > /etc/i8kmon.conf
# curl https://gist.githubusercontent.com/mjarkk/eadcd2e793bb5baa0c77f7a539ee7a23/raw/c01dda8f512a42037c446067eab33b4a62ebc0c6/z-i8kmod.service > /usr/lib/systemd/system/i8kmod.service
# systemctl enable i8kmod

restart the laptop

Install watchdog to fix a job is running for...

I noticed a wired bug in fedora where when i press shutdown it waits for 150s because of a job is running for ...

$ su
# dnf install watchdog
# systemctl start watchdog
# systemctl enable watchdog

The programs i need for programming

Git

$ git config --global user.name "mjarkk"
$ git config --global user.email "mkopenga@gmail.com"
$ git config --global credential.helper cache
$ git config --global credential.helper 'cache --timeout=43200'

VScode

$ su
# rpm --import https://packages.microsoft.com/keys/microsoft.asc
# sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo'
# dnf update
# dnf install code -y
# exit
$ echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
$ git config --global core.editor "code --wait"

my vscode settings

Nodejs

$ su
# curl -sL https://rpm.nodesource.com/setup_12.x | bash -
# dnf install nodejs
# exit
$ mkdir ~/.npm-packages
$ prefix = ${HOME}/.npm-packages
$ npm config set prefix '~/.npm-packages'
$ echo 'PATH=$PATH:$HOME/.npm-packages/bin' >> $HOME/.bashrc
$ source ~/.bashrc

Golang

DO NOT RUN THIS IN A ROOT SHELL ('#')

$ sudo dnf install golang
$ mkdir ~/go
$ echo 'export GOPATH=$HOME/go' >> ~/.bashrc && echo 'PATH=$PATH:$GOPATH/bin' >> ~/.bashrc
$ source ~/.bashrc

Php (laravel)

As webserver i use a docker compose config: https://github.com/mjarkk/docker-lemp-config
For laravel devlopment i install:

$ sudo dnf install php php-common php-cli php-json php-pdo php-mbstring php-zip php-xml php-pdo_mysql php-pecl-redis

Install composer via: https://getcomposer.org/download/

$ composer global require "laravel/installer"
$ echo 'PATH=$PATH:$HOME/.config/composer/vendor/bin' >> $HOME/.bashrc

Other programs

pantheon files (the elementary file manager)

$ sudo dnf install pantheon-files

Discord

  1. Download and extract the zip.
  2. Open a terminal and cd to the discord-master directory.
  3. Run one of the following depending on the version you want to create a package for:
  • Discord Stable: ./create-package.sh stable
  • Discord PTB: ./create-package.sh ptb
  • Discord Canary: ./create-package.sh canary

Imgur screenshot

A easy way to upload pictures to imgur and share them with friends

$ su
# dnf copr enable valdikss/imgur-screenshot
# dnf install imgur-screenshot

Relevant dell xps laptop links and thanks to

[Unit]
Description=i8kmod auto fan
[Service]
Type=oneshot
ExecStart=/usr/bin/i8kmon
[Install]
WantedBy=multi-user.target
# Sample i8kmon configuration file (/etc/i8kmon.conf, ~/.i8kmon).
set config(i8kfan) /usr/bin/i8kfan
set config(verbose) 1
# set config(auto) 1
set config(timeout) 2
set config(t_high) 80
set config(0) {{0 0} -1 55 -1 60}
set config(1) {{1 1} 50 65 55 70}
set config(2) {{2 2} 60 75 65 80}
set config(3) {{2 2} 70 128 75 128}
set status(leftspeed) "1000 1400 1700 3000"
set status(rightspeed) "1000 1400 1700 3000"
# end of file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment