User Tools

Site Tools


distros:fedora_workstation_gnome

Table of Contents

Information

  • Fedora Workstation 1)
  • 29

Download

Workstation

Updated Live Images

Installation Notes

  • EFI/fedora/shimx64.efi 2)
  • Remove /home, set /boot and / to use XFS, expand /

HOSTS

sudo wget -O '/etc/hosts' 'https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts' && sync
cat '/etc/hosts' | grep 'Date:'
sudo -e '/etc/hosts'

RoE LAN

  • This adds RoE sites to HOSTS file and allows resources to be grabbed over LAN
  • Useful for doing large configurations with sites on local LAN
echo -e '\n# RoE LAN\n192.168.1.153 realmofespionage.xyz\n192.168.1.153 social.realmofespionage.xyz\n192.168.1.153 blog.realmofespionage.xyz\n192.168.1.153 media.realmofespionage.xyz\n192.168.1.153 wiki.realmofespionage.xyz\n192.168.1.155 wow.realmofespionage.xyz' | sudo tee --append '/etc/hosts' > '/dev/null' && cat '/etc/hosts' | grep realmofespionage.xyz

DNF

  • Disables Delta RPMs with deltarpm=false
  • Enables the fastestmirror plugin with fastestmirror=true
cat '/etc/dnf/dnf.conf' | grep -e 'deltarpm=false' -e 'fastestmirror=true' || echo -e "deltarpm=false\nfastestmirror=true" | sudo tee --append '/etc/dnf/dnf.conf' > '/dev/null' && cat '/etc/dnf/dnf.conf' | grep -e 'deltarpm=false' -e 'fastestmirror=true'

Repositories

su

  • Useful for fresh installations where repo(s) can be added, and then package updates can be ran afterwards unattended without having sudo timeout and re-prompt for the password
sudo su

RawhideKernelNodebug

sudo dnf config-manager --add-repo='http://dl.fedoraproject.org/pub/alt/rawhide-kernel-nodebug/fedora-rawhide-kernel-nodebug.repo'

RPM Fusion

free

sudo rpm --import 'https://rpmfusion.org/keys?action=AttachFile&do=get&target=RPM-GPG-KEY-rpmfusion-free-fedora-29' && sync && sudo dnf install 'https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-29.noarch.rpm' -y && sync

nonfree

sudo rpm --import 'https://rpmfusion.org/keys?action=AttachFile&do=get&target=RPM-GPG-KEY-rpmfusion-nonfree-fedora-29' && sync && sudo dnf install 'https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-29.noarch.rpm' -y && sync

Software

Update

System

sudo dnf clean 'all' && sudo dnf distro-sync -y && sudo dnf autoremove -y && sync

Firmware

sudo fwupdmgr refresh && sudo fwupdmgr update --verbose

Flatpaks

flatpak update && sudo flatpak update

GNU nano

  • Installs nano
  • Sets VISUAL and EDITOR to nano via environment variable
  • Sets nowrap for current user
sudo dnf install 'nano' -y && export 'VISUAL=nano' && export 'EDITOR=nano' && echo -e 'export VISUAL=nano\nexport EDITOR=nano' | sudo tee '/etc/profile.d/editor-nano.sh' > '/dev/null' && cat '/etc/profile.d/editor-nano.sh' && mkdir -p ~/'.config/nano' && echo 'set nowrap' | tee ~/'.config/nano/nanorc' > '/dev/null' && cat ~/'.config/nano/nanorc'

RPM Fusion Initial

sudo dnf groupupdate core multimedia sound-and-video

General

  • kernel-tools provides x86_energy_perf_policy
  • p7zip-plugins provides 7z which can be used for extracting ISOs and other formats
sudo dnf install filezilla keepassxc p7zip p7zip-plugins unar aria2 gimp transmission-gtk hdparm nano htop wget irqbalance kernel-tools hexchat flashrom

RPM Fusion

free

  • ffmpeg is for youtube-dl to correct DASH containers
  • jack-audio-connection-kit is needed to provide libjack.so.0 for mpv
youtube-dl ffmpeg mpv jack-audio-connection-kit

nonfree

steam

VA-API

gstreamer1-vaapi
libva-intel-driver

Keybase

'https://prerelease.keybase.io/keybase_amd64.rpm'

Wine

  • mesa-libd3d requires a Gallium Nine-patched version of Wine and Gallium-based open-source graphics drivers 3)
