User Tools

Site Tools


notes:misc_linux

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
notes:misc_linux [2023/03/12 20:10] Sean Rhonenotes:misc_linux [2024/03/29 18:49] Sean Rhone
Line 15: Line 15:
   7z x -o'/run/media/espionage724/LTSC 2019' -y '/home/espionage724/Downloads/en_windows_10_enterprise_ltsc_2019_x64_dvd_be3c8ffb.iso' && sync && sync   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 ======+====== yt-dlp ======
  
-  * https://ytdl-org.github.io/youtube-dl/index.html+  * https://github.com/yt-dlp/yt-dlp
  
 ===== Download ===== ===== Download =====
Line 23: Line 23:
 **** ****
  
-  rm -f '/tmp/youtube-dl' && wget -O '/tmp/youtube-dl' 'https://yt-dl.org/downloads/latest/youtube-dl' && chmod +x '/tmp/youtube-dl'+  rm -f '/tmp/yt-dlp' && wget -O '/tmp/yt-dlp' 'https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp' && chmod +x '/tmp/yt-dlp'
  
 ===== Show Formats ===== ===== Show Formats =====
Line 29: Line 29:
   * Change ''x'' to a URL   * Change ''x'' to a URL
  
-  '/tmp/youtube-dl' --list-formats x+  '/tmp/yt-dlp' --list-formats x
  
 ===== Download Media ===== ===== Download Media =====
Line 36: Line 36:
   * ''bestaudio'' can be changed to ''bestvideo'' for just video, or ''best'' for best video with audio   * ''bestaudio'' can be changed to ''bestvideo'' for just video, or ''best'' for best video with audio
  
-  '/tmp/youtube-dl' --extract-audio --format 'bestaudio' x+  '/tmp/yt-dlp' --extract-audio --format 'bestaudio' x
  
 ==== M4A Audio ==== ==== M4A Audio ====
Line 42: Line 42:
   * Ideally for if iOS devices will be involved   * Ideally for if iOS devices will be involved
  
-  '/tmp/youtube-dl' --extract-audio --format 'bestaudio' --audio-format 'm4a' x+  '/tmp/yt-dlp' --extract-audio --format 'bestaudio' --audio-format 'm4a' x
  
 ==== MP3 Audio ==== ==== MP3 Audio ====
Line 48: Line 48:
 **** ****
  
-  '/tmp/youtube-dl' --extract-audio --format 'bestaudio' --audio-format 'mp3' x+  '/tmp/yt-dlp' --extract-audio --format 'bestaudio' --audio-format 'mp3' x
  
 ====== Shortcuts ====== ====== Shortcuts ======
Line 98: Line 98:
  
   sudo dnf remove *5.3.7* && sync   sudo dnf remove *5.3.7* && sync
 +
 +====== openSUSE ======
 +
 +===== Zypper =====
 +
 +==== Find Orphans ====
 +
 +****
 +
 +  zypper packages --orphaned
 +
 +==== Remove Package and Deps ====
 +
 +****
 +
 +  sudo zypper remove --clean-deps 'x'
 +
 +==== Show Installed Patterns ====
 +
 +****
 +
 +  sudo zypper patterns --installed-only
 +
 +==== Folder ====
 +
 +****
 +
 +  ls '/etc/zypp/repos.d'
 +
 +==== List ====
 +
 +****
 +
 +  zypper repos --priority
 +
 +====== Firewalld ======
 +
 +===== List Active Rules =====
 +
 +****
 +
 +  sudo firewall-cmd --list-all
 +
 +===== List Available Services =====
 +
 +****
 +
 +  sudo firewall-cmd --get-services
 +
 +===== Show Service Info =====
 +
 +  * Change ''x'' to name of a service from above
 +  * This shows what ports and protocols a service covers
 +
 +  sudo firewall-cmd --info-service=x
 +
 +===== Reload =====
 +
 +****
 +
 +  sudo firewall-cmd --reload
 +
 +===== Add/Remove Service =====
 +
 +  * Add ''--permanent'' as-needed to allow the rule to persist
 +
 +  sudo firewall-cmd --add-service=x
 +
 +  sudo firewall-cmd --remove-service=x
 +
 +===== Add/Remove Port =====
 +
 +  * Add ''--permanent'' as-needed to allow the rule to persist
 +  * Change ''tcp'' to ''udp'' as-needed
 +
 +  sudo firewall-cmd --add-port=x/tcp
 +
 +  sudo firewall-cmd --remove-port=x/tcp
  
 ====== PipeWire ====== ====== PipeWire ======
  
-===== Copy Main Config =====+===== Set Default Rate ===== 
 + 
 +  mkdir -p ~/'.config/pipewire/pipewire.conf.d' && nano ~/'.config/pipewire/pipewire.conf.d/99-custom.conf' 
 + 
 +<code> 
 +context.properties = { 
 +    default.clock.rate          = 192000 
 +    default.clock.allowed-rates = [ 44100 48000 88200 96000 192000 ] 
 +}</code> 
 + 
 +===== User Config =====
  
   * Copy main config to user folder   * Copy main config to user folder
  
-  mkdir -p ~/'.config/pipewire/pipewire.conf.d'+  mkdir -p ~/'.config/pipewire/pipewire.conf.d' && cp '/usr/share/pipewire/pipewire.conf' ~/'.config/pipewire/pipewire.conf.d/99-custom.conf'
  
