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
Last revisionBoth sides next revision
distros:ubuntu_desktop [2019/10/22 07:47] Sean Rhonedistros:ubuntu_desktop [2023/12/13 15:22] – [Tweaks] Sean Rhone
Line 1: Line 1:
 ====== Information ====== ====== Information ======
  
-  * Ubuntu ((https://www.ubuntu.com/desktop)) +  * Ubuntu ((https://ubuntu.com/)) 
-  * 19.04+  * Desktop ((https://ubuntu.com/desktop)) 
 +  * 23.10
  
 ====== Download ====== ====== Download ======
  
-  * https://www.ubuntu.com/download/desktop+===== Etcher Image Writer =====
  
-====== Installation Notes ======+  * https://etcher.balena.io/#download-etcher
  
-  ''EFI/ubuntu/shimx64.efi'' ((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)) +===== Ubuntu ===== 
-  * Minimal installation+ 
 +  https://ubuntu.com/download/desktop
  
 ====== HOSTS ====== ====== HOSTS ======
  
   * https://github.com/StevenBlack/hosts/   * https://github.com/StevenBlack/hosts/
-  * Using ''Unified hosts + fakenews + gambling''+  * Unified hosts + fakenews + gambling
  
-  sudo wget -O '/etc/hosts' 'https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts' && sync+===== Initial =====
  
-  cat '/etc/hosts' | grep 'Date:'+  * Only run once
  
-  sudo -'/etc/hosts'+  ls '/etc/hosts~' || wget -O '/tmp/hosts-tmp' 'https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts' && sudo cp --backup '/tmp/hosts-tmp' '/etc/hosts' && sync
  
-====== Repositories ======+===== Update =====
  
-===== Wine =====+****
  
-  :!: TODO: Update for 19.04+  ls '/etc/hosts~' && wget -O '/tmp/hosts-tmp' 'https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts' && sudo mv --force '/tmp/hosts-tmp' '/etc/hosts' && sync
  
-  * https://www.winehq.org/ +===== Restore Backup =====
-  * https://wiki.winehq.org/Ubuntu +
-  * https://dl.winehq.org/wine-builds/ubuntu/+
  
-  wget -O '/tmp/winehq-gpg.key' 'https://dl.winehq.org/wine-builds/Release.key' && sudo apt-key add '/tmp/winehq-gpg.key' && echo 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main' | sudo tee '/etc/apt/sources.list.d/winehq.list' > '/dev/null' && cat '/etc/apt/sources.list.d/winehq.list' && rm -f '/tmp/winehq-gpg.key' && sync+****
  
-===== Lutris =====+  ls '/etc/hosts~' && sudo mv --force '/etc/hosts~' '/etc/hosts' && sync
  
-  * :!: TODO: Update for 19.04+====== Repositories ======
  
-  * https://lutris.net +===== Liquorix Kernel =====
-  * http://download.opensuse.org/repositories/home:/strycore/+
  
-  wget -O '/tmp/lutris-gpg.key' 'http://download.opensuse.org/repositories/home:/strycore/xUbuntu_18.04/Release.key' && sudo apt-key add '/tmp/lutris-gpg.key' && echo 'deb http://download.opensuse.org/repositories/home:/strycore/xUbuntu_18.04/ ./' | sudo tee '/etc/apt/sources.list.d/lutris.list' > '/dev/null' && cat '/etc/apt/sources.list.d/lutris.list' && rm -f '/tmp/lutris-gpg.key' && sync+  * https://liquorix.net/
  
-===== ckb-next =====+  sudo add-apt-repository 'ppa:damentz/liquorix' 
 + 
 +===== WineHQ ===== 
 + 
 +  * https://www.winehq.org/ 
 +  * https://wiki.winehq.org/Ubuntu 
 +  * https://dl.winehq.org/wine-builds/ 
 +  * :!: ''mantic'' = 23.10
  
-  * https://github.com/ckb-next/ckb-next+  sudo dpkg --add-architecture 'i386'
  
-  sudo add-apt-repository 'ppa:tatokis/ckb-next'+  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/ mantic main' | sudo tee '/etc/apt/sources.list.d/winehq.list' > '/dev/null&& sync
  
-===== padoka PPA =====+===== oibaf/graphics-drivers =====
  
-  * https://launchpad.net/~paulo-miguel-dias/+archive/ubuntu/mesa +  * https://launchpad.net/~oibaf/+archive/ubuntu/graphics-drivers
-  * https://wordpress.padoka.org+
  
-  sudo add-apt-repository 'ppa:paulo-miguel-dias/mesa-y+  sudo add-apt-repository 'ppa:oibaf/graphics-drivers'
  
 ====== Software ====== ====== Software ======
Line 72: Line 77:
 **** ****
  
-  sudo fwupdmgr refresh && sudo fwupdmgr update --verbose+  sudo fwupdmgr refresh --force && sudo fwupdmgr update --verbose && sync
  
 ==== Snaps ==== ==== Snaps ====
Line 78: Line 83:
 **** ****
  
-  sudo snap refresh+  sudo snap refresh && sync
  
 ===== General ===== ===== General =====
Line 84: Line 89:
 **** ****
  
-  sudo apt install evolution filezilla gimp keepassxc mpv transmission-gtk aria2 htop unar p7zip-full mesa-utils ffmpeg libsecret-tools libreoffice rhythmbox+  sudo apt install --install-recommends 7zip adb fastboot aria2 evolution filezilla gimp gnome-shell-extension-manager keepassxc libreoffice libsecret-tools lm-sensors mesa-utils mpv rhythmbox transmission-gtk unar yt-dlp 
  
-===== wl =====+===== Wine =====
  
-  * For a MacBook Pro with BCM4360 wireless+  * https://wiki.winehq.org/Ubuntu
  
-  bcmwl-kernel-source+  winehq-staging winbind winetricks libgl1-mesa-dri:i386 mesa-vulkan-drivers mesa-vulkan-drivers:i386 libgl1:i386 libnss-mdns:i386
  
-===== OpenVPN =====+===== Liquorix Kernel =====
  
 **** ****
  
-  network-manager-openvpn-gnome +  linux-image-liquorix-amd64 linux-headers-liquorix-amd64
- +
-===== VA-API ===== +
- +
-  gstreamer1.0-vaapi +
- +
-  i965-va-driver +
- +
-===== ckb-next ===== +
- +
-**** +
- +
-  ckb-next +
- +
-===== Keybase ===== +
- +
-  * https://keybase.io +
- +
-  wget -O '/tmp/keybase_amd64.deb' 'https://prerelease.keybase.io/keybase_amd64.deb' && sudo dpkg --install '/tmp/keybase_amd64.deb' && sudo apt install -f && rm '/tmp/keybase_amd64.deb' && sync && run_keybase +
- +
-===== Wine ===== +
- +
-  winetricks exe-thumbnailer winbind +
- +
-  winehq-staging +
- +
-  wine-d3d9-staging+
  
-===== Lutris =====+===== Intel Media Driver for VAAPI =====
  
-  * Even if using Lutris's Wine runners, Wine Staging should be installed system-wide in order to satisfy dependencies+  * https://github.com/intel/media-driver#components-and-features
  
-  winehq-staging lutris+  intel-media-va-driver-non-free
  
 ===== Tor Browser ===== ===== Tor Browser =====
Line 140: Line 119:
 **** ****
  
-  wget -O '/tmp/google-chrome-stable_current_amd64.deb' 'https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb' && sudo dpkg --install '/tmp/google-chrome-stable_current_amd64.deb' || sudo apt install -f && rm '/tmp/google-chrome-stable_current_amd64.deb' && sync+  wget -O '/tmp/google-chrome-stable_current_amd64.deb' 'https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb' && sudo apt install '/tmp/google-chrome-stable_current_amd64.deb' && rm '/tmp/google-chrome-stable_current_amd64.deb' && sync 
 + 
 +===== Steam ===== 
 + 
 +  * https://snapcraft.io/steam 
 + 
 +  sudo snap install 'steam'
  
 ====== Settings ====== ====== Settings ======
Line 146: Line 131:
 ===== Keyboard Shortcuts ===== ===== Keyboard Shortcuts =====
  
-  bash -c "secret-tool lookup 'keepass' 'default' | keepassxc --pw-stdin ~/'Documents/keepass.kdbx'"+<code>bash -c "secret-tool lookup 'keepass' 'default' | keepassxc --pw-stdin ~/'Documents/keepass.kdbx'"</code>
  
-  gnome-terminal --command "sudo sh -c 'apt update && apt full-upgrade -y && apt clean && apt autoremove -y && sync && fwupdmgr refresh && fwupdmgr update --verbose && snap refresh && rm -Rfv '/usr/lib/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 && sleep '2''"+<code>gnome-terminal --command "sudo sh -c 'apt update && apt full-upgrade -y && apt clean && apt autoremove -y && sync && snap refresh && wget -O '/tmp/sb-hosts' 'https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts' && mv --force '/tmp/sb-hosts' '/etc/hosts' && sync && fstrim --all --verbose && sync && sleep '5''"</code>
  
 ==== Keys ==== ==== Keys ====
Line 155: Line 140:
  
   * Ctrl + Alt + Z   * Ctrl + Alt + Z
-  * Pause or F7+  * Menu
  
 ===== Printer ===== ===== Printer =====
Line 161: Line 146:
   * http://localhost:631/admin   * http://localhost:631/admin
  
-  * Output Mode: Black Only Grayscale +  * Printer name can be ''Ctrl + F'''d 
-  * Print QualityHigh-Resolution Photo+  * :!: AppSocket/HP JetDirect -> HP -> HP Officejet Pro 8710, hpcups (en) ((single ''en'' **not** ''en, en'')) 
 +  * Color Mode: Device Gray
   * Administration -> Set As Server Default   * Administration -> Set As Server Default
  
   socket://192.168.1.164:9100   socket://192.168.1.164:9100
  
-===== gedit =====+  Kole
  
-  * 4 Tab width +  HP Officejet Pro 8710
-  * Insert Spaces for Tab mode+
  
-===== Network =====+==== Info ====
  
-==== DNS ====+  * :!: ''HP Officejet Pro 8710, hpcups 3.23.5'' 4 ''(en)'' 
 +  * With Firefox, do ''Inspect'' 
 +  * Last one is ''drv'' 
 +  * https://access.redhat.com/solutions/6971890 implies the ''drv'' path is the modern choice 
 +  * :!: The IPP option //sometimes// print blurry documents; CUPS says old non-IPP drivers will be deprecated eventually
  
-=== UncensoredDNS ===+===== Network =====
  
-  * https://blog.uncensoreddns.org/+  * See [[notes:dns_servers]] for other servers
  
-  89.233.43.71,91.239.100.100+<code>Wraeclast</code>
  
-  2a01:3a0:53:53::,2001:67c:28a4::+<code>9.9.9.9,149.112.112.112</code>
  
-=== OpenNIC Anycast === +<code>2620:fe::fe,2620:fe::9</code>
- +
-  * https://wiki.opennic.org/start#anycast_tier_2_dns_resolvers +
- +
-  185.121.177.177,169.239.202.202 +
- +
-  2a05:dfc7:5::53,2a05:dfc7:5::5353 +
- +
-==== VPN.AC ==== +
- +
-  * See [[information:vpn.ac|VPN.AC]] +
-  * :!: If using this VPN, disable IPv6 from NetworkManager +
- +
-===== Nautilus ===== +
- +
-  * Sort folders before files +
-  * 4096 MB File Previews+
  
 ===== Rhythmbox ===== ===== Rhythmbox =====
  
-  * See [[Information:Internet Radio]]+  * See [[Information:Internet Radio|Internet Radio]]
  
 ===== Terminal ===== ===== Terminal =====
Line 210: Line 183:
   * 10-notch Transparency   * 10-notch Transparency
  
-===== GRUB =====+===== Fan Profile =====
  
-****+  https://www.dell.com/support/kbdoc/en-us/000177768/guide-to-dell-power-manager
  
-  sudo -'/etc/default/grub' && sudo update-grub+  sudo apt install 'smbios-utils-y && sudo smbios-thermal-ctl --set-thermal-mode='performance' && sudo apt purge 'smbios-utils' -y
  
-==== Old Parameters ====+===== Kernel Options =====
  
-  * See [[notes:kernel_parameters|Kernel Parameters]] for older options+==== Intel Perf Counters ====
  
-==== GRUB ====+  * https://wiki.archlinux.org/title/intel_graphics#Enable_performance_support
  
-****+=== i915 Early-load ===
  
-  GRUB_TIMEOUT=1+  * https://forum.manjaro.org/t/cant-change-dev-i915-perf-stream-paranoid-to-0/66339/10
  
-==== Corsair USB Quirks ====+  echo 'i915' | sudo tee --append '/etc/modules' > '/dev/null' && cat '/etc/modules' | grep 'i915'
  
-  * https://github.com/ckb-next/ckb-next/wiki/Troubleshooting#usbhid-quirks+  sudo update-initramfs -k 'all' -c
  
-  usbcore.quirks=1b1c:1b38:gn,1b1c:1b3c:gn+=== sysctl ===
  
-==== blk_mq ====+  * ''dev.i915.perf_stream_paranoid'' ''0''
  
-****+  echo 'dev.i915.perf_stream_paranoid=0' | sudo tee '/etc/sysctl.d/99-i915-perf.conf' > '/dev/null' && cat '/etc/sysctl.d/99-i915-perf.conf'
  
-  scsi_mod.use_blk_mq=y dm_mod.use_blk_mq=y+  sysctl 'dev.i915.perf_stream_paranoid'
  
-==== Reboot ====+==== Swappiness ====
  
-  * ''efi'' is for UEFI systems +  * ''vm.swappiness'' ''0''
-  * ''pci'' is for Legacy systems and Coreboot with SeaBIOS payload +
-  * There are other values possible should either of those not work+
  
-  reboot=pci+  echo 'vm.swappiness=0' | sudo tee '/etc/sysctl.d/99-swappiness.conf' > '/dev/null' && cat '/etc/sysctl.d/99-swappiness.conf'
  
-  reboot=efi+  sysctl 'vm.swappiness' && cat '/proc/sys/vm/swappiness'
  
-==== PCIe ASPM ====+===== GRUB =====
  
-****+==== Config ====
  
-  pcie_aspm=force+  * :!: [[notes:kernel_parameters|More Kernel Parameters]] 
 +  * Add options in ''GRUB_CMDLINE_LINUX_DEFAULT=''
  
-==== dyntick-idle Disable ====+  sudo -e '/etc/default/grub' && sudo update-grub
  
-  * KGPE-D16's [[https://www.coreboot.org/Board:asus/kgpe-d16#Installation_Notes|Coreboot installation notes]] mention needing this for better power saving +==== Spinesnap ====
-  * Specific to Nightwane+
  
-  nohz=on+  * Last updated: 2023/12/13 
 +  * ''GRUB_CMDLINE_LINUX='' 
 +  * :!: 2023/12/13: Enable Virtualization in BIOS in order to get x2apic enabled; ''iommu=pt'' disables IOMMU
  
-==== intel_iommu ====+  sudo -e '/etc/default/grub' && sudo update-grub
  
-  * Specific to Spinesnap+<code>acpi_osi='Linux' iommu='pt' pci='pcie_bus_perf,realloc,pcie_scan_all,big_root_window' reboot='pci' video='HDMI-A-1:1920x1080@74' i915.enable_guc='3'</code>
  
-  intel_iommu=on+===== GNOME =====
  
-==== i915 ====+==== Extensions ====
  
-  * Applicable on a Lenovo T500 ((Spinesnap))+  * https://extensions.gnome.org/extension/545/hide-top-bar/
  
-  i915.enable_fbc=1 i915.fastboot=1+==== External Monitor Settings ====
  
-==== amdgpu ====+  * This copies the configured monitor settings from the current user to ''gdm'' and also applies it to the log-in screen 
 +  * Notably useful for setting a laptop's built-in screen as disabled for the log-in screen
  
-****+  sudo cp ~/'.config/monitors.xml' ~gdm/'.config/monitors.xml' && sudo chown 'gdm':'gdm' ~gdm/'.config/monitors.xml'
  
-  amdgpu.deep_color=1+=== Undo ===
  
-=== Overdrive ===+****
  
-  * Allows use of Overdrive options for overclocking+  sudo rm ~gdm/'.config/monitors.xml' && sync
  
-  amdgpu.ppfeaturemask=0xffffffff+==== Tweaks ====
  
-  cat '/sys/module/amdgpu/parameters/ppfeaturemask' | grep '4294967295'+  sudo -e '/etc/profile.d/99-tweaks.sh'
  
-==== Blacklist Watchdogs ====+<code> 
 +# Mutter 
 +export MUTTER_DEBUG_ENABLE_ATOMIC_KMS='0' 
 +export MUTTER_DEBUG_FORCE_KMS_MODE='simple'
  
-  * ''iTCO_wdt'' controls watchdog on some Intel platforms +# Clutter 
-  ''sp5100_tco'' controls watchdog on some AMD platforms +export CLUTTER_PAINT='disable-dynamic-max-render-time'
-  * ''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+# Mesa 
 +export MESA_DISK_CACHE_SINGLE_FILE='1' 
 +export MESA_DISK_CACHE_DATABASE='1' 
 +export MESA_DISK_CACHE_COMBINE_RW_WITH_RO_FOZ='1' 
 +export VAAPI_MPEG4_ENABLED='1'
  
-==== Backlight ==== +End</code>
- +
-  * https://www.freedesktop.org/software/systemd/man/kernel-command-line.html#systemd.restore_state= +
-  * This prevents systemd from restoring previous backlight value on reboot +
-  * This is necessary for [[#power_management|Power Management]] +
- +
-  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/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' +
- +
-  sudo -e '/etc/gdm3/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 ==== ==== Settings ====
Line 329: Line 281:
 === All-in-one === === All-in-one ===
  
-  * Last updated: 2019/04/19+  * Last updated: 2023/12/13
  
-  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'+  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.wm.preferences' 'focus-mode' 'click' && gsettings set 'org.gnome.desktop.wm.preferences' 'disable-workarounds' 'true' && gsettings set 'org.gnome.desktop.interface' 'clock-show-weekday' 'true'
  
 === Individual === === Individual ===
  
-  * Last updated: 2019/04/19+  * Last updated: 2023/12/13 
 + 
 +  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 355: Line 309:
   gsettings set 'org.gnome.desktop.interface' 'clock-show-date' 'true'   gsettings set 'org.gnome.desktop.interface' 'clock-show-date' 'true'
  
-  gsettings set 'org.gnome.software' 'download-updates' 'false'+  gsettings set 'org.gnome.desktop.wm.preferences' 'focus-mode' 'click' 
 + 
 +  gsettings set 'org.gnome.desktop.wm.preferences' 'disable-workarounds' 'true' 
 + 
 +  gsettings set 'org.gnome.desktop.interface' 'clock-show-weekday' 'true'
  
 ===== KeePassXC ===== ===== KeePassXC =====
Line 362: Line 320:
  
   * General -> [ ] Load previous databases on startup   * General -> [ ] Load previous databases on startup
 +  * Security -> [x] Use DuckDuckGo service to download website icons
  
 ==== Add Database Password to GNOME Keyring ==== ==== Add Database Password to GNOME Keyring ====
Line 369: Line 328:
   secret-tool store --label='KeePass' 'keepass' 'default'   secret-tool store --label='KeePass' 'keepass' 'default'
  
-===== mpv =====+===== lm_sensors =====
  
-  * https://wiki.archlinux.org/index.php/mpv#High_quality_configurations+  sudo sensors-detect --auto
  
-  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'+  sudo -e '/etc/modules'
  
-===== NetworkManager =====+===== mpv =====
  
-  ''wifi.powersave'' is set to ''3'' in ''/etc/NetworkManager/conf.d/default-wifi-powersave-on.conf'' +  mkdir -p ~/'.config/mpv&& nano ~/'.config/mpv/mpv.conf'
-  * :!: ''ethernet.cloned-mac-address=random'' breaks USB Tethering with iOS/iPhones +
- +
-  sudo -e '/etc/NetworkManager/conf.d/99-custom.conf'+
  
 <code> <code>
-[device-mac-randomization] +save-position-on-quit 
-wifi.scan-rand-mac-address=yes +sub-auto=fuzzy 
- +force-window=yes 
-[connection-mac-randomization] +profile=gpu-hq 
-ethernet.cloned-mac-address=random +scale=ewa_lanczossharp 
-wifi.cloned-mac-address=random +cscale=ewa_lanczossharp 
- +video-sync=display-resample 
-[connection] +interpolation 
-wifi.powersave=2</code>+tscale=oversample 
 +hwdec=vaapi 
 +hwdec-codecs=all</code>
  
 ===== Laptop Power Management ===== ===== Laptop Power Management =====
Line 399: Line 357:
 ===== Secure Shell ===== ===== Secure Shell =====
  
-  * See [[Clients:Secure Shell]]+  * See [[clients:secure_shell|Client]] notes to generate/restore public key
  
-===== Solo Key =====+===== Uncomplicated Firewall =====
  
-==== Information ====+  * See [[notes:ufw|ufw]] for more notes
  
-  * https://solokeys.com/ +  sudo ufw reset && sudo ufw default deny && sudo ufw logging off && sudo ufw enable && sudo systemctl enable 'ufw'
-  * Usable as authentication for GDM and ''sudo''+
  
-==== PAM ====+  sudo ufw allow 'ssh'
  
-=== Dependencies ===+===== Drive Maintenance =====
  
-**** +==== Trim ====
- +
-  sudo dnf install pamu2fcfg pam-u2f +
- +
-=== Centralized Key ===+
  
 **** ****
  
-  pamu2fcfg > ~/'u2f_keys' && sudo mv ~/'u2f_keys' '/etc/u2f_mappings'+  sudo systemctl enable 'fstrim.timer--now && sudo systemctl start 'fstrim&& sync && sudo systemctl status 'fstrim-l
  
-=== GDM ===+===== UTC =====
  
-  * Add to line 2, under the ''pam_selinux_permit.so'' entry+  * [[https://wiki.archlinux.org/index.php/System_time#Time_standard|System time - ArchWiki]] 
 +  * Set RTC to UTC 
 +  * :!: Needed if Windows is installed first 
 +  * :!: Windows should also be set to UTC
  
-  sudo -e '/etc/pam.d/gdm-password'+  sudo timedatectl set-local-rtc '0'
  
-  auth sufficient pam_u2f.so authfile=/etc/u2f_mappings cue +==== Verify ====
- +
-=== 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 +
- +
-===== Swappiness ===== +
- +
-  echo "vm.swappiness=10" | sudo tee '/etc/sysctl.d/99-swappiness.conf' > '/dev/null' && cat '/etc/sysctl.d/99-swappiness.conf' +
- +
-  cat '/sys/fs/cgroup/memory/memory.swappiness' +
- +
-===== 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' +
- +
-===== Uncomplicated Firewall ===== +
- +
-==== General ====+
  
 **** ****
  
-  sudo ufw reset && sudo ufw default deny && sudo ufw logging off && sudo ufw enable && sudo systemctl enable 'ufw' +  timedatectl | grep local
- +
-==== SSH ==== +
- +
-**** +
- +
-  sudo ufw reset && sudo ufw default deny && sudo ufw logging off && sudo ufw allow 'ssh' && sudo ufw enable && sudo systemctl enable 'ufw' +
- +
-===== TRIM ===== +
- +
-==== Swap ==== +
- +
-  * Add ''discard'' after ''defaults'' for the ''swap'' mountpoint ((defaults,discard)) +
-  * According to the ''swapon'' man page, setting this in ''fstab'' is acceptable +
- +
-  sudo -e '/etc/fstab' +
- +
-  ,discard +
- +
-==== Service ==== +
- +
-  * TODO: This may already exist in cron, verify +
- +
-  sudo systemctl enable 'fstrim.timer' --now && sudo systemctl start 'fstrim' && sync && sudo systemctl status 'fstrim' -l+
  
 ===== Wine ===== ===== Wine =====
Line 486: Line 394:
   * See [[notes:wine|Wine]]   * See [[notes:wine|Wine]]
  
-====== Computer-specific ======+===== Wayland =====
  
-===== Nightwane =====+==== Full RGB HDMI ====
  
-==== Volume ====+  * See [[notes:proptest_full_rgb]] for more ports
  
-  * https://askubuntu.com/a/886908 +  sudo apt install 'libdrm-tests' -&& sudo -e '/etc/gdm3/PostLogin/Default' && sudo chmod +x '/etc/gdm3/PostLogin/Default&& sync
- +
-  alsamixer --card='1' +
- +
-==== 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 apt install lm-sensors fancontrol && sudo sensors-detect && sudo -e '/etc/fancontrol' && sudo systemctl enable 'fancontrol'+
  
 <code> <code>
-INTERVAL=10 +#!/bin/bash 
-DEVNAME=/sys/class/hwmon/hwmon6=w83795g +proptest -'i915' -'/dev/dri/card'* '103' 'connector' '99' '1
- +proptest -'i915' -'/dev/dri/card''103' 'connector' '107' '4'</code>
-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</code> +
- +
-==== Custom Resolution ==== +
- +
-=== Generate Modeline === +
- +
-  * 4k@60Hz CVT-RB +
-  * Mostly fixes random display glitches +
-  * :!: The ''grep'' here confirms the expected Modeline for my usual display ((if grep reports nothing, use whatever is reported instead)) +
-  * :!: This cannot be used on Wayland currently +
-  * :!: This expects ''amdgpu'' DDX driver to be used ((''modesetting'' has a 4K RB resolution without any settings on Xorg)) +
- +
-  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 mkdir -p '/etc/X11/xorg.conf.d' && sudo -e '/etc/X11/xorg.conf.d/99-graphics.conf' +
- +
-<code> +
-Section "Monitor" +
-    Identifier      "HDMI-A-0" +
-    Modeline "3840x2160R"  533.00  3840 3888 3920 4000  2160 2163 2168 2222 +hsync -vsync +
-    Option          "PreferredMode" "3840x2160R" +
-EndSection</code> +
- +
-===== Deep Color ===== +
- +
-  * The lack-of quotes around ''30'' is intentional and required syntax +
-  * :!: This may cause minor issues with programs not expecting 30-bit color ((GpuTest's fur ring doesn't render right, RS's NXT client's splash screen is gray)) +
-  * :!: May cause GNOME Settings to not work depending on the version of GNOME used +
- +
-  sudo mkdir -p '/etc/X11/xorg.conf.d&& sudo -e '/etc/X11/xorg.conf.d/99-graphics.conf' +
- +
-<code> +
-Section "Screen" +
-    Identifier      "Deep Color Screen" +
-    DefaultDepth    30 +
-EndSection</code> +
- +
-===== Graphics xorg.conf ===== +
- +
-==== intel ==== +
- +
-  sudo apt install 'xserver-xorg-video-intel' -y && sudo mkdir -p '/etc/X11/xorg.conf.d' && sudo -e '/etc/X11/xorg.conf.d/99-graphics.conf' +
- +
-<code> +
-Section "Device" +
-    Identifier      "Intel GPU" +
-    Driver          "intel" +
-    Option          "TearFree"      "disabled" +
-EndSection</code> +
- +
-==== amdgpu ==== +
- +
-  sudo apt install 'xserver-xorg-video-amdgpu' -y && sudo mkdir -p '/etc/X11/xorg.conf.d' && sudo -e '/etc/X11/xorg.conf.d/99-graphics.conf' +
- +
-<code> +
-Section "Device" +
-    Identifier      "AMD GPU" +
-    Driver          "amdgpu" +
-    Option          "TearFree"      "off" +
-EndSection</code> +
- +
-==== radeon ==== +
- +
-  * Expects pre-SI GPUs ((HD6000 series and lower, and non-SI HD7000 series)) +
-  For SI, CIK, and newer GPUs, use ''amdgpu'', along with enabling ''si_support'' and ''cik_support'' respectively for the ''amdgpu'' kernel module ((see ''modinfo -p amdgpu'')) +
- +
-  sudo apt install 'xserver-xorg-video-radeon' -y && sudo mkdir -p '/etc/X11/xorg.conf.d' && sudo -e '/etc/X11/xorg.conf.d/99-graphics.conf' +
- +
-<code> +
-Section "Device" +
-    Identifier      "AMD GPU" +
-    Driver          "radeon" +
-    Option          "TearFree"      "off" +
-    Option          "AccelMethod"   "EXA" +
-EndSection</code> +
- +
-==== 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 +
- +
-<code>    BusID      "PCI:0:2:0"</code> +
- +
-==== Environment Variables ==== +
- +
-  * Enables hardware acceleration and use of WebRenderer +
-  * :!: WebRenderer requires the previous ''MOZ_ACCELERATED'' variable as well +
- +
-  echo -'export MOZ_ACCELERATED=1\nexport MOZ_WEBRENDER=1| sudo tee '/etc/profile.d/firefox-hwaccel.sh''/dev/null' && cat '/etc/profile.d/firefox-hwaccel.sh' +
- +
-==== Default Profile ==== +
- +
-  rm -fv '/tmp/profiles.ini&& nano '/tmp/profiles.ini&& sed -i 's/'CHANGEME'/'$USER'/g' '/tmp/profiles.ini' +
- +
-<code> +
-[General] +
-StartWithLastProfile=1 +
- +
-[Profile0] +
-Name=default +
-IsRelative=1 +
-Path=CHANGEME +
-Default=1</code> +
- +
-==== user.js ==== +
- +
-  * Last updated: 2019/04/05 +
-  * :!: IPv6 is disabled in order to prevent WebRTC from grabbing a IPv6 address even though NetworkManager has it disabled... +
-  * :!: ''media.peerconnection.enabled'' disables WebRTC +
- +
-  rm -fv '/tmp/user.js' && nano '/tmp/user.js' +
- +
-<code> +
-/*********** +
- * 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); +
- +
-/*********** +
- * Privacy * +
- ***********/ +
- +
-user_pref("network.dns.disableIPv6", true); +
-user_pref("media.peerconnection.enabled", false);+
  
-/******* +====== Firefox ======
- * END * +
- *******/</code>+
  
-==== Apply Settings ====+  * See [[notes:firefox|Firefox]] if old configuration is needed, otherwise use Firefox Sync 
 +  * https://wiki.archlinux.org/title/Firefox/Privacy
  
-  * ''Path'' should report the current user's username, and the text ''Custom Stuff'' should be visible+===== about:config =====
  
-  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+  * See [[notes:firefox#aboutconfig|about:config]]
  
 ===== Extensions ===== ===== Extensions =====
  
-==== Startpage.com ====+  * [[https://addons.mozilla.org/en-US/firefox/addon/decentraleyes/|Decentraleyes]] 
 +  * [[https://addons.mozilla.org/en-US/firefox/addon/ublock-origin/|uBlock Origin]]
  
-  * https://www.startpage.com/ +<code>gio open 'https://addons.mozilla.org/en-US/firefox/addon/decentraleyes/' 'https://addons.mozilla.org/en-US/firefox/addon/ublock-origin/'</code>
- +
-==== Download ==== +
- +
-  * Decentraleyes +
-  * HTTPS Everywhere +
-  * Privacy Badger +
-  * Cookie AutoDelete +
-  * uBlock Origin +
-  * CanvasBlocker +
- +
-  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' +
- +
-==== Cookie AutoDelete ==== +
- +
-  * [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 ==== ==== uBlock Origin ====
  
-=== Settings ===+==== Filters list ====
  
-  [x] Prevent WebRTC from leaking local IP addresses +****
- +
-=== Filter lists === +
- +
-  [ ] Ads -> EasyList ((uncheck; included in ''Fanboy Ultimate List'')) +
-  [ ] Privacy -> EasyPrivacy ((uncheck; included in ''Fanboy Ultimate List'')) +
- +
-  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+
  
 <code> <code>
 https://www.fanboy.co.nz/fanboy-problematic-sites.txt https://www.fanboy.co.nz/fanboy-problematic-sites.txt
 https://www.fanboy.co.nz/r/fanboy-ultimate.txt https://www.fanboy.co.nz/r/fanboy-ultimate.txt
-https://www.fanboy.co.nz/fanboy-antifacebook.txt +https://www.fanboy.co.nz/fanboy-cookiemonster_ubo.txt 
-https://www.fanboy.co.nz/fanboy-antifonts.txt +https://www.fanboy.co.nz/enhancedstats.txt</code>
-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</code>+
  
-===== Testing Sites ===== +==== My filters ====
- +
-  * https://www.youtube.com/html5 +
-  * https://ipx.ac +
-  * https://decentraleyes.org/test/ +
-  * https://panopticlick.eff.org/ +
-  * https://browserleaks.com/ +
- +
-====== 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 +
- +
-  sudo apt install 'p7zip-full' +
- +
-  7z x -o'D' -y x +
- +
-  7z x -o'/run/media/espionage724/1809 LTSC' -y '/home/espionage724/Downloads/en_windows_10_enterprise_ltsc_2019_x64_dvd_74865958.iso' && sync +
- +
-===== youtube-dl ===== +
- +
-==== Show Formats ==== +
- +
-  * Change ''x'' to a URL +
- +
-  sudo apt install 'youtube-dl' +
- +
-  youtube-dl -F x +
- +
-==== Download Audio-only ==== +
- +
-  * Download the ''m4a'' ''audio only'' format shown from the above command +
-  * The format code is likely ''140'' +
-  * Change ''x'' to a URL +
- +
-  youtube-dl -f 140 x +
- +
-===== Shortcuts ===== +
- +
-  /usr/share/applications +
- +
-  ~/.local/share/applications +
- +
-===== Icons ===== +
- +
-  /usr/share/icons/hicolor +
- +
-  ~/.local/share/icons/hicolor +
- +
-===== Repos ===== +
- +
-  nano '/etc/apt/sources.list' +
- +
-  ls '/etc/apt/sources.list.d' +
- +
-==== Keys ===== +
- +
-=== Check Keys ===+
  
 **** ****
  
-  sudo apt-key list+<code> 
 +! Phoronix as a news source and not a toxic wasteland 
 +! 2023/12/13 
 +www.phoronix.com##.details > .comments 
 +www.phoronix.com##.author 
 +www.phoronix.com##.comments-label 
 +www.phoronix.com###sharebar 
 +www.phoronix.com###social 
 +www.phoronix.com###searchbox 
 +www.phoronix.com##div.popular-list > .comments
  
-=== Remove Keys ===+! Hide RuneScape Wiki clocks 
 +! 2023/12/13 
 +oldschool.runescape.wiki###utcdate > [href="#"
 +oldschool.runescape.wiki###footer-info-lastmod 
 +runescape.wiki##[href="/w/Clock_(interface)"
 +runescape.wiki###footer-info-lastmod
  
-  * ''x'' is the last 8 characters of the ''pub'' for the specific repo+! X, toxic enough for an entire domain block 
 +! 2023/12/13 
 +x.com 
 +twitter.com
  
-  sudo apt-key del x+! End</code>
  
-===== Re-generate Thumbnails =====+===== DNS over HTTPS =====
  
-****+  See [[notes:dns_servers]] for other addresses
  
-  rm -Rf ~/'.cache/thumbnails'+<code>https://dns.quad9.net/dns-query</code>
  
-===== List GNOME gsettings =====+====== Server ======
  
-  * Change ''x'' to schema or omit it to show all settings+  * For workstations that run servers as a secondary directive 
 +  * For headless servers, use [[distros:ubuntu_server|Ubuntu Server]]
  
-  gsettings list-recursively 'x'+===== Automatic Updates =====
  
-===== GNOME Software Maintenance =====+==== Service ====
  
-****+  sudo -e '/etc/systemd/system/ubuntu-up.service'
  
-  pkcon -c '1refresh && pkcon update+<code> 
 +[Service] 
 +Type=oneshot 
 +ExecStartPre='/usr/bin/apt' clean 
 +ExecStart='/usr/bin/apt' update 
 +ExecStart='/usr/bin/apt' full-upgrade -y 
 +ExecStart='/usr/bin/apt' autoremove -y 
 +ExecStartPost='/usr/bin/sync' 
 +ExecStartPost='/usr/bin/systemctl' reboot</code>
  
-===== fstrim =====+===== Timer =====
  
-**** +  03:00 Oak
- +
-  sudo fstrim --verbose --all +
- +
-===== Xorg Debug ===== +
- +
-  journalctl -e _COMM='gdm-x-session' +
- +
-  gio open ~/'.local/share/xorg/Xorg.0.log' +
- +
-===== Verify DRI3 ===== +
- +
-**** +
- +
-  LIBGL_DEBUG='verbose' glxinfo | grep 'libgl' +
- +
-===== GpuTest ===== +
- +
-  * https://www.geeks3d.com/gputest/ +
- +
-==== Execute ==== +
- +
-=== 720p === +
- +
-**** +
- +
-  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' +
- +
-=== 1080p === +
- +
-**** +
- +
-  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' +
- +
-==== 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 apt install 'hdparm' -y && 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 +
- +
-==== Quick-commands ==== +
- +
-=== Standard === +
- +
-  * Performs both ''security-erase'' and ''security-erase-enhanced'' on ''/dev/sda'' +
-  * [[#clean_efi_variables|Cleans EFI variables]] +
- +
-  sudo hdparm --user-master u --security-set-pass 'x' '/dev/sda' && sudo hdparm --user-master u --security-erase 'x' '/dev/sda' && sudo hdparm --user-master u --security-set-pass 'x' '/dev/sda' && sudo hdparm --user-master u --security-erase-enhanced 'x' '/dev/sda' && sync && sudo rm -f '/sys/firmware/efi/efivars/'* || sync && sudo efibootmgr -v +
- +
-=== Dell === +
- +
-  * Performs both ''security-erase'' and ''security-erase-enhanced'' on ''/dev/sda'' ((Removes the first ''security-set-pass'' since this needs to be set ahead of time from firmware settings)) +
-  * [[#clean_efi_variables|Cleans EFI variables]] +
- +
-  sudo hdparm --user-master u --security-erase 'x' '/dev/sda' && sudo hdparm --user-master u --security-set-pass 'x' '/dev/sda' && sudo hdparm --user-master u --security-erase-enhanced 'x' '/dev/sda' && sync && sudo rm -f '/sys/firmware/efi/efivars/'* || sync && sudo efibootmgr -v +
- +
-===== NVMe Erase ===== +
- +
-  sudo apt 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 ==== +
- +
-**** +
- +
-  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'' +
-  * TODO: Fix for Ubuntu +
- +
-  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://askubuntu.com/a/371269 +
- +
-  sudo apt install 'read-edid' +
- +
-  sudo get-edid | parse-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 output port the display is connected to +  sudo -e '/etc/systemd/system/ubuntu-up.timer&& sudo systemctl daemon-reload && sudo systemctl enable 'ubuntu-up.timer--now
-  * ''Modeline'' is from the above generate command, including the text ''Modeline'' +
-  * ''PreferredMode'' is the custom resolution name generated+
  
 <code> <code>
-Section "Monitor" +[Unit] 
-    Identifier  "HDMI-A-0" +Description=Software Package Maintenance and Updater 
-    Modeline x +After=network-online.target 
-    Option      "PreferredMode" "3840x2160R" +Wants=network-online.target
-EndSection</code>+
  
-===== Backlight =====+[Timer] 
 +OnCalendar=*-*-* 03:00:00 
 +Persistent=true
  
-==== Notes ====+[Install] 
 +WantedBy=timers.target</code>
  
-  * The following commands with an asterisk expect only one backlight controller at ''/sys/class/backlight'' +====== Notable Folders and Commands ======
-  * 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' +
- +
-===== 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 ''x'' in ''x.7z'' to the desired archive name +
-  * Change ''CHANGEME'' in ''-pCHANGEME'' to the desired password +
- +
-  sudo apt install 'p7zip-full' +
- +
-  7za a 'x.7z' -p'CHANGEME' +
- +
-===== oathtool ===== +
- +
-  * ''x'' is a secret without ''&digits=6'' +
- +
-  sudo apt install 'oathtool' +
- +
-  oathtool --totp -b 'x' +
- +
-===== Remove EXIF data =====+
  
-  sudo apt install 'libimage-exiftool-perl'+  * See [[notes:misc_linux]]
  
-  exiftool -all= *.* -overwrite_original 
/var/www/wiki/data/pages/distros/ubuntu_desktop.txt · Last modified: 2024/02/06 16:34 by Sean Rhone