wine winetricks
mesa-libd3d.x86_64 mesa-libd3d.i686

Tor Browser

torbrowser-launcher

Google Chrome

sudo rpm --import 'https://dl-ssl.google.com/linux/linux_signing_key.pub' && sudo dnf install 'https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm'

Settings

Keyboard Shortcuts

gnome-terminal
bash -c "secret-tool lookup 'keepass' 'default' | keepassxc --pw-stdin ~/'Documents/keepass.kdbx'"
gnome-terminal --command "sudo sh -c 'dnf clean 'all' && dnf distro-sync -y && dnf autoremove -y && sync && fwupdmgr refresh && fwupdmgr update --verbose && flatpak update && rm -Rfv '/usr/lib64/firefox/browser/features' '/home/'*'/.mozilla/firefox/'*'/features' && wget -O '/etc/hosts' 'https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts' && sync && fstrim --all --verbose && sync && read -n '1' -s -r -p 'Done' && sleep '2''"

Keys

  • Listed respectively to above
  • Ctrl + Alt + T
  • Ctrl + Alt + Z
  • Pause or F7

Printer

  • Output Mode: Black Only Grayscale
  • Print Quality: High-Resolution Photo
  • Administration → Set As Server Default
socket://192.168.1.164:9100

gedit

  • 4 Tab width
  • Insert Spaces for Tab mode

Network

OpenNIC Anycast DNS

185.121.177.177,169.239.202.202
2a05:dfc7:5::53,2a05:dfc7:5::5353

VPN.AC

  • See VPN.AC
  • :!: If using this VPN, disable IPv6 from NetworkManager

Nautilus

  • Sort folders before files
  • 4096 MB File Previews

Rhythmbox

Terminal

  • 10-notch Transparency

GRUB

Legacy

  • Use this with SeaBIOS payload with Coreboot
sudo -e '/etc/default/grub' && sudo grub2-mkconfig -o '/boot/grub2/grub.cfg'

UEFI

sudo -e '/etc/default/grub' && sudo grub2-mkconfig -o '/boot/efi/EFI/fedora/grub.cfg'

Old Parameters

GRUB

GRUB_TIMEOUT=1

Corsair USB Quirks

blk_mq

scsi_mod.use_blk_mq='y' dm_mod.use_blk_mq='y'

Reboot

  • efi is for UEFI systems
  • pci is for Legacy systems and Coreboot with SeaBIOS payload
  • There are other values possible should either of those not work
reboot='pci'
reboot='efi'

PCIe ASPM

pcie_aspm='force'

dyntick-idle Disable

nohz='on'

intel_iommu

  • Specific to Spinesnap
intel_iommu='on'

i915

  • Applicable on a Lenovo T500 4)
i915.enable_fbc='1' i915.fastboot='1'

amdgpu

amdgpu.deep_color='1'

Overdrive

  • Allows use of Overdrive options for overclocking
amdgpu.ppfeaturemask='0xffffffff'
cat '/sys/module/amdgpu/parameters/ppfeaturemask' | grep '4294967295'

Blacklist Watchdogs

  • iTCO_wdt controls watchdog on some Intel platforms
  • sp5100_tco controls watchdog on some AMD platforms
  • nowatchdog disables both soft and hard generic watchdogs
  • I don't use watchdog features and apparently this reduces power usage slightly
modprobe.blacklist='iTCO_wdt,sp5100_tco' nowatchdog

Backlight

systemd.restore_state='0'

DRM Debug

  • :!: This may make lower-end machines become very unresponsive; be prepared to have some safe way of rebooting
drm.debug='0xe'

GNOME

Disable Wayland

cat '/etc/gdm/custom.conf' | grep '#WaylandEnable' > '/dev/null' && sudo sed -i 's/'#WaylandEnable'/'WaylandEnable'/g' '/etc/gdm/custom.conf' && cat '/etc/gdm/custom.conf' | grep 'WaylandEnable'
sudo -e '/etc/gdm/custom.conf'

Root GUI Apps in Wayland

  • Run this before running GUI applications requiring root
  • This needs re-ran after session restart
xhost +LOCAL:

Settings

All-in-one

  • Last updated: 2019/01/07
