Random OS Bullshit
removes audio PCI-E device and then re-scans for it
echo 1 > /sys/bus/pci/devices/0000\:00\:1f.3/remove
echo 1 > /sys/bus/pci/rescan
Run on Resume
to have a script run on resume from suspend/hibernate copy it to /lib/systemd/system-sleep/
udevadm control --reload-rules && udevadm trigger
Requires Secure Boot to be disabled (Nvidia)
for nvidia prorietary drivers to work for a lot of distros past kernel 5.18 in kernal command arguments ibt=off
needs to be set.
huh envycontrol
just kinda works for switching gpus
solution was in /etc/default/grub
adding nomodeset
to LINUX_CMDLINE_DEFAULT=
prefereably just use an linux-nvidia
type kernel image
https://reddit.com/r/linux/comments/xcikym/tutorial_how_to_enable_hardware_video/
if you have a nested tmux session to get tmux commands into the inner session use the prefix key twice before you do ur tmux command
for rsync syntax like rsync <1>/<2>/<3> <dest>:<4>
it will copy copy <1>
, and <2>
to the destination folder not just <3>
, u need to run a cd <1>/<2>/
then a your rsync <3> <dest>:<4>
`
so if ur not running NetworkManager
and /etc/netplan/
is empty all network devices will show up as off in networkctl
add ignore-carrier: true
to netplan for each interface you want to have ignore the waiting for ip to get leased
to use a linux machine as a gateway where Internet ---- Linux machine ---- ur machine
u need somewhere in nmcli connection show <wired connection>
to have the field ipv4.method
be set to shared
and on ur machine u need to set ur ip to one under the subnet of the Linux machine
with the ipv4.routes
and ipv4.gateway
set to the ip of the Linux machine
u can do it without shared u just need to set routes for all child machines off ur Linux machine (edited)
nmcli connection add con-name direct ipv4.gateway 10.42.0.1 ipv4.addresses 10.42.0.2/24 ipv4.method manual ipv4.routes 10.42.0.1 type ethernet
example command for ur machine
for u master machine a command like nmcli connection add con-name children ipv4.addresses 10.42.0.1/24 ipv4.method shared master <the interface device like eno1> type ethernet
should work
its a bit different if u do it through netplan
since u have to manually set the routes not do the ipv4.method shared
arg
No swtich Network Topologies RedHat setting statuc routes
sudo -S
lets u pipe in the password from stdin
force update/rebuold qt5-styleplugins
if u want to retain metadata when converting from .ogg
to .mp3
with ffmpeg
u'll need to add these args -map 0 -map_metadata 0:s:0 -id3v2_version 3 -write_id3v1
:))
if discord wants you to update, just sudoedit /opt/discord/resources/build_info.json
and increment the version
field
for qt apps to follow ur gtk icon theme rather than forcing it to follow ur gtk theme with export QT_QPA_PLATFORMTHEME="gtk2"
use export QT_QPA_PLATFORMTHEME="qt5ct"
and use the qt5ct
package to set it to follow gtk2
which lets u set the icon theme separately
echo 0 > /sys/devices/system/cpu/cpu#/online
will disable a cpu core
note: u cant disable cpu0
the most annoying this for reason in udev rules some form environment vars gets messed up so setting up a udev rule to shut down all cores but 2 goes like:
writning the udev rule 60-powerCPUmgmt.rules
to /etc/udev/rules.d/
:
#Rule for switching to BAT0
SUBSYSTEM=="power_supply",ENV{POWER_SUPPLY_ONLINE}=="0", RUN+="/bin/batCPU"
#Rule for switching to AC
SUBSYSTEM=="power_supply",ENV{POWER_SUPPLY_ONLINE}=="1", RUN+="/bin/batCPU"
with batCPU
being:
#!/usr/bin/bash
[[ $(cat /sys/class/power_supply/AC/online) -eq 0 ]] && \
(for i in $(seq 2 11); do echo 0 > /sys/devices/system/cpu/cpu$i/online; done) || \
(for i in $(seq 1 11); do echo 1 > /sys/devices/system/cpu/cpu$i/online; done)
where 11 is whatever the max cpu index on your device is
I would use nproc
to determin the max cpu dynamically but udev shits itself and will only stop cores 2-6
Systemd Service for on Startup
[Unit]
Description=Enables X number of Cpus dependant on power state
[Service]
Type=simple
RemainAfterExit=yes
Execstart=/bin/batCPU
[Install]
WantedBy=default.target
if you come across a invalid or corrupted package (PGP signature)
or something along those lines run a pacman -S archlinux-keyring
and then pacman -Syu
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
- install openssh server with
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
- start and enable the sshd service with
Start-Service sshd
andSet-Service -Name sshd -StartupType 'Automatic'
- allow it through the firewall
New-NetFirewallRule -Name 'OpenSSH-Server-In-TCP' -DisplayName 'OpenSSH Server (sshd)' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22
now openssh is installed on your client machine - copy ur ssh key with
scp id_rsa.pub <user>@<hostname/ip>:%programdata%/ssh
- now ssh into the windows machine from ur client machine and
cd %programdata%/ssh
- run
type id_rsa.pub >> administrators_authorized_keys
now u'll need a cli editor like vim or nano refer to [[Linux bullshit#Chocolaty Powershell install]] on chocolaty install then runchocolaty install <editor>
- once u have a cli editor run
<editor> sshd_config
and uncomment the line with#PubkeyAuthentication yes
- restart the sshd service with
Restart-Service sshd
within powershell