-  cp '/usr/share/pipewire/pipewire.conf' ~/'.config/pipewire/pipewire.conf.d/99-custom.conf'+  nano ~/'.config/pipewire/pipewire.conf.d/99-custom.conf'
  
 ===== Read Main Config ===== ===== Read Main Config =====
 +
 +  * [[https://github.com/PipeWire/pipewire/blob/master/src/daemon/pipewire.conf.in|pipewire.conf.in]]
  
   gio open '/usr/share/pipewire/pipewire.conf'   gio open '/usr/share/pipewire/pipewire.conf'
Line 115: Line 205:
   nano '/usr/share/pipewire/pipewire.conf'   nano '/usr/share/pipewire/pipewire.conf'
  
-===== Edit User Config =====+===== WirePlumber Settings Reset =====
  
-  mkdir -~/'.config/pipewire/pipewire.conf.d'+  sudo rm -Rf ~gdm/'.local/state/wireplumber' ~/'.local/state/wireplumber'
  
-  nano ~/'.config/pipewire/pipewire.conf.d/99-custom.conf'+  rm -Rf ~/'.local/state/wireplumber'
  
 ====== GPG Keys ====== ====== GPG Keys ======
Line 170: Line 260:
  
   sudo touch '/.autorelabel'   sudo touch '/.autorelabel'
 +
 +====== tracker3 Reset ======
 +
 +****
 +
 +<code>tracker3 reset --filesystem --rss</code>
  
 ====== GNOME Monitors Reset ====== ====== GNOME Monitors Reset ======
Line 187: Line 283:
   journalctl -e _COMM='gdm-x-session'   journalctl -e _COMM='gdm-x-session'
  
-  gio open ~/'.local/share/xorg/Xorg.1.log'+  gio open ~/'.local/share/xorg/Xorg.0.log' 
 + 
 +  mousepad '/var/log/Xorg.0.log'
  
 ====== Verify DRI3 ====== ====== Verify DRI3 ======
Line 289: Line 387:
 ===== Create Software RAID ===== ===== Create Software RAID =====
  
-  * :?Came from old notes; I **assume** this worked at some pointbut in any case, the syntax looks nice :p+==== Fedora Anaconda ==== 
 + 
 +  * :!https://bugzilla.redhat.com/show_bug.cgi?id=1897350 
 +  * Compared to old notes, the RAID device needs to be under ''/dev/md/'' instead of just ''/dev/'' to appear on Anaconda 
 +  2024/01: On the computer this was tested on ((Dell Latitude 5591))it doesn't support CSM/Legacy/BIOS boot and this takes over the entire block devicesrequiring the ''/boot'' partition and boot partition flag to be on a SD Card ((only tested with Legacy External Boot; UEFI untested but theoretically also requires ''/boot'' on a SD Card since BIOS/firmware can't directly-read software RAID)) 
 + 
 +  sudo mdadm --create '/dev/md/raid0' --name='RAID' --level='0' --raid-devices='2' '/dev/nvme0n1' '/dev/sda' --verbose 
 + 
 +==== Old ==== 
 + 
 +  * :?: Came from old notes; this used to work for an Acer Predator laptop that had 3 SSDs
  
   sudo mdadm --create '/dev/md0' --name='RAID' --level='0' --raid-devices='3' '/dev/sda' '/dev/sdb' '/dev/sdc' --verbose   sudo mdadm --create '/dev/md0' --name='RAID' --level='0' --raid-devices='3' '/dev/sda' '/dev/sdb' '/dev/sdc' --verbose
 +
 +====== Fix MacBook Battery CPU Throttling ======
 +
 +  * 2023/07/17: This solves a MacBook Pro Mid-2010 with Intel C2D from being stuck at 1.5GHz CPU due to a missing internal battery, by unlocking full-performance
 +
 +  sudo dnf install 'msr-tools'
 +
 +  sudo wrmsr --all '0x1A0' '0x4000850089'
 +
 +===== Verify =====
 +
 +  * ''0x4000850089'' is the expected value
 +
 +  sudo rdmsr --all '0x1A0'
  
 ====== VGA Switcheroo Power States ====== ====== VGA Switcheroo Power States ======
Line 301: Line 423:
 ====== ACPI Tables ====== ====== ACPI Tables ======
  
 +****
 +
 +  sudo strings '/sys/firmware/acpi/tables/DSDT' | grep -i 'windows ' | sort
 +
 +===== Old Method =====
 +
 +  * Provides more information as to what certain ''_OSI'' values do and how they compare
   * In ''dsdt.dsl'', look for ''_OSI'' values, along with ''Windows'' and ''Linux''   * In ''dsdt.dsl'', look for ''_OSI'' values, along with ''Windows'' and ''Linux''
  
Line 367: Line 496:
  
   * See [[notes:backlight]]   * See [[notes:backlight]]
- 
-====== 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 ====== ====== HT/SMT Information ======
Line 387: Line 510:
  
 ====== Privacy ====== ====== Privacy ======
- 
  
 ===== Clear Terminal History ===== ===== Clear Terminal History =====
Line 408: Line 530:
  
   * ''x'' is a secret without ''&digits=6''   * ''x'' is a secret without ''&digits=6''
 +
 +  sudo apt install 'oathtool'
  
   sudo dnf install 'oathtool'   sudo dnf install 'oathtool'
Line 414: Line 538:
  
 ===== Remove EXIF data ===== ===== Remove EXIF data =====
 +
 +  sudo apt install 'libimage-exiftool-perl'
  
   sudo dnf install 'perl-Image-ExifTool'   sudo dnf install 'perl-Image-ExifTool'
 +
  
   exiftool -all= *.* -overwrite_original   exiftool -all= *.* -overwrite_original
  
/var/www/wiki/data/pages/notes/misc_linux.txt · Last modified: 2024/04/29 18:38 by Sean Rhone