gsettings set 'org.gnome.desktop.interface' 'enable-animations' 'false' && gsettings set 'org.gnome.desktop.peripherals.touchpad' 'send-events' 'disabled-on-external-mouse' && gsettings set 'org.gnome.desktop.peripherals.touchpad' 'natural-scroll' 'false' && gsettings set 'org.gnome.desktop.peripherals.mouse' 'accel-profile' 'flat' && gsettings set 'org.gnome.desktop.peripherals.touchpad' 'tap-to-click' 'false' && gsettings set 'org.gnome.desktop.peripherals.touchpad' 'tap-and-drag' 'false' && gsettings set 'org.gnome.desktop.peripherals.touchpad' 'disable-while-typing' 'false' && gsettings set 'org.gnome.desktop.peripherals.touchpad' 'click-method' 'areas' && gsettings set 'org.gnome.desktop.interface' 'clock-show-date' 'true' && gsettings set 'org.gnome.software' 'download-updates' 'false'

Individual

  • Last updated: 2019/01/07
gsettings set 'org.gnome.desktop.interface' 'enable-animations' 'false'
gsettings set 'org.gnome.desktop.peripherals.touchpad' 'send-events' 'disabled-on-external-mouse'
gsettings set 'org.gnome.desktop.peripherals.touchpad' 'natural-scroll' 'false'
gsettings set 'org.gnome.desktop.peripherals.mouse' 'accel-profile' 'flat'
gsettings set 'org.gnome.desktop.peripherals.touchpad' 'tap-to-click' 'false'
gsettings set 'org.gnome.desktop.peripherals.touchpad' 'tap-and-drag' 'false'
gsettings set 'org.gnome.desktop.peripherals.touchpad' 'disable-while-typing' 'false'
gsettings set 'org.gnome.desktop.peripherals.touchpad' 'click-method' 'areas'
gsettings set 'org.gnome.desktop.interface' 'clock-show-date' 'true'
gsettings set 'org.gnome.software' 'download-updates' 'false'

Hostname

  • Change x to computer name
hostnamectl set-hostname 'x'

KeePassXC

Add Database Password to GNOME Keyring

secret-tool store --label='KeePass' 'keepass' 'default'

mpv

mkdir -p ~/'.config/mpv' && echo -e "profile=gpu-hq\nscale=ewa_lanczossharp\ncscale=ewa_lanczossharp\nvideo-sync=display-resample\ninterpolation\ntscale=oversample" | tee ~/'.config/mpv/mpv.conf' > '/dev/null' && cat ~/'.config/mpv/mpv.conf'

NetworkManager

  • wifi.powersave can be 2 for disabled, or 3 for enabled
  • :!: ethernet.cloned-mac-address=random breaks USB Tethering with iOS/iPhones
sudo -e '/etc/NetworkManager/conf.d/99-custom.conf'
[device-mac-randomization]
wifi.scan-rand-mac-address=yes

[connection-mac-randomization]
ethernet.cloned-mac-address=random
wifi.cloned-mac-address=random

[connection]
wifi.powersave=2

Laptop Power Management

Notes

  • This expects a laptop with a battery
  • Do not use this for desktops

Testing

  • The following commands can be ran to see if they work on specific hardware
watch -n 0.1 grep \'cpu MHz\' '/proc/cpuinfo'
sudo x86_energy_perf_policy --all 'performance' --turbo-enable '1' --force
sudo x86_energy_perf_policy --all 'power' --turbo-enable '0' --force

Scripts

AC

  • Change the backlight sysfs as-needed (see backlight notes) or remove altogether
sudo mkdir -p '/etc/udev/scripts.d' && sudo -e '/etc/udev/scripts.d/ac-power.sh' && sudo chmod +x '/etc/udev/scripts.d/ac-power.sh'
#!/usr/bin/bash
# AC
echo "$(cat '/sys/class/backlight/'*'/max_brightness')" | tee '/sys/class/backlight/'*'/brightness' > '/dev/null'
x86_energy_perf_policy --all 'balance-performance' --turbo-enable '1' --force
# End

Battery

  • Change the backlight sysfs as-needed (see backlight notes) or remove altogether
sudo mkdir -p '/etc/udev/scripts.d' && sudo -e '/etc/udev/scripts.d/battery-power.sh' && sudo chmod +x '/etc/udev/scripts.d/battery-power.sh'
#!/usr/bin/bash
# Battery
echo '3750' | tee '/sys/class/backlight/'*'/brightness' > '/dev/null'
x86_energy_perf_policy --all 'balance-power' --turbo-enable '0' --force
# End

udev Rule

  • Requires the above AC and Battery scripts
