Menu

linux/

Install nvidia drivers

Verify your GPU:

/sbin/lspci | grep -e VGA

Make sure you:

  • disabled Wayland
  • disabled Secure Boot

Make sure you system is up to date (reboot if something was installed):

sudo dnf update -y

Install nvidia driver:

sudo dnf install akmod-nvidia
sudo dnf install xorg-x11-drv-nvidia-cuda

Wait until kernel module is compiled.

Enable video acceleration and some extras:

sudo dnf install vdpauinfo libva-vdpau-driver libva-utils xorg-x11-drv-nvidia-cuda-libs xorg-x11-drv-nvidia-cuda

Reboot system.

Verify that nouveau driver is disabled:

lsmod |grep nouveau
· 20 Feb 2021

Disable Selinux

Edit this /etc/selinux/config file and follow instructions

· 20 Feb 2021

Disable Wayland and switch to X11

By default fedora uses Wayland. Make sure the following section exists in /etc/gdm/custom.conf:

[daemon]
# Uncomment the line below to force the login screen to use Xorg
WaylandEnable=false
DefaultSession=gnome-xorg.desktop
· 20 Feb 2021

Record all traffic on specific port

Create TCP dump of all traffic on localhost on port 8888

sudo tcpdump -i lo "port 8888" -w dump
· 15 Feb 2021

tar: Archives cheatsheet

Create archive:

tar -czvf compressed_file.tar.gz original_file.sql

Extract files:

tar -xzvf compressed_file.tar.gz
· 13 Feb 2021

Keep running ssh command after disconnecting from the server

nohup database_migration.sh &
  • nohup will take care of running the command and forward command output to nohup.out
  • & will run the command in the background

Use tail -f nohup.out to get the output from the command

· 12 Feb 2021

Configure HP printer in fedora

Default Printer application in GNOME (fedora 33) is not able to successfully configure wireless printer, it needs to be done manually:

sudo dnf install hplip hplip-gui
sudo hp-setup

Select Network/Ethernet/Wireless network and your printer will appear in the list. Follow the instructions and add the printer.

· 29 Jan 2021

List files installed by a package

To list all files installed by dnf package:

rpm -ql dnf
· 29 Jan 2021

top-like application for intel GPU

Top-like application to monitor performance of intel GPU:

sudo dnf install igt-gpu-tools
sudo intel_gpu_top

Playing 4k video sample on youtube (intel i3-8100T):

intel-gpu-top: Intel Coffeelake (Gen9) @ /dev/dri/card0 - 1063/1083 MHz;    1% RC6;  7.35/19.18 W;      467 irqs/s

      IMC reads:     6889 MiB/s
     IMC writes:     3901 MiB/s

          ENGINE      BUSY                                      MI_SEMA MI_WAIT
     Render/3D/0   98.29% |██████████████████████████████████▍|      0%      0%
       Blitter/0    0.00% |                                   |      0%      0%
         Video/0    0.00% |                                   |      0%      0%
  VideoEnhance/0    0.00% |                                   |      0%      0%

Playing the same video in 1080p (intel i3-8100T)::

intel-gpu-top: Intel Coffeelake (Gen9) @ /dev/dri/card0 -  591/ 591 MHz;   30% RC6;  3.06/ 6.47 W;      474 irqs/s

      IMC reads:     4058 MiB/s
     IMC writes:     2654 MiB/s

          ENGINE      BUSY                                      MI_SEMA MI_WAIT
     Render/3D/0   55.64% |███████████████████▍               |      0%      0%
       Blitter/0    0.00% |                                   |      0%      0%
         Video/0    0.00% |                                   |      0%      0%
  VideoEnhance/0    0.00% |                                   |      0%      0%
· 18 Jan 2021

Install multimedia codecs in fedora

If you are experiencing high CPU usage when watching videos on youtube, verify that the following packages are installed (requires RPMFusion repository):

# RPMFuison repositories
sudo dnf install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm

# Codecs
sudo dnf install gstreamer1-plugins-{bad-\*,good-\*,base} gstreamer1-plugin-openh264 gstreamer1-libav --exclude=gstreamer1-plugins-bad-free-devel
sudo dnf install lame\* --exclude=lame-devel
sudo dnf group upgrade --with-optional Multimedia

CPU usage for i3-8100T is down from 80% to 50% with this video sample

· 16 Jan 2021