User Tools

Site Tools


distros:ubuntu_desktop

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
distros:ubuntu_desktop [2021/10/29 20:00] Sean Rhonedistros:ubuntu_desktop [2022/06/08 21:52] Sean Rhone
Line 3: Line 3:
   * Ubuntu ((https://ubuntu.com/))   * Ubuntu ((https://ubuntu.com/))
   * Desktop ((https://ubuntu.com/desktop))   * Desktop ((https://ubuntu.com/desktop))
 +  * 22.04 LTS
  
 ====== Download ====== ====== Download ======
Line 18: Line 19:
  
   sudo -e '/etc/hosts'   sudo -e '/etc/hosts'
 +
 +===== Restore =====
 +
 +****
 +
 +  sudo cp '/etc/hosts-bak' '/etc/hosts' && sync
 +
 +====== Repositories ======
 +
 +===== Keybase =====
 +
 +  * https://keybase.io/
 +  * https://prerelease.keybase.io/
 +  * :!: This is only the signing key at the moment
 +
 +  wget -O '/tmp/code_signing_key.asc' 'https://keybase.io/docs/server_security/code_signing_key.asc' && sudo mv '/tmp/code_signing_key.asc' '/etc/apt/trusted.gpg.d/keybase.asc' && sync
 +
 +===== ROCm =====
 +
 +  * https://docs.amd.com/category/ROCm%E2%84%A2%20v5.x
 +  * https://github.com/RadeonOpenCompute/ROCm
 +
 +  wget -O '/tmp/rocm.gpg.key' 'https://repo.radeon.com/rocm/rocm.gpg.key' && sudo mv '/tmp/rocm.gpg.key' '/etc/apt/trusted.gpg.d/rocm.asc' && echo 'deb https://repo.radeon.com/rocm/apt/latest/ ubuntu main' | sudo tee '/etc/apt/sources.list.d/rocm.list' > '/dev/null' && sync
 +
 +===== WineHQ =====
 +
 +  * https://www.winehq.org/
 +  * https://wiki.winehq.org/Ubuntu
 +  * https://dl.winehq.org/wine-builds/
 +
 +  wget -O '/tmp/winehq.key' 'https://dl.winehq.org/wine-builds/winehq.key' && sudo mv '/tmp/winehq.key' '/etc/apt/trusted.gpg.d/winehq.asc' && echo 'deb https://dl.winehq.org/wine-builds/ubuntu/ jammy main' | sudo tee '/etc/apt/sources.list.d/winehq.list' > '/dev/null' && sync
  
 ====== Software ====== ====== Software ======
Line 33: Line 65:
 **** ****
  
-  sudo fwupdmgr refresh --force && sudo fwupdmgr update --verbose+  sudo fwupdmgr refresh --force && sudo fwupdmgr update --verbose && sync
  
 ==== Snaps ==== ==== Snaps ====
Line 39: Line 71:
 **** ****
  
-  sudo snap refresh+  sudo snap refresh && sync
  
 ===== General ===== ===== General =====
Line 45: Line 77:
 **** ****
  
-  sudo apt install evolution filezilla gimp keepassxc mpv transmission-gtk aria2 htop unar p7zip-full mesa-utils ffmpeg libsecret-tools lm-sensors libreoffice rhythmbox +  sudo apt install evolution filezilla gimp keepassxc libreoffice rhythmbox transmission-gtk aria2 ffmpeg hdparm htop libsecret-tools linux-tools-generic lm-sensors mesa-utils mpv p7zip-full unar wget xfsprogs x11-xserver-utils yt-dlp 
  
-==== OpenVPN ====+===== ckb-next =====
  
-****+  https://github.com/ckb-next/ckb-next
  
-  network-manager-openvpn-gnome+  ckb-next
  
-==== ckb-next ====+===== ROCm =====
  
-  * https://github.com/ckb-next/ckb-next+  * https://docs.amd.com/bundle/ROCm-Installation-Guide-v5.1.3/page/How_to_Install_ROCm.html
  
-  ckb-next+  rocm-opencl rocm-smi
  
-==== Wine ====+===== Steam =====
  
 **** ****
  
-  wine winetricks+  steam
  
-==== Tor Browser ====+===== Wine =====
  
-****+  https://wiki.winehq.org/Ubuntu
  
-  torbrowser-launcher+  winehq-staging winbind winetricks
  
-==== Keybase ====+===== Keybase =====
  
   * https://keybase.io   * https://keybase.io
Line 78: Line 110:
   rm -Rf '/tmp/keybase_amd64.deb' && wget -O '/tmp/keybase_amd64.deb' 'https://prerelease.keybase.io/keybase_amd64.deb' && sudo apt install '/tmp/keybase_amd64.deb' && rm '/tmp/keybase_amd64.deb' && sync && run_keybase   rm -Rf '/tmp/keybase_amd64.deb' && wget -O '/tmp/keybase_amd64.deb' 'https://prerelease.keybase.io/keybase_amd64.deb' && sudo apt install '/tmp/keybase_amd64.deb' && rm '/tmp/keybase_amd64.deb' && sync && run_keybase
  
-==== Google Chrome ====+===== Tor Browser ===== 
 + 
 +**** 
 + 
 +  torbrowser-launcher 
 + 
 +===== Google Chrome =====
  
   * :!: TODO: This may need updated to run with ''apt'' instead of ''dpkg''   * :!: TODO: This may need updated to run with ''apt'' instead of ''dpkg''
Line 91: Line 129:
  
   gnome-terminal --command "sudo sh -c 'apt update && apt full-upgrade -y && apt clean && apt autoremove -y && sync && snap refresh && wget -O '/etc/hosts' 'https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts' && sync && fstrim --all --verbose && sync && sleep '5''"   gnome-terminal --command "sudo sh -c 'apt update && apt full-upgrade -y && apt clean && apt autoremove -y && sync && snap refresh && wget -O '/etc/hosts' 'https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts' && sync && fstrim --all --verbose && sync && sleep '5''"
 +
 +==== Miner ====
 +
 +  * See [[mining:nsfminer#rocm|ROCm - Nightwane]]
 +
 +  gnome-terminal -- sh -c ~/'.local/bin/nsfminer/Nightwane/ROCm/Game.sh'
 +
 +  gnome-terminal -- sh -c ~/'.local/bin/nsfminer/Nightwane/ROCm/Miner.sh'
  
 ==== Keys ==== ==== Keys ====
Line 97: Line 143:
  
   * Ctrl + Alt + Z   * Ctrl + Alt + Z
-  * Pause or F7+  * Pause or Launch1 
 +  * F6 
 +  * F8
  
 ===== Printer ===== ===== Printer =====
Line 103: Line 151:
   * http://localhost:631/admin   * http://localhost:631/admin
  
-  * ''HP OfficeJet Pro 8710, driverless, cups-filters'' +  * Internet Printing Protocol (ipps) -> HP -> IPP Everywhere ™ 
-  * Print Color Mode: Device Gray+  * Color Mode: Device Gray
   * Administration -> Set As Server Default   * Administration -> Set As Server Default
  
-  socket://192.168.1.164:9100+  ipps://192.168.1.164/ipp/print
  
 ===== gedit ===== ===== gedit =====
Line 116: Line 164:
 ===== Network ===== ===== Network =====
  
-==== Cloudflare ====+==== 1.1.1.1 DNS ====
  
   * https://1.1.1.1/dns/   * https://1.1.1.1/dns/
Line 125: Line 173:
 <code>2606:4700:4700::1111,2606:4700:4700::1001</code> <code>2606:4700:4700::1111,2606:4700:4700::1001</code>
  
-==== VPN.AC ====+===== Nautilus =====
  
-  * See [[information:vpn.ac|VPN.AC]] +  * Sort Folders Before Files
-  * :!: If using this VPN, disable IPv6 from NetworkManager+
  
 ===== Rhythmbox ===== ===== Rhythmbox =====
Line 142: Line 189:
 ==== Config ==== ==== Config ====
  
-****+  Add options in ''GRUB_CMDLINE_LINUX_DEFAULT=''
  
   sudo -e '/etc/default/grub' && sudo update-grub   sudo -e '/etc/default/grub' && sudo update-grub
  
-==== amdgpu ====+==== AMD Memory Encryption ==== 
 + 
 +  * https://access.redhat.com/articles/4255251 
 +  * https://www.kernel.org/doc/Documentation/x86/amd-memory-encryption.txt 
 +  * :!: Either enable it through the OS, or enable TSME from the firmware, not both 
 +  * :!: Memory encryption enabled here may have issues with IOMMU, but TSME may be fine 
 + 
 +  mem_encrypt=on 
 + 
 +  dmesg | grep 'SME' 
 + 
 +==== AMDGPU ==== 
 + 
 +=== Power ===
  
-  * Allows use of Overdrive options for overclocking and notably increasing the Power Limit+  * Allows use of Overdrive options for overclocking and increasing the Power Limit
  
   amdgpu.ppfeaturemask=0xffffffff   amdgpu.ppfeaturemask=0xffffffff
  
-=== Verify ===+  cat '/sys/module/amdgpu/parameters/ppfeaturemask' | grep '0xffffffff' 
 + 
 +=== Other === 
 + 
 +  * https://dri.freedesktop.org/docs/drm/gpu/amdgpu.html 
 +  * :!: ''amdgpu.mes=1'' caused Linux not to boot 
 + 
 +  amdgpu.mes=1 
 + 
 +  amdgpu.mcbp=1 
 + 
 +  amdgpu.deep_color=1 
 + 
 +==== EDID ==== 
 + 
 +  * :!: TODO 
 + 
 +  drm.edid_firmware=edid/S271HL-75Hz-RB2.bin 
 + 
 +==== IOMMU ====
  
 **** ****
  
-  cat '/sys/module/amdgpu/parameters/ppfeaturemask' | grep '4294967295'+  iommu=pt 
 + 
 +==== NVMe ==== 
 + 
 +  * :!: This may need adjusted for different CPU core counts 
 + 
 +  nvme.poll_queues=16 
 + 
 +  dmesg | grep 'nvme' 
 + 
 +  cat '/proc/interrupts' 
 + 
 +==== Intel Optimization ==== 
 + 
 +  * This enables Framebuffer compression, Panel self-refresh, and i915 Fastboot 
 + 
 +  i915.enable_fbc=1 i915.enable_psr=1 i915.fastboot=1 
 + 
 +==== Coreboot ==== 
 + 
 +  * This is needed to relax permissions for Coreboot firmware to be flashed internally 
 +  * :!: This should be removed after flashing 
 + 
 +  iomem=relaxed 
 + 
 +==== NVIDIA GSP ==== 
 + 
 +  * http://us.download.nvidia.com/XFree86/Linux-x86_64/510.54/README/gsp.html 
 +  * Allows loading of GSP firmware 
 +  * :!: As of 2022/02/24 with a RTX 3060 and the 510.54 proprietary driver, this causes the mouse cursor to not update visibly from the top-left corner on GNOME 41/Fedora 35 
 +  * :!: This has not been tested with https://github.com/NVIDIA/open-gpu-kernel-modules 
 + 
 +  nvidia.NVreg_EnableGpuFirmware=1
  
 ===== GNOME ===== ===== GNOME =====
  
-==== Settings ====+==== Hide Top Bar ====
  
-=== All-in-one ===+  * https://extensions.gnome.org/extension/545/hide-top-bar/
  
-  * Last updated: 2021/10/29+==== Disable Wayland ====
  
-   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.desktop.interface' 'clock-show-weekday' 'true'+  * :!: ckb-next auto light shutoff requires Xorg 
 +  * :!: GPU scaling for resolution requires Xorg 
 +  * :!: Setting ''i915'' to use Full RGB with HDMI requires Xorg
  
-  gsettings set 'org.gnome.software' 'download-updates' 'false'+  cat '/etc/gdm3/custom.conf| grep '#WaylandEnable' > '/dev/null' && sudo sed -i 's/'#WaylandEnable'/'WaylandEnable'/g' '/etc/gdm3/custom.conf' && cat '/etc/gdm3/custom.conf| grep 'WaylandEnable'
  
-  gsettings reset 'org.gnome.shell' 'app-picker-layout'+  sudo -e '/etc/gdm3/custom.conf' 
 + 
 +==== Settings ==== 
 + 
 +=== All-in-one === 
 + 
 +  * Last updated: 2022/06/08 
 + 
 +  gsettings reset 'org.gnome.shell' 'app-picker-layout' && gsettings set 'org.gnome.desktop.interface' 'enable-animations' 'true' && 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.desktop.interface' 'clock-show-weekday' 'true'
  
 === Individual === === Individual ===
  
-  * Last updated: 2021/10/29+  * Last updated: 2022/06/08 
 + 
 +  gsettings reset 'org.gnome.shell' 'app-picker-layout'
  
-  gsettings set 'org.gnome.desktop.interface' 'enable-animations' 'false'+  gsettings set 'org.gnome.desktop.interface' 'enable-animations' 'true'
  
   gsettings set 'org.gnome.desktop.peripherals.touchpad' 'send-events' 'disabled-on-external-mouse'   gsettings set 'org.gnome.desktop.peripherals.touchpad' 'send-events' 'disabled-on-external-mouse'
Line 195: Line 318:
  
   gsettings set 'org.gnome.desktop.interface' 'clock-show-weekday' 'true'   gsettings set 'org.gnome.desktop.interface' 'clock-show-weekday' 'true'
- 
-== Other == 
- 
-  * The first depend on GNOME Software existing 
-  * The second needs GNOME 40+ and isn't applicable on Ubuntu 21.04 
- 
-  gsettings set 'org.gnome.software' 'download-updates' 'false' 
- 
-  gsettings reset 'org.gnome.shell' 'app-picker-layout' 
  
 ===== Hostname ===== ===== Hostname =====
Line 232: Line 346:
 ===== lm_sensors ===== ===== lm_sensors =====
  
-  ''--auto'' is quicker, but more things are detected by doing the full scan +****
- +
-  sudo sensors-detect+
  
   sudo sensors-detect --auto   sudo sensors-detect --auto
Line 251: Line 363:
 interpolation interpolation
 tscale=oversample</code> tscale=oversample</code>
- 
-===== 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' 
- 
-<code> 
-[device-mac-randomization] 
-wifi.scan-rand-mac-address=yes 
- 
-[connection-mac-randomization] 
-wifi.cloned-mac-address=random 
- 
-[connection] 
-wifi.powersave=2</code> 
- 
-<code> 
-[connection-mac-randomization] 
-ethernet.cloned-mac-address=random</code> 
  
 ===== Laptop Power Management ===== ===== Laptop Power Management =====
Line 280: Line 371:
  
   * See [[clients:secure_shell|Client]] notes to generate/restore public key   * See [[clients:secure_shell|Client]] notes to generate/restore public key
- 
-===== Uncomplicated Firewall ===== 
- 
-  * See [[notes:ufw|ufw]] for more notes 
- 
-  sudo ufw reset && sudo ufw default deny && sudo ufw logging off && sudo ufw enable && sudo systemctl enable 'ufw' 
- 
-  sudo ufw allow 'ssh' 
  
 ===== Drive Maintenance ===== ===== Drive Maintenance =====
Line 293: Line 376:
 ==== Trim ==== ==== Trim ====
  
-  :!: Enable only if a SSD is being used for Linux+****
  
   sudo systemctl enable 'fstrim.timer' --now && sudo systemctl start 'fstrim' && sync && sudo systemctl status 'fstrim' -l   sudo systemctl enable 'fstrim.timer' --now && sudo systemctl start 'fstrim' && sync && sudo systemctl status 'fstrim' -l
Line 300: Line 383:
  
   * [[https://wiki.archlinux.org/title/XFS#Online_Metadata_Checking_(scrub)|XFS - ArchWiki]]   * [[https://wiki.archlinux.org/title/XFS#Online_Metadata_Checking_(scrub)|XFS - ArchWiki]]
-  * :!: This is only necessary if XFS is being used on any persistent drives, and requires ''xfsprogs'' to be installed +  * :!: Enable in all cases since it's likely both ''/'' and ''/boot'' are XFS
- +
-  sudo apt install 'xfsprogs-y && sync+
  
   sudo systemctl enable 'xfs_scrub_all.timer' --now && sudo systemctl start 'xfs_scrub_all' && sync && sudo systemctl status 'xfs_scrub_all' -l   sudo systemctl enable 'xfs_scrub_all.timer' --now && sudo systemctl start 'xfs_scrub_all' && sync && sudo systemctl status 'xfs_scrub_all' -l
Line 328: Line 409:
  
   * See [[notes:xorg.conf_snippets|xorg.conf Snippets]]   * See [[notes:xorg.conf_snippets|xorg.conf Snippets]]
 +  * :!: GNOME for several versions now including 42 makes the screen color too warm; the fix is to disable color calibration for screens in GNOME settings
  
-===== Nightwane =====+====== Mozilla Firefox ======
  
-  * :!: With Fedora 34 as of 2021/05/12, the ''amdgpu'' Xorg DDX driver has the screen more warm/yellowish and breaks calibration +  * See [[notes:firefox|Firefox]] if old configuration is needed, otherwise use Firefox Sync
-  * :!: This doesn't happen with ''modesetting'' on Xorg, nor at all with GNOME on Wayland +
-  * Since ''amdgpu'' is installed and used by-default on Xorg, removing it causes ''modesetting'' to be used instead +
-  * [[http://www.lagom.nl/lcd-test/contrast.php|Contrast - Lagom LCD test]]+
  
-  * :!: TODO: Test if this is necessary on Ubuntu 21.04++===== DNS over HTTPS =====
  
-<code>sudo apt remove 'xserver-xorg-video-amdgpu' && sync</code>+  * [[https://quad9.net/|Quad9]]
  
-====== Mozilla Firefox ====== +  https://dns.quad9.net/dns-query
- +
-  * See [[notes:firefox|Firefox]] if old configuration is needed, otherwise use Firefox Sync+
  
 ====== Server ====== ====== Server ======
  
   * For workstations that run servers as a secondary directive   * For workstations that run servers as a secondary directive
-  * For headless servers, use [[distros:ubuntu_server|Ubuntu Server]]+  * For headless servers, use [[distros:fedora_server|Fedora Server]] 
 + 
 +===== Enable SSH ===== 
 + 
 +**** 
 + 
 +  sudo systemctl enable --now 'sshd'
  
 ===== Automatic Updates ===== ===== Automatic Updates =====
Line 353: Line 436:
 ==== Service ==== ==== Service ====
  
-  sudo -e '/etc/systemd/system/ubuntu-up.service'+  sudo -e '/etc/systemd/system/fedora-up.service'
  
 <code> <code>
 [Service] [Service]
 Type=oneshot Type=oneshot
-ExecStartPre='/usr/bin/apt' clean +ExecStartPre='/usr/bin/dnf' clean 'all
-ExecStart='/usr/bin/aptupdate +ExecStart='/usr/bin/dnfdistro-sync -y 
-ExecStart='/usr/bin/aptfull-upgrade -y +ExecStart='/usr/bin/dnf' autoremove -y
-ExecStart='/usr/bin/apt' autoremove -y+
 ExecStartPost='/usr/bin/sync' ExecStartPost='/usr/bin/sync'
 ExecStartPost='/usr/bin/systemctl' reboot</code> ExecStartPost='/usr/bin/systemctl' reboot</code>
  
-==== Timer ====+===== Timer =====
  
   * 03:00 Oak   * 03:00 Oak
  
-  sudo -e '/etc/systemd/system/ubuntu-up.timer' && sudo systemctl daemon-reload && sudo systemctl enable 'ubuntu-up.timer' --now+  sudo -e '/etc/systemd/system/fedora-up.timer' && sudo systemctl daemon-reload && sudo systemctl enable 'fedora-up.timer' --now
  
 <code> <code>
Line 383: Line 465:
 [Install] [Install]
 WantedBy=timers.target</code> WantedBy=timers.target</code>
 +
 +====== 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 =====
 +
 +  * https://ytdl-org.github.io/youtube-dl/index.html
 +
 +==== Download ====
 +
 +****
 +
 +  rm -f '/tmp/youtube-dl' && wget -O '/tmp/youtube-dl' 'https://yt-dl.org/downloads/latest/youtube-dl' && chmod +x '/tmp/youtube-dl'
 +
 +==== Show Formats ====
 +
 +  * Change ''x'' to a URL
 +
 +  '/tmp/youtube-dl' --list-formats x
 +
 +==== Download Media ====
 +
 +  * Change ''x'' to a URL
 +  * ''bestaudio'' can be changed to ''bestvideo'' for just video, or ''best'' for best video with audio
 +
 +  '/tmp/youtube-dl' --extract-audio --format 'bestaudio' x
 +
 +=== M4A Audio ===
 +
 +  * Ideally for if iOS devices will be involved
 +
 +  '/tmp/youtube-dl' --extract-audio --format 'bestaudio' --audio-format 'm4a' x
 +
 +=== MP3 Audio ===
 +
 +****
 +
 +  '/tmp/youtube-dl' --extract-audio --format 'bestaudio' --audio-format 'mp3' 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
 +
 +===== DNF Autoremove Fix =====
 +
 +  * Removes the initially-installed kernel in order to fix ''dnf autoremove'' if it's broken
 +  * :!: This will vary depending on the Fedora image version used
 +
 +  sudo dnf list --installed 'kernel'*
 +
 +  sudo dnf remove *5.3.7* && sync
 +
 +===== 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 App Grid Reset =====
 +
 +  * [[https://www.omgubuntu.co.uk/2020/11/reset-gnome-shell-applications-grid|OMG! Ubuntu!]]
 +
 +  gsettings reset 'org.gnome.shell' 'app-picker-layout'
 +
 +===== GNOME Software Maintenance =====
 +
 +****
 +
 +  pkcon -c '1' refresh && pkcon update
 +
 +===== fstrim =====
 +
 +****
 +
 +  sudo fstrim --verbose --all
 +
 +===== SELinux Re-label =====
 +
 +****
 +
 +  sudo touch '/.autorelabel'
 +
 +===== GNOME Monitors Reset =====
 +
 +****
 +
 +  rm -f ~/'.config/monitors.xml' ~/'.config/monitors.xml~'
 +
 +===== PulseAudio Reset =====
 +
 +****
 +
 +  rm -f ~/'.config/pulse/'*
 +
 +===== 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 =====
 +
 +  * https://www.geeks3d.com/gputest/
 +
 +==== Execute ====
 +
 +=== HDTV ===
 +
 +  * 1280x720
 +
 +  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'
 +
 +== NVIDIA Optimus ==
 +
 +****
 +
 +  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_'* && __NV_PRIME_RENDER_OFFLOAD='1' __GLX_VENDOR_LIBRARY_NAME='nvidia' ./GpuTest /test='fur' /width='1280' /height='720'
 +
 +=== FHD ===
 +
 +  * 1920x1080
 +
 +  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 ===
 +
 +  * 3840x2160
 +
 +  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 Sensors =====
 +
 +****
 +
 +  sudo dnf install 'lm_sensors' -y && sudo sensors-detect --auto && sudo watch -n0.1 sensors
 +
 +===== Show CPU Frequency =====
 +
 +  grep 'MHz' '/proc/cpuinfo'
 +
 +  watch --interval '0.5' grep \'cpu MHz\' '/proc/cpuinfo'
 +
 +===== OpenSSL Supported Ciphers =====
 +
 +****
 +
 +  openssl ciphers -v | awk '{print $2}' | sort | uniq
 +
 +===== Partition Information =====
 +
 +  * Both commands present the same information
 +
 +  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'
 +
 +  sync && systemctl suspend
 +
 +==== ATA Secure Erase ====
 +
 +<code>sudo blkdiscard --verbose '/dev/sda'</code>
 +
 +<code>sudo hdparm --user-master u --security-set-pass 'x' '/dev/sda' && sudo hdparm --user-master u --security-erase-enhanced 'x' '/dev/sda' && sync</code>
 +
 +<code>sudo hdparm --user-master u --security-set-pass 'x' '/dev/sda' && sudo hdparm --user-master u --security-erase 'x' '/dev/sda' && sync</code>
 +
 +===== 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 ((personally tested fine on several Acer and Dell computers))
 +  * 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 ====
 +
 +  * This can be used to get the Oprom version for Intel RST
 +
 +  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 =====
 +
 +  * https://nouveau.freedesktop.org/wiki/Optimus
 +
 +  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 =====
 +
 +  * https://unix.stackexchange.com/a/114398
 +
 +  sudo dnf install 'monitor-edid'
 +
 +  monitor-edid
 +
 +===== Custom Resolutions =====
 +
 +==== Generate Modeline ====
 +
 +  * Use ''--reduced'' only for LCD/Non-CRT displays, and only as-needed ((useful for reducing amount of bandwidth over cables, particularly in-case of unstable 4k@60Hz set-ups))
 +  * Syntax is ''horizontal'' (width), ''vertical'' (height) and ''refresh rate''
 +
 +  cvt '3840' '2160' '60'
 +
 +  cvt --reduced '3840' '2160' '60'
 +
 +<code>--reduced</code>
 +
 +==== 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
 +
 +<code>
 +Section "Monitor"
 +    Identifier  "HDMI-A-0"
 +    Modeline x
 +    Option      "PreferredMode" "3840x2160R"
 +EndSection</code>
 +
 +===== 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|Power Management notes]] on how to add backlight changes to a udev script
 +  * See [[https://wiki.archlinux.org/index.php/backlight|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'
 +
 +===== HT/SMT 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
  
/var/www/wiki/data/pages/distros/ubuntu_desktop.txt · Last modified: 2024/02/06 16:34 by Sean Rhone