sudo -e '/etc/udev/rules.d/99-power.rules' && sudo udevadm control --reload
SUBSYSTEM=="power_supply", ATTR{online}=="1", RUN+="/etc/udev/scripts.d/ac-power.sh"
SUBSYSTEM=="power_supply", ATTR{online}=="0", RUN+="/etc/udev/scripts.d/battery-power.sh"

PulseAudio

  • Sets resample-method to soxr-vhq for current-user only
echo 'resample-method = soxr-vhq' | tee ~/'.config/pulse/daemon.conf' > '/dev/null' && cat ~/'.config/pulse/daemon.conf'

Secure Shell

Solo Key

Information

PAM

Dependencies

sudo dnf install pamu2fcfg pam-u2f

Centralized Key

pamu2fcfg > ~/'u2f_keys' && sudo mv ~/'u2f_keys' '/etc/u2f_mappings'

GDM

  • Add to line 2, under the pam_selinux_permit.so entry
sudo -e '/etc/pam.d/gdm-password'
auth sufficient pam_u2f.so authfile=/etc/u2f_mappings cue

sudo

  • Add to line 2, under the #%PAM-1.0 line
sudo -e '/etc/pam.d/sudo'
auth sufficient pam_u2f.so authfile=/etc/u2f_mappings cue

systemd

  • Log data is stored in volatile storage
  • Max log file sizes of 50MB
sudo mkdir -p '/etc/systemd/journald.conf.d' && echo -e "[Journal]\nStorage=volatile\nSystemMaxUse=50M\nRuntimeMaxUse=50M" | sudo tee '/etc/systemd/journald.conf.d/logging.conf' > '/dev/null' && cat '/etc/systemd/journald.conf.d/logging.conf'

TRIM

Swap

  • Add discard after defaults for the swap mountpoint 5)
  • According to the swapon man page, setting this in fstab is acceptable
sudo -e '/etc/fstab'
,discard

Service

sudo systemctl enable 'fstrim.timer' --now && sudo systemctl start 'fstrim' && sync && sudo systemctl status 'fstrim' -l

Wine

Environment Variables

echo -e "export STAGING_SHARED_MEMORY=1\nexport STAGING_WRITECOPY=1\nexport STAGING_RT_PRIORITY_SERVER=90\nexport WINEESYNC=1" | sudo tee '/etc/profile.d/wine-tweaks.sh' > '/dev/null' && cat '/etc/profile.d/wine-tweaks.sh'
sudo -e '/etc/profile.d/wine-tweaks.sh'
PBA_ENABLE=1
mesa_glthread=true

Realtime Priority Permissions

  • For Wine to be able to use the STAGING_RT_PRIORITY_SERVER environment variable
  • Allows rtprio up to 90 and nice up to 10
  • May also allow Realtime priorities to be used with other applications
  • NOTE: This makes an assumption that the current user is in a group with the same name; this is default behavior on Fedora Workstation 6)
echo -e "@CHANGEME - rtprio 90\n@CHANGEME - nice -10" | sudo tee '/etc/security/limits.d/99-realtime.conf' > '/dev/null' && sudo sed -i 's/'CHANGEME'/'$USER'/g' '/etc/security/limits.d/99-realtime.conf' && cat '/etc/security/limits.d/99-realtime.conf'
ulimit -r

Increase Open Files Limit

  • For Wine to be able to use the WINEESYNC environment variable
sudo mkdir -p '/etc/systemd/system.conf.d' '/etc/systemd/user.conf.d' && echo -e "[Manager]\nDefaultLimitNOFILE=1048576" | sudo tee '/etc/systemd/system.conf.d/nofile.conf' > '/dev/null' && echo -e "[Manager]\nDefaultLimitNOFILE=1048576" | sudo tee '/etc/systemd/user.conf.d/nofile.conf' > '/dev/null' && cat '/etc/systemd/system.conf.d/nofile.conf' '/etc/systemd/user.conf.d/nofile.conf'
ulimit -Hn

Computer-specific

Nightwane

Fan Control

  • Expects an ASUS KCMA-D8 motherboard
  • If OpenBMC is figured out, this may be superseded
  • Answer yes to all sensors-detect prompts and reboot for fancontrol to run
sudo dnf install 'lm_sensors' && sudo sensors-detect && sudo -e '/etc/fancontrol' && sudo systemctl enable 'fancontrol'
INTERVAL=10
DEVNAME=/sys/class/hwmon/hwmon6=w83795g

FCTEMPS=/sys/class/hwmon/hwmon6/device/pwm2=/sys/class/hwmon/hwmon6/device/temp8_input
FCFANS=/sys/class/hwmon/hwmon6/device/fan1_input+/sys/class/hwmon/hwmon6/device/fan2_input

MINTEMP=/sys/class/hwmon/hwmon6/device/pwm2=50
MAXTEMP=/sys/class/hwmon/hwmon6/device/pwm2=60

MINSTART=/sys/class/hwmon/hwmon6/device/pwm2=4000
MINSTOP=/sys/class/hwmon/hwmon6/device/pwm2=0

Custom Resolution

Generate Modeline

  • 4k@60Hz CVT-RB
  • Mostly fixes random display glitches
  • :!: The grep here confirms the expected Modeline for my usual display 7)
  • :!: This cannot be used on Wayland currently
cvt --verbose --reduced '3840' '2160' '60' | grep 'Modeline "3840x2160R"  533.00  3840 3888 3920 4000  2160 2163 2168 2222 +hsync -vsync'

xorg.conf Snippet

  • :!: Change as-needed
sudo -e '/etc/X11/xorg.conf.d/99-graphics.conf'
Section "Monitor"
    Identifier  "HDMI-A-0"
    Modeline "3840x2160R"  533.00  3840 3888 3920 4000  2160 2163 2168 2222 +hsync -vsync
    Option      "PreferredMode" "3840x2160R"
EndSection

Graphics xorg.conf

intel

sudo dnf install 'xorg-x11-drv-intel' -y && sudo -e '/etc/X11/xorg.conf.d/99-graphics.conf'
Section "Device"
    Identifier  "Intel HD Graphics"
    Driver      "intel"
EndSection

amdgpu

sudo dnf install 'xorg-x11-drv-amdgpu' -y && sudo -e '/etc/X11/xorg.conf.d/99-graphics.conf'
Section "Device"
    Identifier  "AMD Polaris"
    Driver      "amdgpu"
EndSection

radeon

  • Expects pre-SI GPUs 8)
  • For SI, CIK, and newer GPUs, use amdgpu, along with enabling si_support and cik_support respectively for the amdgpu kernel module 9)
sudo dnf install 'xorg-x11-drv-ati' -y && sudo -e '/etc/X11/xorg.conf.d/99-graphics.conf'
Section "Device"
    Identifier  "AMD GPU"
    Driver      "radeon"
EndSection

Other

  • If using Optimus or some other multi-GPU set-up with different GPU vendors and/or drivers, add the BusID option
  • TODO: How to get the BusID value
    BusID      "PCI:0:2:0"

Mozilla Firefox

  • Use Disconnect.me strict protection Block List

Settings

Environment Variables

  • Enables hardware acceleration and use of WebRenderer
echo -e 'export MOZ_ACCELERATED=1\nexport MOZ_WEBRENDER=1' | sudo tee '/etc/profile.d/firefox.sh' > '/dev/null' && cat '/etc/profile.d/firefox.sh'

Default Profile

rm -fv '/tmp/profiles.ini' && nano '/tmp/profiles.ini' && sed -i 's/'CHANGEME'/'$USER'/g' '/tmp/profiles.ini'
[General]
StartWithLastProfile=1

[Profile0]
Name=default
IsRelative=1
Path=CHANGEME
Default=1

user.js

  • Last updated: 2019/01/24
rm -fv '/tmp/user.js' && nano '/tmp/user.js'
/***********
 * General *
 ***********/

user_pref("extensions.screenshots.disabled", true);
user_pref("reader.parse-on-load.enabled", false);

user_pref("media.mediasource.experimental.enabled", true);
user_pref("media.mediasource.ignore_codecs", true);
user_pref("media.autoplay.enabled", false);

user_pref("webgl.disabled", true);
user_pref("webgl.enable-webgl2", false);
user_pref("accessibility.force_disabled", 1);
user_pref("mousewheel.min_line_scroll_amount", 40);
user_pref("browser.tabs.drawInTitlebar", true);

/*******
 * U2F *
 *******/

user_pref("security.webauth.u2f", true);

/*******
 * END *
 *******/

Apply Settings

  • Path should report the current user's username, and the text Custom Stuff should be visible
ls '/tmp/profiles.ini' '/tmp/user.js' && pkill 'firefox' && rm -Rfv ~/'.mozilla' && sync && mkdir -p ~/'.mozilla/firefox/'$USER && mv '/tmp/profiles.ini' ~/'.mozilla/firefox/profiles.ini' && mv '/tmp/user.js' ~/'.mozilla/firefox/'$USER'/user.js' && sync && cat ~/'.mozilla/firefox/profiles.ini' | grep $USER && cat ~/'.mozilla/firefox/'$USER'/user.js' | grep 'Custom Stuff' && sleep '1' && sync

Extensions

Download

  • StartPage
  • Decentraleyes
  • HTTPS Everywhere
  • Privacy Badger
  • Cookie AutoDelete
  • uBlock Origin
  • CanvasBlocker
gio open 'https://www.startpage.com'
gio open 'https://addons.mozilla.org/en-US/firefox/addon/decentraleyes/versions' && gio open 'https://www.eff.org/https-everywhere' && gio open 'https://www.eff.org/privacybadger' && gio open 'https://addons.mozilla.org/en-US/firefox/addon/cookie-autodelete/versions' && gio open 'https://addons.mozilla.org/en-US/firefox/addon/ublock-origin/versions' && gio open 'https://addons.mozilla.org/en-US/firefox/addon/canvasblocker/versions'
  • [x] Enable Automatic Cleaning? Delay Before Cleaning
  • [x] Enable Cleanup on Domain Change
  • [ ] Enable Cleanup Log and Counter
  • [ ] Show Notification After Cookie Cleanup
  • [x] Clean Cookies from Open Tabs on Startup
  • [x] Localstorage Cleanup (Firefox 58+)

uBlock Origin

Settings

  • [x] Prevent WebRTC from leaking local IP addresses

Filter lists

  • [ ] Ads → EasyList 10)
  • [ ] Privacy → EasyPrivacy 11)
  • Multipurpose → [x] Dan Pollock's hosts file
  • Multipurpose → [x] hpHost's Ad and tracking servers
  • Multipurpose → [x] MVPS HOSTS
  • Custom → [x] Import

Custom 3rd-party filters

  • Last updated: 2018/11/23
https://www.fanboy.co.nz/fanboy-problematic-sites.txt
https://www.fanboy.co.nz/r/fanboy-ultimate.txt
https://www.fanboy.co.nz/fanboy-antifacebook.txt
https://www.fanboy.co.nz/fanboy-antifonts.txt
https://www.fanboy.co.nz/fanboy-cookiemonster.txt
https://raw.githubusercontent.com/ryanbr/fanboy-adblock/master/popads-domains-list.txt
https://raw.githubusercontent.com/ryanbr/fanboy-adblock/master/fake-news.txt

Testing Sites

Notable Folders and Commands

Extract ISO

  • D is the destination you want the extracted files to go
  • x is the ISO you want to extract files from
  • No space after the -o flag is intentional
  • This is primarily useful for copying Windows ISO images to a FAT32 flash drive
7z x -o'D' -y x
7z x -o'/run/media/espionage724/LTSC 2019' -y '/home/espionage724/Downloads/en_windows_10_enterprise_ltsc_2019_x64_dvd_be3c8ffb.iso' && sync && sync

youtube-dl

Show Formats

  • Change x to a URL
youtube-dl --list-formats x

Download

  • Change x to a URL
  • bestaudio can be changed to bestvideo for just video, or best for best video with audio
youtube-dl --extract-audio --format 'bestaudio' x

Shortcuts

/usr/share/applications
~/.local/share/applications

Icons

/usr/share/icons/hicolor
~/.local/share/icons/hicolor

Anaconda Module Blacklists

sudo -e '/etc/modprobe.d/anaconda-blacklist.conf'

YUM/DNF Repos

gio open '/etc/yum.repos.d'

DNF History

Transaction IDs

sudo dnf history

Undo

  • Change x to a transaction ID found above
sudo dnf history undo x

GPG Keys

Check Keys

rpm -q gpg-pubkey --qf '%{NAME}-%{VERSION}-%{RELEASE}\t%{SUMMARY}\n'

Remove Keys

sudo rpm -e x

Re-generate Thumbnails

rm -Rf ~/'.cache/thumbnails'

List GNOME gsettings

  • Change x to schema or omit it to show all settings
gsettings list-recursively 'x'

GNOME Software Maintenance

pkcon -c '1' refresh && pkcon update

fstrim

sudo fstrim --verbose --all

SELinux Re-label

sudo touch '/.autorelabel'

Xorg Debug

journalctl -e _COMM='gdm-x-session'
gio open ~/'.local/share/xorg/Xorg.1.log'

Verify DRI3

LIBGL_DEBUG='verbose' glxinfo | grep 'libgl'

GpuTest

Execute

HDTV

  • 1280×720
wget -O '/tmp/GpuTest_Linux_x64.zip' 'http://www.ozone3d.net/gputest/dl/GpuTest_Linux_x64_0.7.0.zip' && unzip '/tmp/GpuTest_Linux_x64.zip' -d '/tmp' && cd '/tmp/GpuTest_Linux_x64_'* && ./GpuTest /test='fur' /width='1280' /height='720'
cd '/tmp/GpuTest_Linux_x64_'* && ./GpuTest /test='fur' /width='1280' /height='720'
/fullscreen /benchmark /benchmark_duration_ms='15000'

FHD

  • 1920×1080
wget -O '/tmp/GpuTest_Linux_x64.zip' 'http://www.ozone3d.net/gputest/dl/GpuTest_Linux_x64_0.7.0.zip' && unzip '/tmp/GpuTest_Linux_x64.zip' -d '/tmp' && cd '/tmp/GpuTest_Linux_x64_'* && ./GpuTest /test='fur' /width='1920' /height='1080'
cd '/tmp/GpuTest_Linux_x64_'* && ./GpuTest /test='fur' /width='1920' /height='1080'
/fullscreen /benchmark /benchmark_duration_ms='15000'

UHDTV1

  • 3840×2160
wget -O '/tmp/GpuTest_Linux_x64.zip' 'http://www.ozone3d.net/gputest/dl/GpuTest_Linux_x64_0.7.0.zip' && unzip '/tmp/GpuTest_Linux_x64.zip' -d '/tmp' && cd '/tmp/GpuTest_Linux_x64_'* && ./GpuTest /test='fur' /width='3840' /height='2160'
cd '/tmp/GpuTest_Linux_x64_'* && ./GpuTest /test='fur' /width='3840' /height='2160'
/fullscreen /benchmark /benchmark_duration_ms='15000'

Cleanup

rm -Rf '/tmp/GpuTest_Linux_'* && cd ~ && sync

Show CPU Frequency

grep 'MHz' '/proc/cpuinfo'
watch -n 0.1 grep \'cpu MHz\' '/proc/cpuinfo'

OpenSSL Supported Ciphers

openssl ciphers -v | awk '{print $2}' | sort | uniq

Partition Information

  • Both commands do the same things
df -hT
df --human-readable --print-type

Encryption Information

sudo cryptsetup -v status '/dev/dm-0'

ATA Secure Erase

  • :!: All hdparm commands below assume actions to be performed on /dev/sda

Preparation

sudo dnf install 'hdparm' && sync
sudo hdparm -I '/dev/sda'
systemctl suspend

ATA Secure Erase

sudo hdparm --user-master u --security-set-pass 'x' '/dev/sda' && sudo hdparm --user-master u --security-erase 'x' '/dev/sda' && sync
sudo hdparm --user-master u --security-set-pass 'x' '/dev/sda' && sudo hdparm --user-master u --security-erase-enhanced 'x' '/dev/sda' && sync
sudo blkdiscard --verbose '/dev/sda'

NVMe Erase

  • NVMe Erase from the start page lands here and I usually use a Ubuntu LiveUSB to do this, hence the apt command
sudo apt install 'nvme-cli' -y && sync
sudo dnf install 'nvme-cli' -y && sync
sudo nvme format '/dev/nvme0' --reset --ses='1' --pil='0' --pi='0' --ms='0' && sync

Clean EFI Variables

  • :!: Could potentially cause a firmware brick or other issues with improper EFI implementations, use at own risk 12)
  • Safer way is to use efibootmgr to remove boot entries individually
sudo rm -f '/sys/firmware/efi/efivars/'* || sync && sudo efibootmgr -v

RAID

Controller Details

sudo mdadm --detail-platform

Create Software RAID

  • :?: Came from old notes; I assume this worked at some point, but in any case, the syntax looks nice :p
sudo mdadm --create '/dev/md0' --name='RAID' --level='0' --raid-devices='3' '/dev/sda' '/dev/sdb' '/dev/sdc' --verbose

VGA Switcheroo Power States

sudo cat '/sys/kernel/debug/vgaswitcheroo/switch'

ACPI Tables

  • In dsdt.dsl, look for _OSI values, along with Windows and Linux
sudo dnf install 'acpica-tools'
sudo cp --force '/sys/firmware/acpi/tables/DSDT' ~/'dsdt.dat'
cd ~ && iasl -d ~/'dsdt.dat'
gio open ~/'dsdt.dsl'
sudo dnf remove 'acpica-tools' && sync

Display EDID Info

sudo dnf install 'monitor-edid'
monitor-edid

Custom Resolutions

Generate Modeline

  • Use --reduced only for LCD/Non-CRT displays, and only as-needed 13)
  • Syntax is horizontal (width), vertical (height) and refresh rate
cvt '3840' '2160' '60'
cvt --reduced '3840' '2160' '60'
--reduced

Temporarily Apply

  • Changes are lost after reboot
  • Values after --newmode are from the above generate command, and is everything after Modeline
xrandr --newmode "3840x2160R"  533.00  3840 3888 3920 4000  2160 2163 2168 2222 +hsync -vsync
xrandr --addmode 'HDMI-A-0' '3840x2160R'
xrandr --output 'HDMI-A-0' --mode '3840x2160R'

Verify

xrandr --verbose | grep *current

Permanently Apply

  • Identifier is the name of the port on the GPU the display is connected to
  • Modeline is from the above generate command, including the text Modeline
  • PreferredMode is the custom resolution name generated
Section "Monitor"
    Identifier  "HDMI-A-0"
    Modeline x
    Option      "PreferredMode" "3840x2160R"
EndSection

Backlight

Notes

  • The following commands with an asterisk expect only one backlight controller at /sys/class/backlight
  • This was only tested on one laptop with intel_backlight
  • See Power Management notes on how to add backlight changes to a udev script
  • See backlight for more details

Controller Name

ls '/sys/class/backlight'

Query Current Brightness

cat '/sys/class/backlight/'*'/brightness'

Query Max Brightness

cat '/sys/class/backlight/'*'/max_brightness'

Set Custom Brightness

  • Change 376 to desired brightness
  • Desired brightness must be under max_brightness value
echo "376" | sudo tee '/sys/class/backlight/'*'/brightness' > '/dev/null'

Set Max Brightness

echo "$(cat '/sys/class/backlight/'*'/max_brightness')" | sudo tee '/sys/class/backlight/'*'/brightness' > '/dev/null'

Intel GuC Firmware

sudo cat '/sys/kernel/debug/dri/0/i915_guc_info'
sudo cat '/sys/kernel/debug/dri/0/i915_guc_load_status'

Hyper-threading Information

grep -e "processor" -e "core id" -e "^$" /proc/cpuinfo

Optimal GCC compiler flags

gcc -v -E -x c -march=native -mtune=native - < /dev/null 2>&1 | grep cc1 | perl -pe 's/ -mno-\S+//g; s/^.* - //g;'

Privacy

Clear Terminal History

history -cw

Create 7z Password Archive

  • Change 7ZIPNAME in 7ZIPNAME.7z to the desired archive name
  • Change PASS in -pPASS to the desired password
  • Change x to the file or folder to add to the archive
7za a '7ZIPNAME.7z' -p'PASS' 'x'
7za a 'x.7z' -p'x' 'x'

oathtool

  • x is a secret without &digits=6
sudo dnf install 'oathtool'
oathtool --totp -b 'x'

Remove EXIF data

sudo dnf install 'perl-Image-ExifTool'
exiftool -all= *.* -overwrite_original
2)
EFI file to boot and in the case of (quirky) InsydeH2O UEFI implementations, add to SecureBoot trust; doesn't matter if SecureBoot is enabled or not
3)
currently not Intel open-source nor NVIDIA proprietary drivers
4)
Spinesnap
5)
defaults,discard
6)
in the event this fails to work, run groups to see what groups the user is a part of and pick one; likely can use wheel
7)
if grep reports nothing, use whatever is reported instead
8)
HD6000 series and lower, and non-SI HD7000 series
9)
see modinfo -p amdgpu
10) , 11)
uncheck; included in Fanboy Ultimate List
12)
personally tested fine on several Acer and Dell computers
13)
useful for reducing amount of bandwidth over cables, particularly in-case of unstable 4k@60Hz set-ups
distros/fedora_workstation_gnome.txt · Last modified: 2019/02/14 01:47 by Sean Rhone