阅读视图

发现新文章,点击刷新页面。
☑️ ☆

HAGS

Hardware Accelerated GPU Scheduling

硬件加速GPU调度 (Hardware Accelerated GPU Scheduling, HAGS)
对图形性能与GPGPU性能的影响

- 显示设备: Quadro P600 (GP107)
- 呈现设备: Tesla P40   (GP102)
- 风扇全拉满

HAGS - Enabled

KawPowMiner         (CUDA)      19.01 Mh/s
AIDA64 GPGPU        (OpenCL)    gpgpu-hags-enabled.txt
SD WebUI            (CUDA)      6.22 s/it
Cinebench 2024      (CUDA)      4956 pts
----
3DMark Time Spy     (D3D12)     7475 pts
3DMark Fire Strike  (D3D11)     20403 pts
Geek3D FurMark      (OpenGL)    222 fps
osu! Lazer          (D3D11)     - fps, - ms  (帧数与延迟可能稍好于关闭HAGS)


HAGS - Disabled

KawPowMiner         (CUDA)      18.40 Mh/s ± 0.05 Mh/s
AIDA64 GPGPU        (OpenCL)    gpgpu-hags-disabled.txt
SD WebUI            (CUDA)      6.25 s/it
Cinebench 2024      (CUDA)      4927 pts
----
3DMark Time Spy     (D3D12)     7630 pts
3DMark Fire Strike  (D3D11)     19931 pts
Geek3D FurMark      (OpenGL)    217 fps ± 1 fps
osu! Lazer          (D3D11)     - fps, - ms  (帧数与延迟可能稍差于开启HAGS)

AIDA64 GPGPU results analyze

Claude2

这里有两份GPGPU基准测试结果,分别是在开启和关闭 硬件加速GPU调度 (Hardware Accelerated GPU Scheduling, HAGS) 时测得,请分析 HAGS 的开启或关闭对性能产生了怎样的影响。

根据两份测试结果对比,可以看出开启HAGS对GPGPU性能整体有轻微的提升:

1. 内存读写带宽有所提高,Pageable内存读写带宽提升更明显。

2. 单精度浮点运算性能基本无变化。 

3. 双精度浮点运算性能有所下降,特别是double8的下降更明显。

4. 24位和32位整数运算性能略有提高。

5. 64位整数运算性能基本无变化。

6. AES-256加密性能略有提高。

7. SHA-1哈希性能有所下降。

8. 单精度Julia和双精度Mandel性能基本无变化。

9. 大部分测试的运行时间有所减少,编译时间有所增加。

总体来说,HAGS主要优化了内存访问和数据传输相关的性能。对浮点计算性能的影响不大。整数计算有一定提升但也不明显。加密算法性能有轻微改善。哈希算法性能反而略微下降。HAGS能够减少GPU计算的运行时间,但编译耗时会有所增加。

所以可以认为在这个测试中,HAGS对GPGPU应用性能的整体提升较小。它主要对内存密集型应用有正面作用,对计算密集型应用帮助不大。如果应用对内存访问敏感,则开启HAGS可能带来一定收益。但对于计算密集型应用,开启HAGS的优化效果并不明显。
☑️ ⭐

Magisk

Magisk

你的设备:Redmi Note 11 Pro (pissarro)

分区结构:VAB

官方 MIUI 包:https://miuirom.org/phones/redmi-note-11-pro-and-pro-plus

安装

https://www.bilibili.com/read/cv11408968/

安装 Magisk Manager

参见 系统更新 章节,继续操作

系统更新

adb 部分不再赘述,主要为设备侧需开启 adb 授权,PC 侧需安装 platform-tools

系统更新 –> ··· –> 下载最新完整包

这将会下载最新完整包并安装更新,手动重启

不要重启

下载的完整包会保存到本地的一个目录(忘了),安装完成之后重启之前就会自动被删除,不甚方便

可以从这里下载包:https://miuirom.org/phones/redmi-note-11-pro-and-pro-plus

下载最新的 Recovery ROM (即卡刷完整包)

解压 .zip 卡刷包

使用 vm03/payload_dumper 解包 payload.bin

cd C:\Users\jiera\tools\
git clone https://github.com/vm03/payload_dumper.git
cd payload_dumper
pip install -r requirements.txt

# For Full OTA
# This will start to extract the images within the payload.bin file to the output folder you are in.
python payload_dumper.py payload.bin

dump 出来 boot.img 就可以停了,adb push boot.img /sdcard 到设备备用

重启设备,完成系统更新

现在可以同时也更新 Magisk Manager 以重新修补上最新版本的 Magisk

https://github.com/topjohnwu/Magisk/releases

adb install Magisk.v26.3.apk

打开 Magisk Manager –> 安装 –> 选择并修补一个文件 –> 选择刚刚 push 到 /sdcardboot.img

完成后查看日志中的输出文件路径,再把修补好的 boot 给 pull 过来

adb pull /sdcard/Download/magisk_patched-26300_GaeJ6.img .

重启设备至 fastboot

adb reboot bootloader

Flash

fastboot flash boot_a magisk_patched-26300_GaeJ6.img
fastboot flash boot_b magisk_patched-26300_GaeJ6.img
fastboot reboot

系统更新后可以运行 Volt 进行应用编译优化

☑️ ☆

text-generation-webui

text-generation-webui

Usage: Qwen-7B-Chat, Windows

git clone https://github.com/oobabooga/text-generation-webui
cd text-generation-webui

# 避免奇怪的问题:网络畅通,关闭杀软
# 同时还可以在 %USERPROFILE%\pip\pip.ini 中写入如下内容
# [global]
# timeout=60
# retries=999

# 安装
start_windows.bat
# 如果失败,重新运行 update_windows.bat
# start_windows.bat完成后会自动运行 webui,Ctrl+C 停止,继续配置

# 进入 conda 环境
cmd_windows.bat

# pip install xformers
pip install transformers_stream_generator

启动

# 进入 conda 环境
cmd_windows.bat

python server.py --listen --verbose --chat-buttons --loader transformers --trust-remote-code --model Qwen-7B-Chat --settings settings-qwen.yaml
settings-qwen.yaml

text-generation-webui/settings-qwen.yaml

部分配置值参考来源:

  • Qwen-14B-Chat/generation_config.json
  • Qwen-7B-Chat/tokenization_qwen.py
  • https://github.com/oobabooga/text-generation-webui/issues/4086#issuecomment-1739435594
  • https://github.com/oobabooga/text-generation-webui/blob/main/docs/03%20%E2%80%90%20Parameters%20Tab.md

text-generation-webui/settings-qwen.yaml 完整配置:

dark_theme: true
show_controls: true
start_with: ''
mode: instruct
chat_style: cai-chat
prompt-default: QA
prompt-notebook: QA
preset: Divine Intellect
max_new_tokens: 512
max_new_tokens_min: 1
max_new_tokens_max: 4096
seed: -1
negative_prompt: ''
truncation_length: 2048
truncation_length_min: 0
truncation_length_max: 32768
custom_stopping_strings: '"<|im_end|>", "<|endoftext|>"'
auto_max_new_tokens: false
max_tokens_second: 0
ban_eos_token: false
custom_token_bans: ''
add_bos_token: true
skip_special_tokens: false
stream: true
name1: You
character: Assistant
instruction_template: ChatML
chat-instruct_command: |-
  Continue the chat dialogue below. Write a single reply for the character "<|character|>".

  <|prompt|>
autoload_model: false
default_extensions:
- gallery

最核心配置:

custom_stopping_strings: '"<|im_end|>", "<|endoftext|>"'

skip_special_tokens: false

没有这两条配置,模型的回答无法停止并且混乱,像是与自己在对话

解决对话历史记录太多就OOM了的问题

Truncate the prompt up to this length: Used to prevent the prompt from getting bigger than the model's context length. In the case of the transformers loader, which allocates memory dynamically, this parameter can also be used to set a VRAM ceiling and prevent out-of-memory errors. This parameter is automatically updated with the model's context length (from "n_ctx" or "max_seq_len" for loaders that use these parameters, and from the model metadata directly for loaders that do not) when you load a model.
将提示截断至此长度:用于防止提示超过模型的上下文长度。对于动态分配内存的 Transformer 加载程序,此参数还可用于设置 VRAM 上限并防止内存不足错误。当您加载模型时,此参数会使用模型的上下文长度自动更新(对于使用这些参数的加载器,从“n_ctx”或“max_seq_len”,对于不使用这些参数的加载器,直接从模型元数据更新)。

在 WebUI 降低 Truncate the prompt up to this length,测试重新生成,直到降低到不OOM为止

P40 24GB 测试通过:5120 4096

各种修改配置无效后只能选择硬编码:

修改 text-generation-webui/modules/ui_parameters.py 函数 get_truncation_length()

  def get_truncation_length():
    return 5120

Usage: Qwen-14B-Chat, WSL2 Ubuntu, DeepSpeed

git clone https://github.com/oobabooga/text-generation-webui
cd text-generation-webui


# 避免奇怪的问题:网络畅通,关闭杀软
# 同时还可以在 ~/.pip/pip.conf 中写入如下内容
# [global]
# timeout=60
# retries=999

./wsl.sh
# 如果失败,重新运行 ./wsl.sh update
Ctrl+C

./wsl.sh cmd

pip install transformers_stream_generator

pip install tiktoken

安装 deepspeed

./wsl.sh cmd

pip install deepspeed

# 如果报错找不到 nvcc,确保已安装 nvidia-cuda-toolkit (没有安装也可以输入 nvcc 可以获得软件包名称,Ubuntu 特性)
# which nvcc
# ln -s /usr/bin/nvcc /home/jiera/text-generation-webui/installer_files/env/bin/nvcc

安装 mpi4py

sudo apt install libopenmpi-dev

# https://github.com/mpi4py/mpi4py/issues/335#issuecomment-1486366039
find ~ -name ld
find ~ -name ld -delete

pip install mpi4py

修改 /home/jiera/text-generation-webui/modules/models.py 为 DeepSpeed 加载器开启 trust_remote_code=True

Tip: WSL 中可以直接用 code . 在当前目录启动 WSL Remote VSCode

# DeepSpeed ZeRO-3
    elif shared.args.deepspeed:
        model = LoaderClass.from_pretrained(path_to_model, torch_dtype=params['torch_dtype'], trust_remote_code=True)  # <-- 修改这里
        model = deepspeed.initialize(model=model, config_params=ds_config, model_parameters=None, optimizer=None, lr_scheduler=None)[0]
        model.module.eval()  # Inference
        logger.info(f'DeepSpeed ZeRO-3 is enabled: {is_deepspeed_zero3_enabled()}')

修改 /home/jiera/text-generation-webui/installer_files/env/lib/python3.11/site-packages/deepspeed/accelerator/cuda_accelerator.py 的 pin_memory() 函数解决占了一点显存就OOM的问题

https://github.com/microsoft/DeepSpeed/issues/2977#issuecomment-1465866967

    def pin_memory(self, tensor, align_bytes=1):
        print('#################come on', tensor)
        # return tensor.pin_memory()
        return tensor

(其实似乎还可以修改 /home/jiera/text-generation-webui/modules/deepspeed_parameters.pypin_memoryFalse 以达到相同目的)

编辑 deepspeed 配置,位于 /home/jiera/text-generation-webui/modules/deepspeed_parameters.py

https://huggingface.co/docs/transformers/main_classes/deepspeed

Ref: deepspeed 入门_一_ - Iawen’s Blog

  • 禁用 CPU offload 以提升性能
            "zero_optimization": {
                "stage": 3,
                # "offload_param": {
                #     "device": "cpu",
                #     "pin_memory": True
                # },
                "overlap_comm": True,
                "contiguous_gradients": True,
                "reduce_bucket_size": "auto",
                "stage3_prefetch_bucket_size": "auto",
                "stage3_param_persistence_threshold": "auto",
                "stage3_max_live_parameters": "auto",
                "stage3_max_reuse_distance": "auto",
            },

复制之前的 settings-qwen.yaml

降低 truncation_length,位于 text-generation-webui/modules/ui_parameters.py 函数 get_truncation_length()

降低 truncation_length,尤其是要推理 14B 模型时,否则虽然不会 OOM,但是会有更多的显存 offload 到了 CPU RAM 上,大幅降低性能,当然也可以聊得多了新建一个聊天,需要长文本处理再在一个聊天里等着

    def get_truncation_length():
        return 4096  # 可以考虑进一步降低至 2048 以提升性能降低长文本处理能力

配置 .wslconfig

for WSL2

Windows

path: %USERPROFILE%\.wslconfig

https://learn.microsoft.com/en-us/windows/wsl/wsl-config#configuration-setting-for-wslconfig

  • 设置 WSL VM 内存
# Settings apply across all Linux distros running on WSL 2
[wsl2]

# Limits VM memory to use no more than 4 GB, this can be set as whole numbers using GB or MB
# 此处设置为等于主机物理内存大小
memory=64GB

# Sets the VM to use two virtual processors
# processors=2

# Specify a custom Linux kernel to use with your installed distros. The default kernel used can be found at https://github.com/microsoft/WSL2-Linux-Kernel
# kernel=C:\\temp\\myCustomKernel

# Sets additional kernel parameters, in this case enabling older Linux base images such as Centos 6
# kernelCommandLine = vsyscall=emulate

# Sets amount of swap storage space to 8GB, default is 25% of available RAM
# swap=8GB

# Sets swapfile path location, default is %USERPROFILE%\AppData\Local\Temp\swap.vhdx
# swapfile=C:\\temp\\wsl-swap.vhdx

# Disable page reporting so WSL retains all allocated memory claimed from Windows and releases none back when free
# pageReporting=false

# Turn off default connection to bind WSL 2 localhost to Windows localhost
# localhostforwarding=true

# Disables nested virtualization
# nestedVirtualization=false

# Turns on output console showing contents of dmesg when opening a WSL 2 distro for debugging
# debugConsole=true

# Enable experiemntal features
[experimental]
# sparseVhd=true

内存被 WSL VM 占满?

su -c 'sync; echo 1 > /proc/sys/vm/drop_caches'

运行

./wsl.sh cmd

CUDA_VISIBLE_DEVICES=0 deepspeed --num_gpus=1 server.py --deepspeed --listen --verbose --chat-buttons --loader transformers --trust-remote-code --model Qwen-14B-Chat --settings settings-qwen.yaml

参数

https://github.com/oobabooga/text-generation-webui/blob/main/docs/03%20%E2%80%90%20Parameters%20Tab.md

OpenAI API

使用 WebUI 内置的 openai 扩展 来创建模仿 OpenAI API 的替代,接入浏览器插件 josStorer/chatGPTBox (自定义它的 API 地址)

☑️ ⭐

dotfiles-snippet

dotfiles snippet

配置文件片段

.gitconfig

Linux / Windows

path: ~/.gitconfig

  • 信任所有存储库(注意安全)
[safe]
	directory = *

pip.conf / pip.ini

Linux / Windows

path: ~/.pip/pip.conf or %USERPROFILE%\pip\pip.ini

  • 60 秒超时
  • 999 次重试
[global]
timeout=60
retries=999

.wslconfig

for WSL2

Windows

path: %USERPROFILE%\.wslconfig

https://learn.microsoft.com/en-us/windows/wsl/wsl-config#configuration-setting-for-wslconfig

  • 设置 WSL VM 内存
# Settings apply across all Linux distros running on WSL 2
[wsl2]

# Limits VM memory to use no more than 4 GB, this can be set as whole numbers using GB or MB
memory=64GB

# Sets the VM to use two virtual processors
# processors=2

# Specify a custom Linux kernel to use with your installed distros. The default kernel used can be found at https://github.com/microsoft/WSL2-Linux-Kernel
# kernel=C:\\temp\\myCustomKernel

# Sets additional kernel parameters, in this case enabling older Linux base images such as Centos 6
# kernelCommandLine = vsyscall=emulate

# Sets amount of swap storage space to 8GB, default is 25% of available RAM
# swap=8GB

# Sets swapfile path location, default is %USERPROFILE%\AppData\Local\Temp\swap.vhdx
# swapfile=C:\\temp\\wsl-swap.vhdx

# Disable page reporting so WSL retains all allocated memory claimed from Windows and releases none back when free
# pageReporting=false

# Turn off default connection to bind WSL 2 localhost to Windows localhost
# localhostforwarding=true

# Disables nested virtualization
# nestedVirtualization=false

# Turns on output console showing contents of dmesg when opening a WSL 2 distro for debugging
# debugConsole=true

# Enable experiemntal features
[experimental]
# sparseVhd=true
☑️ ☆

Foreign Garbage Hardware vs Cities Skylines II

洋垃圾大战都市天际线2

资源

Thanks for your efforts, RUNE!

(备用) 我下载后上传至网盘的:

SHA512 checksum:

C:\Users\jiera\Downloads\Cities.Skylines.II-RUNE>certutil -hashfile rune-cities.skylines.ii.iso SHA512
SHA512 的 rune-cities.skylines.ii.iso 哈希:
bfa19634f4e73569ac22e569690f0a4c0bcadd7aa9779652c68eb335995f51e4d943504c7e1796eb6680587414690ffff8d7bc60e271cb4f378b4fcd5f115887
CertUtil: -hashfile 命令成功完成。

安装

内容来自 rune.nfo:

      - Extract 
      - Burn or mount the .iso
      - Run setup.exe and install
      - Copy crack from RUNE dir to installdir
      - Play
      

      General Notes:

      - Block the game's exe in your firewall to prevent the game from 
        trying to go online ..
      - If you install games to your systemdrive, it may be necessary
        to run this game with admin privileges instead

注意事项:

  • 注意不要忽略这步:Copy crack from RUNE dir to installdir
  • 如果破解不成功,首先检查上面一条,然后检查是不是杀毒软件把破解补丁删了

配置

Note: 我认为最影响性能的因素标为了粗体字

  • CPU
    • 核心数量: 2* E5-2699 v3, 双处理器共 20C 40T (BIOS关核, 未关核为36C72T)
    • 频率: 解锁全核心频率限制 (鸡血) 至 3.6GHz
  • RAM
    • 容量: 64G
    • 速度: DDR4 2133
  • GPU0 (呈现设备)
    • 性能: Tesla P40 (核心为 GP102)
    • 显存容量: 24GB
    • 显存速度: GDDR5X, 显存位宽 384 bit
  • SSD
    • 容量: ZHITAI TiPlus5000 2TB
    • 速度: PCIe 3.0 x4
  • GPU1 (显示设备)
    • 性能: Quadro P600 (核心为 GP107)
    • 显存容量: GDDR5, 显存位宽 128 bit

启动!

速度

启动速度:约 30s

新游戏加载速度(河谷三角洲;未调整游戏设置):约 22s

热读档速度(读档一次返回到主菜单再重新读这个档的速度):约 8s

标题画面性能

新游戏性能

河谷三角洲;未调整游戏设置

游戏性能

超小型村庄

超小型城镇

☑️ ☆

EndeavourOS

EndeavourOS

Installation

Download and verify iso image: https://endeavouros.com/

Write image, use rufus or ventoy

Boot LiveCD

联网 (VPN热点)

  • 简体中文
  • Asia/Shanghai, 系统语言 区域设置 en_SG
  • 键盘 Chinese Default
  • 桌面环境 GNOME
  • 引导程序 GRUB
  • 无交换分区 ext4
  • 不询问密码自动登录 为管理员账号使用同样的密码

语言

to change it check https://wiki.archlinux.org/index.php/Locale 385

You need to modify the file /etc/locale.gen Uncomment (erase) the # to the languages You want

then run as root

locale-gen

restart x and now you can chose more languages in region and language in Gnome.

重启后会询问是否将标准文件夹更新到当前语言,选择保留当前名称(不在安装时设置中文为的就是这个)

Softwares

yay -S timeshift

yay -S clash-verge-bin clash-meta-bin

(重要)然后参见 #My Server/Vultr.md/###桌面客户端: Clash Verge 进行配置

yay -S localsend-bin

yay -S telegram-desktop

yay -S mpv

yay -S yt-dlp

yay -S aria2

yay -S qbittorrent-enhanced (build from source)

输入法

Input method framework 输入法框架

The most common IMF is IBus (often used in GTK-based environments like GNOME), followed by Fcitx5 (mostly used in Qt-based environments like KDE), Scim, Fcitx, and Uim. Very uncommon ones include Gcin, Nimf and Hime. [1] Additionally, Emacs is a very popular text editor that has its own internal IMF.

最常见的 IMF 是 IBus (通常用于基于 GTK 的环境,如 GNOME ),其次是 Fcitx5 (主要用于基于 Qt 的环境,如 KDE )、 Scim 、 Fcitx 和 Uim 。非常不常见的包括 Gcin 、 Nimf 和 Hime 。 [1] 此外,Emacs 是一种非常流行的文本编辑器,它有自己的内部 IMF。

https://wiki.archlinux.org/title/Input_method

https://wiki.archlinuxcn.org/wiki/IBus

https://github.com/fkxxyz/rime-cloverpinyin/wiki/linux

yay -S ibus ibus-rime

编辑 /etc/environment 设置环境变量,添加以下内容:

GTK_IM_MODULE=ibus
QT_IM_MODULE=ibus
XMODIFIERS=@im=ibus

重启,GNOME设置 -> 键盘 -> 输入源 -> 添加 -> 汉语 -> 中文 Rime

安装 rime-cloverpinyin 输入方案

首先,确认好你所使用的输入法平台,找到对应的 rime 用户资料夹

关于用户资料夹的介绍,详见官方文档: Rime 中的数据文件分布及作用

三款输入法平台的 rime 用户资料夹默认分别在 平台 rime用户资料夹位置 ibus ~/.config/ibus/rime fcitx ~/.config/fcitx/rime fcitx5 ~/.local/share/fcitx5/rime 下载并解压

在 archlinux 下,可以从 AUR 直接安装即可:

yay -S rime-cloverpinyin

在其它发行版下,来发布页 https://github.com/fkxxyz/rime-cloverpinyin/releases 或 https://fkxxyz.lanzous.com/b00zl958j 下载最新版本的配置文件,如 clover.schema-1.1.0.zip

然后将其解压到用户资料夹 切换到该输入方案

在用户资料夹下创建 default.custom.yaml ,内容为

patch: “menu/page_size”: 7 schema_list: - schema: clover

其中 7 表示打字的时候输入面板的每一页的候选词数目(Win10微软拼音默认为7),可以设置成 1~9 任意数字。

写好该文件之后,点击右下角左上角托盘图标右键菜单,点“重新部署”,然后再点右键,在方案列表里面应该就有“ 🍀️四叶草拼音输入法”的选项了。

关于 default.custom.yaml 文件的更多解释,可以参考官方文档定制指南

自定义ibus配置 存在bug无法生效

运行 ibus-setup

ibus-rime 设置横排候选列表

https://github.com/rime/ibus-rime/issues/52#issuecomment-450470290

临时办法是创建 ~/.config/ibus/rime/build/ibus_rime.yaml,添加以下内容

style:
  horizontal: true

Gnome 3.30.2 测试通过

写好该文件之后,点击右下角左上角托盘图标右键菜单,点“重新部署”即可生效

emoji 不显示或显示为方块

yay -S noto-fonts-emoji

GNOME 扩展

  • 托盘图标 https://github.com/MartinPL/Tray-Icons-Reloaded

  • 剪贴板历史记录 https://github.com/Tudmotu/gnome-shell-extension-clipboard-indicator

Kernel

使用 grub-mkconfig 工具来生成 /boot/grub/grub.cfg:

# grub-mkconfig -o /boot/grub/grub.cfg

提示:

每次安装或者移除一个内核后,你都需要重新运行一次 grub-mkconfig 命令。
若要管理多个 GRUB 条目,比如既使用 linux包 又使用 linux-lts包 内核,相关的提示可以参见 GRUB/技巧和窍门#多个启动条目。

XanMod Kernel

Liquorix Kernel

美化

https://github.com/material-shell/material-shell

  • Get on GNOME Extensions 不支持当前GNOME版本(GNOME 45),即使 gsettings set org.gnome.shell disable-extension-version-validation true 安装后也会报错

  • 从源代码安装 照样不支持

    yay -S nodejs npm
    git clone https://github.com/material-shell/material-shell.git && cd material-shell && make install
    

Material Shell是一个非常出色的Gnome桌面扩展,它可以极大地提高工作流程的效率。但是Gnome 45即将推出,扩展的工作方式会有较大变化。Material Shell是否能够兼容Gnome 45成为一个问题。Material Shell的维护者目前更关注独立的窗口管理器项目,所以暂时不清楚是否会优先使Material Shell兼容Gnome 45。他表示这个取决于即将在11月启动的众筹活动的成功程度。总体来说,Material Shell能否继续兼容未来版本的GnomeDesktop成为社区关注的焦点。

https://github.com/material-shell/material-shell/discussions/979

https://github.com/vinceliuice/grub2-themes

sudo ./install.sh -t vimix -i white -s 1080p

SMB 客户端

GNOME 文件管理器内置支持各种协议!

游戏

osu!lazer

yay -S osu-lazer

yay -S opentabletdriver (以下简称 otd)

https://opentabletdriver.net/Wiki/FAQ/Linux

编辑 /etc/environment 设置环境变量 SDL_VIDEODRIVER=wayland

结论:Linux Wayland osu-lazer 关掉内置 otd 用系统的 otd BUG太多,使用 lazer 内置的 otd 即可

:: 正在处理软件包的变化...
(1/1) 正在安装 opentabletdriver                    [----------------------] 100%

Welcome to OpenTabletDriver!
In order to start using this driver, there are certain things that have to be configured manually.

Replug your tablet if it is connected. This will re-trigger the udev rules accordingly.

The daemon can be started with:
  $ otd-daemon
You can fork it to the background and use output redirection to a log file if desired.
A systemd user service is also provided and can be used instead, assuming you have a correct systemd user graphical-session.target set up:
  $ systemctl --user enable --now opentabletdriver.service

You will have to manually unload built-in kernel modules (or reboot) in order for this driver to work properly.
To unload the module immediately, run:
  # rmmod <module>
Where <module> is 'wacom' if you own a wacom tablet, and 'hid_uclogic' otherwise.

As of version 0.6.2.0, having the package installed will block any modules related to drawing tablets
In the case that you still have issues after following these instructions, the FAQ at https://opentabletdriver.net/Wiki/FAQ/Linux may help.

opentabletdriver 的可选依赖
    libxrandr: x11 display querying support [已安装]
    libx11 [已安装]
:: 正在运行事务后钩子函数...
(1/3) Reloading device manager configuration...
(2/3) Arming ConditionNeedsUpdate...
(3/3) Updating the desktop file MIME type cache...

杂项

自动登录(GNOME)

https://help.gnome.org/admin/system-admin-guide/stable/login-automatic.html.en

☑️ ☆

Brainstorming

Brainstorming

VisualNovelLibrary

Everything you wanted to express is here.

Tags: C#, WPF

原案: You

Bookmarks

https://github.com/Carlos487/awesome-wpf

Features

  • WPF UI
  • Galgame 库
    • 支持通过本地、Steam导入
    • Galgame,启动!
      • (设想)支持语音控制,大喊xx启动以启动游戏
  • 进度管理
    • 使用YAML定义流程图,支持简单的分支、条件的定义并支持定义游戏状态并关联存档,解析并用Canvas绘制
  • 存档管理
    • 集中管理所有存档,一键备份还原,妈妈再也不怕我的Gal存档丢失了!
    • Git 用在这里不太合适,暂不考虑
  • 暂停
    • 最小化还在出声?担心一不小心点开后台的Gal?直接挂起(suspend)游戏进程,一键为所有Gal系统对标柚子社!
  • 截图管理
    • 内置截图工具,并支持 Steam 截图导入
    • 拥抱新格式,截图工具默认使用 WebP,导入截图库转换为 WebP,并在使用(复制)时提供兼容选项
    • Tesseract OCR 支持,支持通过OCR文本检索
    • (设想)表情识别 (Expression recognition),识别图中人脸及其表情,打上emoji标签
  • 表情管理,裁剪截图或手动添加(本地文件、Web链接)
  • 音乐管理
  • 立绘鉴赏
    • Gal系统没有立绘鉴赏?用GARBRO把立绘和背景解包,导入进来,Playground,启动!
  • 日历
    • Remember birthdays of your wives! ()
  • AI 支持(设想)
    • 推一部 Galgame 相当于为所有角色创建了文本数据集!快来训练你自己的 cyber waifu 吧!
    • Hook 获取(代码参考:hanmin0822/MisakaTranslator
    • 集成 openai/whisper,并支持谷歌翻译
  • 网站支持
    • (设想)Web内容解析写在配置文件里,拒绝硬编码
    • Bangumi 原生客户端
    • VNDB 原生客户端
    • 监测 Steam 游戏价格变化,今天 xx 降价了吗?
    • Danbooru 支持,搜索并批量下载
    • 多网站联动
      • 从班固米获取OST名称、歌曲列表
        • 搜索网易云,自动创建本地歌单
        • 搜索 osu! 谱面

VideoLibrary

Tags: C#, WPF

原案: You

  • 视频管理
  • 很好的 yt-dlp 支持
  • 很好的 ffmpeg 支持
  • 番剧观看管理
  • 追番管理,日历
  • 网站集成:班固米(二次元)、豆瓣(三次元)

Flappy Bird, 但是压感笔

Tags: C#, WPF, Windows Ink API

原案: You

密码管理器

Tags: C#, WPF

原案: ChatGPT

To-Do List

Tags: C#, WPF

原案: ChatGPT

原案

当然,我可以给你一个有趣的编程项目,这个项目可以从零开始,逐渐扩充功能,同时具有一定的实际用途。这个项目是一个任务管理器(To-Do List)应用程序。你可以使用任何你熟悉或想学习的编程语言来实现它。

项目描述:

开始时,你可以创建一个简单的命令行界面版本,允许用户添加、查看和删除任务。然后,逐步扩展功能,使其更加强大和有趣:

  1. 界面改进:将命令行界面改成图形界面,使用GUI库(如Tkinter、Qt、WinForms等)。

  2. 任务分类:允许用户为任务创建不同的分类或标签,以更好地组织任务。

  3. 提醒功能:添加提醒功能,当任务的截止日期临近时发送通知。

  4. 云同步:将任务列表与云存储(如Google Drive、Dropbox等)同步,使用户可以在多个设备上访问任务。

  5. 用户账户:创建用户账户系统,允许多个用户使用应用程序,每个用户有自己的任务列表。

  6. 统计和报告:生成任务完成统计图表和报告,帮助用户了解他们的任务管理情况。

  7. 插件支持:为应用程序添加插件系统,允许其他开发者编写扩展功能。

  8. 移动应用:为iOS和Android创建移动应用版本,使用户可以在移动设备上管理任务。

这个项目的好处是你可以根据自己的兴趣和学习目标来逐步扩展它,同时它对于个人任务管理和团队协作都有实际用途。你可以选择使用不同的编程语言和技术栈,从而学习和掌握新的编程技能。希望这个项目能激发你的兴趣!

电影推荐程序

Tags: Go, Command Line

原案: ChatGPT

原案

当然可以!以下是一个有趣的案例,涉及使用编程语言来解决实际问题:

问题: 你是一名电影爱好者,但你发现挑选一部电影来观看通常会耗费很多时间。你希望编写一个小程序来帮助你根据你的口味和心情选择一部电影。

解决方案: 使用编程语言(比如Python),你可以创建一个电影推荐程序。该程序可以:

  1. 收集电影数据: 从互联网上获取电影数据,包括电影名称、类型、评分等信息。

  2. 建立用户档案: 让用户回答一些问题,例如他们的喜好、当前的心情等,以创建用户档案。

  3. 推荐电影: 根据用户的档案信息和电影数据,编写算法来推荐适合用户口味和心情的电影。

  4. 用户交互: 与用户进行互动,以便他们可以查看推荐的电影列表,并选择一部观看。

  5. 信息展示: 提供关于每部电影的详细信息,包括剧情简介、演员阵容等。

  6. 评价和反馈: 让用户对观看的电影进行评分和反馈,以改进推荐算法。

这个项目不仅可以让你学习编程语言的基本知识和技能,还可以实际解决你的日常问题,使电影选择变得更有趣和便捷。你还可以根据自己的兴趣扩展该项目,添加更多功能,例如与社交媒体分享你的电影选择、将推荐列表发送到电子邮件等等。

通过这个案例,你可以将编程语言与你的兴趣和需求相结合,使学习编程变得更有趣和有动力。

文字冒险游戏

Tags: Command Line

原案: ChatGPT

战斗游戏

Tags: C#, WPF

原案: ChatGPT

☑️ ☆

Vultr

Vultr

节点选择

  • $5.0/mo 首选洛杉矶 (Los Angeles)

  • $2.5/mo 首选亚特兰大 (Atlanta)

操作系统

Debian 10 (buster)

重要信息:默认防火墙为 ufw

IPv6

可以开启,开启后在 Cloudflare 再另外添加指向VPS的IPv6地址的AAAA记录即可,然后在客户端启用就可以用,但暂时不确定开启后是否会使流量更易被GFW检测

公钥登录

XShell 的 XAgent 生成的密钥已上传到 Vultr 账号,直接在部署服务器是选择即可(点一下右上角打勾才可以!

apt update && apt upgrade -y

ssh 安全设置

nano /etc/ssh/sshd_config

# 按 ctrl+w 查找,查找以下项目,修改项目的值为对应的值
# 修改 ssh 端口号,记得ufw放行!!
# Port <ssh_port>
# 允许公钥认证
# PubkeyAuthentication yes
# 禁止密码认证
# PasswordAuthentication no

# ufw 放行新的 ssh 端口,拦截旧的 ssh 端口,并验证配置
ufw allow <ssh_port>/tcp
ufw deny 22/tcp
ufw status

# 应用 sshd_config 的更改
systemctl restart ssh

# 重新 ssh 登入需要用公钥认证,并使用新的端口连接

ufw 放行 80 443

ufw allow 80/tcp
ufw allow 443/tcp

使 IPv6 Only VPS 能访问 IPv4 网络

无法使用,warp 的 IPv4 地址完全被墙

https://gitlab.com/fscarmen/warp

wget -N https://gitlab.com/fscarmen/warp/-/raw/main/menu.sh && bash menu.sh 4

添加 DNS 记录

在 Cloudflare 面板中添加 A 记录 指向 VPS 的 IPv4 地址

  • 类型: A
  • 名称: xxx
  • IPv4地址: xxx
  • 代理状态: 仅DNS

更新内核

echo "deb http://deb.debian.org/debian buster-backports main" > /etc/apt/sources.list.d/backports.list
apt update && apt -t buster-backports install linux-image-amd64 linux-headers-amd64 -y
update-grub

# sync
# reboot

uname -r

xray reality

mack-a/v2ray-agent

https://www.v2ray-agent.com/archives/1680104902581

wget -P /root -N --no-check-certificate "https://raw.githubusercontent.com/mack-a/v2ray-agent/master/install.sh" && chmod 700 /root/install.sh && /root/install.sh

Tip: 随机端口号可以这样生成:python -c "import random; print(random.randint(10000, 65535))"

下面没提到的选项保持默认即可

安装方案

  • 2. 任意组合安装
  • 1. Xray-core
  • 7. VLESS+Reality+uTLS+Vision[推荐]

站点配置

  • <your.domain.com>
  • <fake_site_port> (用于订阅地址和伪装站)

证书生成

  • 2. zerossl
  • no@thank.you

方案配置

  • <vless_port> (用于代理协议)

然后重新运行 wget -P /root -N --no-check-certificate "https://raw.githubusercontent.com/mack-a/v2ray-agent/master/install.sh" && chmod 700 /root/install.sh && /root/install.sh

  • 7. 账号管理
  • 2. 查看订阅

根据客户端选择使用订阅即可:

  • 默认订阅 (V2Ray 订阅)
  • Clash Meta 订阅

https://www.v2ray-agent.com/archives/1680104902581

安装 TUIC (代理协议)

TUIC是一个轻量的基于QUIC的代理协议,由rust编写,你可以在这里找到更多信息

https://wiki.metacubex.one/config/proxies/tuic/

Tuic最近发布了V5,性能提升较大,经过了解和使用这篇文章应运而生。

QUIC 协议汲取了大量人们给 TCP 糊墙的经验教训,把连接结构优化到(目前来看)极致。但是现在市面上的代理工具还没有能完全利用 QUIC 特性的存在-官方介绍。

如果本地使用hysteria经常发生QoS,可以尝试一下此工具。相对于hysteria更加温和,在不影响良好使用情况下尽量发挥最大的性能。据群友测试,可以提升数倍,而且没有发现QoS问题,如果是线路以及性能优良的VPS则提升不明显,如果有 RackNerd 的可以尝试一下使用一下。

https://www.v2ray-agent.com/archives/1687167522196

wget -P /root -N --no-check-certificate "https://raw.githubusercontent.com/mack-a/v2ray-agent/master/install.sh" && chmod 700 /root/install.sh && /root/install.sh
# 只需要保证安装VLESS_TLS_Vision即可(需要依赖这个)
vasma->1/2
# 安装Tuic
vasma->6.Tuic管理
  • bbr (默认)

  • <tuic_port> (用于TUIC)

重新运行 wget -P /root -N --no-check-certificate "https://raw.githubusercontent.com/mack-a/v2ray-agent/master/install.sh" && chmod 700 /root/install.sh && /root/install.sh

  • 7. 账号管理
  • 2. 查看订阅
  • y. 读取上次的 Salt

Clash Verge (with Clash.Meta core)

更新订阅

如果没看到更新,代理 –> Provider –> Refresh Button

如果还是不行,删除这样的文件再更新 Provider C:\Users\jiera\scoop\apps\clash-verge\current\.config\clash-verge\qbqaqkefcq_provider.yaml

Android 客户端: NekoBoxForAndroid

MatsuriDayo/NekoBoxForAndroid

重新运行 wget -P /root -N --no-check-certificate "https://raw.githubusercontent.com/mack-a/v2ray-agent/master/install.sh" && chmod 700 /root/install.sh && /root/install.sh

  • 7. 账号管理
  • 2. 查看账号

找到 格式化明文(Tuic+TLS),填入客户端

或者参照 Clash.Meta 订阅中的配置:

  - name: "64ceeb60-singbox_tuic"
    server: xxx
    type: tuic
    port: xxx
    uuid: xxx
    password: xxx
    alpn:
     - h3
    congestion-controller: bbr
    disable-sni: true
    reduce-rtt: true
    sni: 64ceeb60-singbox_tuic

Note:

  • ALPN, Application layer protocol negotiation, 应用层协议协商
  • SNI, Server name indication, 服务器名称指示

国内外分流教程(matsuridayo.github.io)

最终客户端上的服务器配置:

桌面客户端: Clash Verge

Windows (Scoop): scoop install extras/clash-verge

ArchLinux (AUR bin): yay -S clash-verge-bin clash-meta-bin

  • 无提权运行,设置,切换Clash内核为Meta内核,勾选全部标有黄色感叹号的Clash字段
  • (Windows) 退出然后重新管理员运行,安装启用服务模式,TUN模式,开机自启,静默启动,退出
  • (Linux) 启用TUN模式,开机自启,静默启动
  • 导入 Clash Meta 订阅

Android 客户端: V2RayNG (需要最新 Pre-release 版本)

  • 扫描二维码,导入订阅地址
  • 右上角菜单,更新订阅

Addition

Nginx 静态文件位于 /usr/share/nginx/html/

可以在这里新建一个目录来分享文件(应该是经过代理的、安全的)

cd /usr/share/nginx/html/
mkdir f

# 应确保访问 https://<your.domain.com>:<fake_site_port>/f/ 返回 403

# local terminal

scp -i "C:\Users\<username>\Documents\Xagent Export Keys\id_rsa_2048" -P <ssh_port> <本地文件> root@<your_vps_ip>:<远程路径>

naiveproxy

(隔天封端口) wulabing/V2Ray_ws-tls_bash_onekey

推荐使用

Vmess+websocket+TLS+Nginx+Website

wget -N --no-check-certificate -q -O install.sh "https://raw.githubusercontent.com/wulabing/V2Ray_ws-tls_bash_onekey/master/install.sh" && chmod +x install.sh && bash install.sh

(隔天封端口) wulabing/Xray_onekey

不推荐使用

VLESS + TCP + TLS + Nginx + WebSocket

wget -N --no-check-certificate -q -O install.sh "https://raw.githubusercontent.com/wulabing/Xray_onekey/nginx_forward/install.sh" && chmod +x install.sh && bash install.sh

##

net.core.default_qdisc = fq
net.ipv4.tcp_congestion_control = bbr
net.ipv4.tcp_rmem = 4096 87380 33554432
net.ipv4.tcp_umem = 4096 87380 33554432
net.ipv6.conf.enp1s0.accept_ra = 2
☑️ ☆

WSA

WSA

WSA on Windows 10

Prebuilt WSA: MustardChef/WSABuilds

Click Download latest stable builds for Windows 10 x64 in README.md

Follow the steps in Release page for installation

Note:

  • Disable any anti-virus software to prevent it from some strange issues.
  • 如果提示需要开启控制流保护,那么你可以不为整个系统开启控制流保护,而是为 WsaClient.exe 单独开启

Manual build

https://github.com/cinit/WSAPatch

https://github.com/YT-Advanced/MagiskOnWSALocal/tree/patch-1

☑️ ⭐

OpenWRT

OpenWRT

安装与配置

Ref: https://github.com/aporetic/aporetic.github.io/blob/main/raspberry-pi-router/router.md

Notes

安装

  • https://asu.aparcar.org/ ==> https://firmware-selector.openwrt.org/

  • Raspberry Pi 4B/400/4CM (64bit)

  • FACTORY (EXT4)

  • 添加以下软件包安装:

    kmod-usb-net-rtl8152 luci luci-i18n-base-zh-cn
    

上网

irqbalance

编辑 /etc/config/irqbalance

config irqbalance 'irqbalance'
        option enabled '1'  # 将 0 修改为 1 以启用
...

软件包

OpenClash

由于安装配置繁琐、与IPv6和AdGuardHome存在不同程度冲突、使用不灵活、资源占用高等原因,我已在OpenWRT上弃用它,这里不再记录配置过程

  • Clash for Windows Mixin 配置 供参考:bit.ly/42QwvUG(注意这是用在 Clash for Windows 上的,不要直接用在 OpenClash 上)

  • GenIP 数据库:GeoIP2-CN

AdGuard Home

Ref: https://openwrt.org/docs/guide-user/services/dns/adguard-home

opkg update
opkg install adguardhome

service adguardhome enable
service adguardhome start
# Get the first IPv4 and IPv6 Address of router and store them in following variables for use during the script.
NET_ADDR=$(/sbin/ip -o -4 addr list br-lan | awk 'NR==1{ split($4, ip_addr, "/"); print ip_addr[1] }')
NET_ADDR6=$(/sbin/ip -o -6 addr list br-lan scope global | awk 'NR==1{ split($4, ip_addr, "/"); print ip_addr[1] }')
 
echo "Router IPv4 : ""${NET_ADDR}"
echo "Router IPv6 : ""${NET_ADDR6}"
 
# 1. Enable dnsmasq to do PTR requests.
# 2. Reduce dnsmasq cache size as it will only provide PTR/rDNS info.
# 3. Disable rebind protection. Filtered DNS service responses from blocked domains are 0.0.0.0 which causes dnsmasq to fill the system log with possible DNS-rebind attack detected messages.
# 4. Move dnsmasq to port 54.
# 5. Set Ipv4 DNS advertised by option 6 DHCP 
# 6. Set Ipv6 DNS advertised by DHCP
uci set dhcp.@dnsmasq[0].noresolv="0"
uci set dhcp.@dnsmasq[0].cachesize="1000"
uci set dhcp.@dnsmasq[0].rebind_protection='0'
uci set dhcp.@dnsmasq[0].port="54"
uci -q delete dhcp.@dnsmasq[0].server
uci add_list dhcp.@dnsmasq[0].server="${NET_ADDR}"
 
#Delete existing config ready to install new options.
uci -q delete dhcp.lan.dhcp_option
uci -q delete dhcp.lan.dns
 
# DHCP option 6: which DNS (Domain Name Server) to include in the IP configuration for name resolution
uci add_list dhcp.lan.dhcp_option='6,'"${NET_ADDR}" 
 
#DHCP option 3: default router or last resort gateway for this interface
uci add_list dhcp.lan.dhcp_option='3,'"${NET_ADDR}"
 
#Set IPv6 Announced DNS
for OUTPUT in $(ip -o -6 addr list br-lan scope global | awk '{ split($4, ip_addr, "/"); print ip_addr[1] }')
do
	echo "Adding $OUTPUT to IPV6 DNS"
	uci add_list dhcp.lan.dns=$OUTPUT
done
uci commit dhcp
/etc/init.d/dnsmasq restart

Setup AGH through the web interface:

On first time setup the default web interface port is TCP 3000.

Go to http://192.168.1.1:3000/ (If your router IP is not 192.168.1.1, change this accordingly)

Setup the Admin Web Interface to listen on 192.168.1.1 at port 8080. (Changing the web interface port is optional)

Set DNS server to listen on 192.168.1.1 at port 53.

Note: DNS 服务器监听配置

亲测需要配置为 any:53,不知为何配置为 192.168.1.1 (路由器局域网IP) 会导致路由器本机无法上网

这样配置不是很安全,最好增加防火墙配置以防止DNS服务器从WAN被访问

LuCI –> 网络 –> 防火墙 –> 添加,Deny-DNS-for-WAN, TCP UDP, 源区域 WAN, 目标区域 任意区域(转发), 目标端口 53, Action Drop

展开 iptables命令 ``` # 允许本地网络访问DNS服务器 iptables -A INPUT -i lan_interface -p udp --dport 53 -j ACCEPT iptables -A INPUT -i lan_interface -p tcp --dport 53 -j ACCEPT # 拒绝外部网络访问DNS服务器 iptables -A INPUT -i wan_interface -p udp --dport 53 -j DROP iptables -A INPUT -i wan_interface -p tcp --dport 53 -j DROP ```

Create an user and choose a strong password.

Login AGH:

http://192.168.1.1:8080/ (or whatever listening port you set)

Feel free to change upstream DNS servers to whatever you like (Adguard Home supports DoH, DoT and DoQ out of the box), add the blacklists of your preference and enjoy ad-free browsing on all of your devices.

配置

安装 Docker

Preparation: 扩容 rootfs

Ref: https://nowboy4.gitee.io/2021/01/07/openwrt3/

Ref: https://openwrt.org/docs/guide-user/virtualization/docker_host

opkg update
opkg install dockerd
opkg install docker luci-app-dockerman luci-i18n-dockerman-zh-cn

verify if all packages were installed

root@OpenWrt:~# opkg list-installed | grep docker
docker - 20.10.22-1
dockerd - 20.10.22-1
luci-app-dockerman - v0.5.13-20230114
luci-i18n-dockerman-zh-cn - git-23.222.62173-d7922c4
luci-lib-docker - git-21.166.52164-fe795d5
r

reboot

重启之后如果出现

  • LuCI –> Docker 菜单 只有 配置 一项
  • 执行 docker version 等命令出现 unix:///var/run/docker.sock. Is the docker daemon running? 报错

是由于 dockerd 没有启动

(绝大多数情况下这步没用)先尝试在 LuCI –> 系统 –> 启动项 –> dockerd –> 启用、启动

如果不行,重装: https://forum.openwrt.org/t/getting-docker-to-work-first-try/132252/12

# 全部数据及配置文件将会被删除!
opkg remove docker luci-app-dockerman docker-compose dockerd --autoremove --force-remove
opkg install docker luci-app-dockerman docker-compose dockerd --force-maintainer

备用解决方案: https://blog.csdn.net/u010857736/article/details/124128444

配置 Docker

Docker 容器默认 bridge 模式无法访问外部网络

Ref: #1760#issuecomment-542985373 and #1760#issuecomment-1193027470

更新: 1:vim /etc/sysctl.conf,添加下列内容:

net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
net.bridge.bridge-nf-call-arptables = 1

2:Luci>网络>防火墙>转发:接受 3:Luci>状态>防火墙>重启防火墙 4:ssh执行service dockerd restart 故障排除。

改成

net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
net.bridge.bridge-nf-call-arptables = 1

之后会引入新的问题,就是nat回环失效。简单说就是设备在内网(该路由器下面)无法通过路由器公网IP+端口(比如DDNS)访问内网映射出去的另一个设备,比如监控摄像机.

20220723 更新 实测,

net.bridge.bridge-nf-call-arptables = 0
net.bridge.bridge-nf-call-ip6tables = 0
net.bridge.bridge-nf-call-iptables = 0

的情况下,只要开启Luci>网络>防火墙>转发:接受 即可使bridge模式的容器联网

Docker Hub 镜像

OpenWRT –> Docker –> 配置 –> 注册表镜像

Ref: https://gist.github.com/y0ngb1n/7e8f16af3242c7815e7ca2f0833d3ea6

  • https://docker.m.daocloud.io
  • https://dockerproxy.com
  • https://docker.nju.edu.cn
  • https://docker.mirrors.sjtug.sjtu.edu.cn

安装 USB 硬盘相关软件包

opkg update
# USB挂载
opkg install block-mount blockd
# USB驱动支持
opkg install kmod-usb2 kmod-usb3
# 文件系统支持
opkg install kmod-fs-ext4 kmod-fs-msdos kmod-fs-nfs kmod-fs-ntfs kmod-usb-storage-uas
# 其他
opkg install fdisk cfdisk hd-idle hdparm smartmontools

# ntfs-3g
opkg install ntfs-3g

挂载 NTFS 硬盘

方法1

Tips for NTFS: https://openwrt.org/docs/guide-user/storage/writable_ntfs

Mount a partition to an existing directory. You can create one with mkdir, for example mkdir -p /mnt/sda1.

To mount a partition to above directory:

ntfs-3g /dev/sda1 /mnt/sda1 -o rw,big_writes

To auto mount a partition at startup (with drive plugged in) edit /etc/rc.local:

sleep 1

ntfs-3g /dev/sda1 /mnt/sda1 -o rw,lazytime,noatime,big_writes

exit 0

To unmount:

umount /dev/sda1

To be able to mount it automatically:

ln -s /usr/bin/ntfs-3g /sbin/mount.ntfs

For details about mounting options used above see man page.

方法2 (无效, 仅做归档)

LuCI –> 系统 –> 挂载点 –> 挂载点 –> 选择你的硬盘 –> 编辑

Tip: 更改将被写入 /etc/config/fstab

常规设置

  • 启用

高级设置

  • 文件系统: ntfs-3g

  • 挂载选项: rw,lazytime,noatime,big_writes

    这是在使用`ntfs-3g`命令挂载NTFS文件系统时指定的一些选项的解释:
    1. `-o rw`: 这表示将文件系统以“可读写”(read-write)的方式挂载,允许读取和写入文件。
    2. `lazytime`: 这个选项用于优化文件系统的时间戳更新。通常,文件系统会在每次文件访问或修改时更新时间戳,但启用`lazytime`选项后,时间戳会更懒惰地更新,减少了写入操作对文件系统性能的影响。
    3. `noatime`: 此选项禁用了“访问时间”(atime)的更新。在默认情况下,每次文件被访问时,文件系统都会更新atime,但这可能会增加磁盘I/O负载。通过使用`noatime`选项,您可以禁用atime更新,提高性能。
    4. `big_writes`: 这个选项用于启用大写入操作(big writes),它可以提高写入性能。通常,文件系统执行小块数据的写入操作,但启用了`big_writes`选项后,可以执行更大的写入操作,从而提高了写入速度。
    这些选项的使用可以根据您的需求和文件系统的特性来进行配置,以优化性能或满足特定要求。
    

保存并应用,短接GPIO3与GND重启 (Ref: https://www.huoyijie.cn/article/cbe654a050e711ecadb78975e8b95c91/)

Samba 文件共享

参见 ## dperson/samba in #My Workstation/Windows/Docker.md

docker run --name samba --restart=always -it -p 139:139 -p 445:445 \
    -e TZ=Asia/Shanghai -m 512m \
    -v /mnt:/mount \
    -d dperson/samba -p \
    -u "admin;password" \
    -s "sda1;/mount/sda1/;no;no;no;admin"

(安全警告!)配置防火墙,允许来自WAN的请求

LuCI –> 网络 –> 防火墙 –> 添加,Allow-Samba, TCP UDP, 源区域 WAN, 目标区域 任意区域(转发), 目标端口 137 138 139 445, Action Drop

smartd 硬盘检测与告警

opkg update && opkg install smartd smartd-mail

查看 源代码中的Makefile 可了解到其配置等文件的所在位置

程序拥有启动项 smartd,可用 service smartd/etc/init.d/smartd 命令管理

Ref: https://linux.die.net/man/5/smartd.conf

编辑 /etc/smartd.conf,删除掉原有内容,

/dev/sda -a -m xxx@139.com,xxx@qq.com -M test

查看 /etc/smartd_warning.sh,可知其会调用可执行文件 mailx。继续查找smartd-mail的依赖项得知软件包名称为nail,继续查看其 源代码中的Makefile 可得知其配置文件位于 /etc/nail.rc

编辑 /etc/nail.rc,参考此文完成配置

set smtp-auth=login
set smtp-use-starttls

set smtp='smtp://smtp.qq.com:587'
set smtp-auth-user='xxx@foxmail.com'
set smtp-auth-password='xxxxxx'

set from='smartd daemon <xxx@foxmail.com>'

配置完毕后,参考上文发送测试邮件

完成配置,运行 smartd -d (-d 代表 debug),观察调试输出

root@OpenWrt:~# smartd -d
smartd 7.2 2020-12-30 r5155 [aarch64-linux-5.10.176] (localbuild)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

Opened configuration file /etc/smartd.conf
Configuration file /etc/smartd.conf parsed.
Device: /dev/sda, unable to autodetect device type
Unable to register device /dev/sda (no Directive -d removable). Exiting.

读取 smart 时出现了问题,运行smartctl --all /dev/sda,查看错误信息

root@OpenWrt:~# smartctl --all /dev/sda
smartctl 7.2 2020-12-30 r5155 [aarch64-linux-5.10.176] (localbuild)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

/dev/sda: Unknown USB bridge [0x174c:0x55aa (0x100)]
Please specify device type with the -d option.

Use smartctl -h to get a usage summary

Please specify device type with the -d option.

对着smartctl --help给出的所有设备类型一个个试,哪个又准又全就是最适合你的硬盘盒的

  -d TYPE, --device=TYPE
         Specify device type to one of:
         ata, scsi[+TYPE], nvme[,NSID], sat[,auto][,N][+TYPE], usbcypress[,X], usbjmicron[,p][,x][,N], usbprolific, usbsunplus, sntjmicron[,NSID], sntrealtek, intelliprop,N[+TYPE], jmb39x[-q],N[,sLBA][,force][+TYPE], jms56x,N[,sLBA][,force][+TYPE], marvell, areca,N/E, 3ware,N, hpt,L/M/N, megaraid,N, aacraid,H,L,ID, cciss,N, auto, test

适合我的设备类型是 sat,对应的smartctl命令是 smartctl -d sat --all /dev/sda

参考 smartd.conf(5) 修改/etc/smartd.conf

/dev/sda -a -d sat -m xxx@139.com,xxx@qq.com -M test

再次运行smartd -d,测试邮件成功发送

root@OpenWrt:~# smartd -d
smartd 7.2 2020-12-30 r5155 [aarch64-linux-5.10.176] (localbuild)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

Opened configuration file /etc/smartd.conf
Configuration file /etc/smartd.conf parsed.
Device: /dev/sda [SAT], opened
Device: /dev/sda [SAT], ST4000VX000-xxxxxx, S/N:xxxxxxxx, WWN:x-xxxxxx-xxxxxxxxx, FW:HK11, 4.00 TB
Device: /dev/sda [SAT], not found in smartd database.
Device: /dev/sda [SAT], is SMART capable. Adding to "monitor" list.
Monitoring 1 ATA/SATA, 0 SCSI/SAS and 0 NVMe devices
Executing test of <mail> to xxx@139.com xxx@qq.com ...
Test of <mail> to xxx@139.com xxx@qq.com: successful
Device: /dev/sda [SAT], opened ATA device
Device: /dev/sda [SAT], previous self-test completed without error

kill掉它,修改/etc/smartd.conf,把测试邮件的选项-M test删掉,重启smartd,完成配置!

/dev/sda -a -d sat -m xxx@139.com,xxx@qq.com

service smartd start
展开 smartd.conf参数解释 > -a > > Equivalent to turning on all of the following Directives: '-H' to check the SMART health status, '-f' to report failures of Usage (rather than Prefail) Attributes, '-t' to track changes in both Prefailure and Usage Attributes, '-l error' to report increases in the number of ATA errors, '-l selftest' to report increases in the number of Self-Test Log errors, '-l selfteststs' to report changes of Self-Test execution status, '-C 197' to report nonzero values of the current pending sector count, and '-U 198' to report nonzero values of the offline pending sector count. > 相当于打开以下所有指令:“-H”检查 SMART 运行状况,“-f”报告使用失败(而不是故障前)属性,“-t”跟踪故障前和使用属性的更改, '-l error' 报告 ATA 错误数量的增加, '-l selftest' 报告自检日志错误数量的增加, '-l selfteststs' 报告自检执行状态的变化, ' -C 197' 报告当前挂起扇区计数的非零值,'-U 198' 报告脱机挂起扇区计数的非零值。 > -m ADD > > Send a warning email to the email address ADD if the '-H', '-l', '-f', '-C', or '-O' Directives detect a failure or a new error, or if a SMART command to the disk fails. This Directive only works in conjunction with these other Directives (or with the equivalent default '-a' Directive). > 如果“-H”、“-l”、“-f”、“-C”或“-O”指令检测到故障或新错误,或者 SMART 命令,则向电子邮件地址 ADD 发送警告电子邮件到磁盘失败。该指令仅与这些其他指令(或等效的默认“-a”指令)结合使用。 > > To prevent your email in-box from getting filled up with warning messages, by default only a single warning will be sent for each of the enabled alert types, '-H', '-l', '-f', '-C', or '-O' even if more than one failure or error is detected or if the failure or error persists. [This behavior can be modified; see the '-M' Directive below.] > 为了防止您的电子邮件收件箱充满警告消息,默认情况下,只会为每个启用的警报类型“-H”、“-l”、“-f”、“-C”发送一条警告',或'-O',即使检测到多个故障或错误或者故障或错误仍然存​​在。 [此行为可以修改;请参阅下面的“-M”指令。] > > To send email to more than one user, please use the following "comma separated" form for the address: user1@add1,user2@add2,...,userN@addN (with no spaces). > 要向多个用户发送电子邮件,请使用以下“逗号分隔”形式作为地址:user1@add1,user2@add2,...,userN@addN(不含空格)。 > > To test that email is being sent correctly, use the '-M test' Directive described below to send one test email message on smartd startup. > 要测试电子邮件是否正确发送,请使用下面描述的“-M test”指令在 smartd 启动时发送一封测试电子邮件。 > > By default, email is sent using the system mail command. In order that smartd find the mail command (normally /bin/mail) an executable named 'mail' must be in the path of the shell or environment from which smartd was started. If you wish to specify an explicit path to the mail executable (for example /usr/local/bin/mail) or a custom script to run, please use the '-M exec' Directive below. > 默认情况下,使用系统邮件命令发送电子邮件。为了让 smartd 找到 mail 命令(通常是 /bin/mail),名为“mail”的可执行文件必须位于启动 smartd 的 shell 或环境的路径中。如果您希望指定邮件可执行文件的显式路径(例如 /usr/local/bin/mail)或要运行的自定义脚本,请使用下面的“-M exec”指令。 > > Note also that there is a special argument \<nomailer\> which can be given to the '-m' Directive in conjunction with the '-M exec' Directive. Please see below for an explanation of its effect. > 另请注意,有一个特殊参数\<nomailer\>,可以将其与“-M exec”指令一起赋予“-m”指令。请参阅下文了解其效果的说明。 > > If the mailer or the shell running it produces any STDERR/STDOUT output, then a snippet of that output will be copied to SYSLOG. The remainder of the output is discarded. If problems are encountered in sending mail, this should help you to understand and fix them. If you have mail problems, we recommend running smartd in debug mode with the '-d' flag, using the '-M test' Directive described below. > 如果邮件程序或运行它的 shell 产生任何 STDERR/STDOUT 输出,则该输出的片段将被复制到 SYSLOG。输出的其余部分将被丢弃。如果在发送邮件时遇到问题,这应该可以帮助您理解并解决这些问题。如果您遇到邮件问题,我们建议使用下面描述的“-M test”指令在带有“-d”标志的调试模式下运行 smartd。

hd-idle 硬盘休眠

smartd 定期读取 smart 似乎会唤醒正在休眠的硬盘,hd-idle 理论上应该会与 smartd 发生冲突

程序拥有启动项 hd-idle,可用 service hd-idle/etc/init.d/hd-idle 命令管理

To be continued.

Docker 镜像

参见: #My Documents/#My Workstaions/Windows/Docker.md

Note: 安装Git opkg update && opkg install git git-http

iperf3 吞吐量测试

Ref: https://zhuanlan.zhihu.com/p/314727150

Note: Opkg 以及 MSYS2, Cygwin 都有 iperf3

安全

防火墙配置参考

https://www.bilibili.com/video/av987042614/

安全测试

Ref: https://wiki.wgpsec.org/knowledge/tools/nmap.html

在 OpenWRT 上执行如下命令以获得其公网IP地址

curl 'https://ipv4.ams2.test-ipv6.com/ip/?callback=_jqjsp&testdomain=test-ipv6.com&testname=test_a'

curl 'https://ipv6.ams2.test-ipv6.com/ip/?callback=_jqjsp&testdomain=test-ipv6.com&testname=test_aaaa'

非内网设备(比如手机用移动数据)执行如下命令进行端口扫描

nmap -T4 -A -v -Pn <ipv4>

nmap -6 -T4 -A -v -Pn <ipv6>

~ $ nmap -T4 -A -v -Pn ***.***.***.***
Host discovery disabled (-Pn). All addresses will be marked 'up' and scan times may be slower.
Starting Nmap 7.94 ( https://nmap.org ) at 2023-09-28 00:57 CST
NSE: Loaded 156 scripts for scanning.
NSE: Script Pre-scanning.
Initiating NSE at 00:57
Completed NSE at 00:57, 0.00s elapsed
Initiating NSE at 00:57
Completed NSE at 00:57, 0.00s elapsed
Initiating NSE at 00:57
Completed NSE at 00:57, 0.00s elapsed
Initiating Parallel DNS resolution of 1 host. at 00:57
Completed Parallel DNS resolution of 1 host. at 00:57, 0.33s elapsed
Initiating Connect Scan at 00:57
Scanning ***.***.***.*** [1000 ports]
Connect Scan Timing: About 30.05% done; ETC: 00:59 (0:01:12 remaining)
Connect Scan Timing: About 60.05% done; ETC: 00:59 (0:00:41 remaining)
Completed Connect Scan at 00:59, 101.18s elapsed (1000 total ports)
Initiating Service scan at 00:59
NSE: Script scanning ***.***.***.***.
Initiating NSE at 00:59
Completed NSE at 00:59, 5.01s elapsed
Initiating NSE at 00:59
Completed NSE at 00:59, 0.01s elapsed
Initiating NSE at 00:59
Completed NSE at 00:59, 0.00s elapsed
Nmap scan report for ***.***.***.***
Host is up.
All 1000 scanned ports on ***.***.***.*** are in ignored states.
Not shown: 1000 filtered tcp ports (no-response)

NSE: Script Post-scanning.
Initiating NSE at 00:59
Completed NSE at 00:59, 0.00s elapsed
Initiating NSE at 00:59
Completed NSE at 00:59, 0.01s elapsed
Initiating NSE at 00:59
Completed NSE at 00:59, 0.01s elapsed
Read data files from: /data/data/com.termux/files/usr/bin/../share/nmap
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 107.20 seconds
~ $ nmap -6 -T4 -A -v -Pn ****:****:****:****:****:****:****:****
Host discovery disabled (-Pn). All addresses will be marked 'up' and scan times may be slower.
Starting Nmap 7.94 ( https://nmap.org ) at 2023-09-28 01:00 CST
NSE: Loaded 156 scripts for scanning.
NSE: Script Pre-scanning.
Initiating NSE at 01:00
Completed NSE at 01:00, 0.00s elapsed
Initiating NSE at 01:00
Completed NSE at 01:00, 0.00s elapsed
Initiating NSE at 01:00
Completed NSE at 01:00, 0.00s elapsed
Initiating Parallel DNS resolution of 1 host. at 01:00
Completed Parallel DNS resolution of 1 host. at 01:00, 0.30s elapsed
Initiating Connect Scan at 01:00
Scanning ****:****:****:****:****:****:****:**** [1000 ports]
Increasing send delay for ****:****:****:****:****:****:****:**** from 0 to 5 due to 95 out of 237 dropped probes since last increase.
Increasing send delay for ****:****:****:****:****:****:****:**** from 5 to 10 due to 11 out of 19 dropped probes since last increase.
Completed Connect Scan at 01:01, 38.11s elapsed (1000 total ports)
Initiating Service scan at 01:01
NSE: Script scanning ****:****:****:****:****:****:****:****.
Initiating NSE at 01:01
Completed NSE at 01:01, 0.10s elapsed
Initiating NSE at 01:01
Completed NSE at 01:01, 0.00s elapsed
Initiating NSE at 01:01
Completed NSE at 01:01, 0.00s elapsed
Nmap scan report for ****:****:****:****:****:****:****:****
Host is up (0.037s latency).
All 1000 scanned ports on ****:****:****:****:****:****:****:**** are in ignored states.
Not shown: 1000 closed tcp ports (conn-refused)

Host script results:
| address-info:
|   IPv6 EUI-64:
|     MAC address:
|       address: 00:e0:4c:68:01:6d
|_      manuf: Realtek Semiconductor

NSE: Script Post-scanning.
Initiating NSE at 01:01
Completed NSE at 01:01, 0.00s elapsed
Initiating NSE at 01:01
Completed NSE at 01:01, 0.00s elapsed
Initiating NSE at 01:01
Completed NSE at 01:01, 0.00s elapsed
Read data files from: /data/data/com.termux/files/usr/bin/../share/nmap
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 39.05 seconds

☑️ ☆

Docker

Docker

portainer/portainer-ce

https://127.0.0.1:9443

docker run -d -p 8000:8000 -p 9443:9443 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest

dperson/samba

在 WSL Ubuntu 上克隆存储库(不用 Git for Windows) git clone https://github.com/dperson/samba,然后 cd samba

修改 samba.sh 倒数第二行 exec ionice -c 3 smbd -FS --no-process-group </dev/null,删掉参数 -S,改为 exec ionice -c 3 smbd -F --no-process-group </dev/null(参见 #413

执行 docker build -t dperson/samba:latest . 构建镜像

若在OpenWRT上构建下载依赖项很慢或失败而又不方便开代理,可参考如下内容修改 Dockerfile

You could modify your Dockerfile with something like this:

RUN echo https://mirrors.sjtug.sjtu.edu.cn/alpine/v3.18/main > /etc/apk/repositories; \
    echo https://mirrors.sjtug.sjtu.edu.cn/alpine/v3.18/community >> /etc/apk/repositories

RUN apk update

如果还是下载不了,请参见 ### Docker 容器默认 bridge 模式无法访问外部网络 in #My Router/OpenWRT/OpenWRT.md 解决。或者使用临时解决方法,即使用主机(host)网络:docker build -t dperson/samba:latest --network host .

docker run --name samba --restart=always -it -p 139:139 -p 445:445 \
    -e TZ=Asia/Shanghai -m 512m \
    -v /mnt:/mount \
    -d dperson/samba -p \
    -u "admin;password" \
    -s "d;/mount/d/;no;no;no;admin" \
    -s "e;/mount/e/;no;no;no;admin"

参见:https://github.com/dperson/samba#configuration

关于各平台如何连接SMB文件共享

Ref: https://github.com/wupanhao/wupanhao.github.io/issues/1

Windows

此电脑 右键菜单 映射网络驱动器

自选驱动器号,地址格式 \\服务器地址\共享目录,勾选使用其他凭据连接,点击完成后输入用户名密码

Android

Solid Explorer, ES文件浏览器, VLC, MX Player, etc.

p3terx/aria2-pro

docker run -d \
    --name aria2-pro \
    --restart unless-stopped \
    --log-opt max-size=1m \
    -e DISK_CACHE=256M \
    -e UMASK_SET=022 \
    -e RPC_SECRET=password \
    -e RPC_PORT=6800 \
    -p 6800:6800 \
    -e LISTEN_PORT=6888 \
    -p 6888:6888 \
    -p 6888:6888/udp \
    -v /mnt/d/.config/aria2:/config \
    -v /mnt/d/Downloads/#aria2-downloads:/downloads \
    p3terx/aria2-pro

-e CUSTOM_TRACKER_URL=https://cdn.jsdelivr.net/gh/ngosang/trackerslist@master/trackers_best.txt \

不要设置环境变量 PUID=$UID PGID=$GID(参见 https://p3terx.com/archives/docker-aria2-pro.html#toc_7

p3terx/ariang

docker run -d \
    --name ariang \
    --log-opt max-size=1m \
    --restart unless-stopped \
    -p 6880:6880 \
    p3terx/ariang

debian:buster

Build Linux Kernel

https://linux.cn/article-16252-1.html

docker pull debian:buster
docker run -itd --name debian-buster debian:buster
docker exec -it debian-buster bash

apt update && apt upgrade -y
apt install bc binutils bison build-essential cpio curl dpkg-dev dwarves flex fakeroot gcc git gnupg2 gzip kmod libelf-dev libncurses-dev libncurses5-dev libssl-dev make nano openssl pahole perl-base pkg-config rsync tar wget xz-utils -y

cd /root

wget "https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.1.55.tar.xz"
xz -d linux-*.tar.xz
tar -xf linux-*.tar

cd linux-*/
cp /boot/config-"$(uname -r)" .config
make olddefconfig

./scripts/config --file .config --set-str SYSTEM_TRUSTED_KEYS ''
./scripts/config --file .config --set-str SYSTEM_REVOCATION_KEYS ''

# make -j$(nproc) 2>&1 | tee log
make -j$(nproc) deb-pkg 2>&1 | tee log
sudo dpkg -i linux-image-*_amd64.deb
sudo dpkg -i linux-headers-*_amd64.deb
sudo dpkg -i linux-libc-*_amd64.deb

apt install wget nano xz-utils -y

apt install bc binutils bison dwarves flex gcc git gnupg2 gzip libelf-dev libncurses5-dev libssl-dev make openssl pahole perl-base rsync tar xz-utils -y

apt install build-essential -y

apt install make gcc bc -y &&
apt install pkg-config libncurses-dev -y &&
apt install flex -y &&
apt install bison -y &&
apt install -y libncurses5-dev flex bison libssl-dev  &&
apt install -y wget curl &&
apt install fakeroot -y&&
apt install  dpkg-dev -y&&
apt install rsync kmod cpio -y &&
apt install libelf-dev -y
☑️ ☆

CUDA

CUDA

Windows 10, 531.61, CUDA 12.1.1 请勿使用最新版本!

NVIDIA Driver 531.61 in https://www.nvidia.cn/Download/index.aspx?lang=cn

  • 不必安装 GeForce Experience 以及 RTX Desktop Manager

  • 安装完成后参见 #My Workstation\Hardware\Tesla&Quadro.md 进行配置

CUDA Toolkit 12.1.1 (包含 531.14 显卡驱动) in https://developer.nvidia.com/cuda-downloads

  • 安装选项默认即可,这里包含的显卡驱动版本 (531.14) 比刚安装的 531.61 更低,所以不会安装。如果不存在更新或相同版本则会更新。 安装选项选择 自定义,只勾选 CUDA

cuDNN (需要登录) (直接选择下载兼容 CUDA 12.x 的最新版本即可)

  • Installing cuDNN on Windows

  • 备注:最终的目录结构应该如下:

    • v8.x 应替换为完整的版本号例如 v8.9.5.29
    • lib 中不应有 x64 目录
展开 cuDNN目录结构 ``` C:\Program Files\NVIDIA>tree /F 卷 ZHITAI TiPlus5000 的文件夹 PATH 列表 卷序列号为 E802-3538 C:. └─CUDNN └─v8.9.5.29 │ LICENSE │ ├─bin │ cudnn64_8.dll │ cudnn_adv_infer64_8.dll │ cudnn_adv_train64_8.dll │ cudnn_cnn_infer64_8.dll │ cudnn_cnn_train64_8.dll │ cudnn_ops_infer64_8.dll │ cudnn_ops_train64_8.dll │ ├─include │ cudnn.h │ cudnn_adv_infer.h │ cudnn_adv_train.h │ cudnn_backend.h │ cudnn_cnn_infer.h │ cudnn_cnn_train.h │ cudnn_ops_infer.h │ cudnn_ops_train.h │ cudnn_version.h │ └─lib cudnn.lib cudnn64_8.lib cudnn_adv_infer.lib cudnn_adv_infer64_8.lib cudnn_adv_train.lib cudnn_adv_train64_8.lib cudnn_cnn_infer.lib cudnn_cnn_infer64_8.lib cudnn_cnn_train.lib cudnn_cnn_train64_8.lib cudnn_ops_infer.lib cudnn_ops_infer64_8.lib cudnn_ops_train.lib cudnn_ops_train64_8.lib ```
  • 环境变量(系统):

    • CUDA Toolkit

      CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1

      CUDA_PATH_V12_1=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1

    • 手动设置

      CUDA_HOME=%CUDA_PATH%

      CUDA_VISIBLE_DEVICES=0 [运行 nvidia-smi (包含在显卡驱动中) 可查看 CUDA 设备号]

  • PATH(系统):

    • CUDA Toolkit

      C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\bin

      C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\libnvvp

    • cuDNN

      C:\Program Files\NVIDIA\CUDNN\v8.9.5.29\bin

    • 显卡驱动

      C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common (PhysX 组件)

    • CUDA Toolkit

      C:\Program Files\NVIDIA Corporation\Nsight Compute 2023.1.1\

CUDA on WSL User Guide 12.1.1 (注意文档对应 CUDA Toolkit 版本!)

  • CUDA Toolkit 12.1.1 Downloads

    $ wget https://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64/cuda-wsl-ubuntu.pin
    $ sudo mv cuda-wsl-ubuntu.pin /etc/apt/preferences.d/cuda-repository-pin-600
    $ wget https://developer.download.nvidia.com/compute/cuda/12.1.1/local_installers/cuda-repo-wsl-ubuntu-12-1-local_12.1.1-1_amd64.deb
    $ sudo dpkg -i cuda-repo-wsl-ubuntu-12-1-local_12.1.1-1_amd64.deb
    $ sudo cp /var/cuda-repo-wsl-ubuntu-12-1-local/cuda-*-keyring.gpg /usr/share/keyrings/
    $ sudo apt-get update
    $ sudo apt-get -y install cuda
    

文档

CUDA Toolkit Documentation 12.1.1 (注意文档对应 CUDA Toolkit 版本!)

NVIDIA cuDNN Documentation

☑️ ☆

Firefox

Firefox

about:config

Ref. https://wiki.archlinux.org/title/Firefox/Tweaks, https://www.jianshu.com/p/6e6937a9574c

dom.ipc.processCount: -1

  • browser.cache.memory.capacity: -1

extensions.pocket.enabled: false

media.hardware-video-decoding.force-enabled: true

  • verify if media.hardware-video-decoding.enabled: true

在当前标签页旁边插入新标签页 browser.tabs.insertAfterCurrent: true

次像素渲染 gfx.font_rendering.cleartype_params.rendering_mode: 5

  • 0 = default, 1 = aliased, 2 = GDI Classic, 3 = GDI Natural, 4 = Natural, 5 = Natural Symmetric(带次像素渲染)

在新标签页中打开地址栏 browser.urlbar.openintab: true

在新标签页中打开书签 browser.tabs.loadBookmarksInTabs: true

在新标签页中打开搜索栏搜索 browser.search.openintab: true

标签页宽度 browser.tabs.tabMinWidth: 128

修改定位服务URL,替换 Google Location Service 为 Mozilla Location Service

geo.provider.ms-windows-location: false

geo.provider.network.url: https://location.services.mozilla.com/v1/geolocate?key=test

然后在 Clash 中修改配置文件,在 rules: 最前面添加一条规则(顺序匹配规则,规则越在前的优先级越高),使其直连以获得真实位置(隐私保护注意!)

如果使用 Clash for Windows,在 配置 页面右键点击配置文件,选择使用 Diff 功能,写入修改即可,若有多个配置,每个都要这样做

  • ‘DOMAIN,location.services.mozilla.com,DIRECT’

启用 Encrypted Client Hello

network.dns.echconfig.enabled: true

Cloudflare 宣布开始推行 Encrypted Client Hello 标准

Encrypted Client Hello (ECH) 是 Encrypted SNI 的后继者,它加密了用于协商 TLS 握手的服务器名称指示 (SNI)。 
这意味着,每当用户访问 Cloudflare 上启用了 ECH 的网站时,除了用户、Cloudflare 和网站所有者之外,没有人能够确定访问了哪个网站。

Cloudflare 目前已经强制为所有免费计划的用户默认启用了ECH,且无法手动关闭。对于GFW来说,加密的SNI意味着,GFW将不再能够通过域名劫持来阻止大陆用户访问国际互联网,仅剩的手段是IP封禁和DNS污染。

Cloudflare 所推行的ECH有着很强的特征,这意味着所有使用ECH的通信都很容易被识别,尽管GFW将不再能够通过SNI来识别用户的目标网站。这与此前并未得到推行的ESNI技术不同,留给GFW的选项并不多。

要么阻断所有ECH流量(其效果将等同于封禁整个Cloudflare网络,这意味着所有使用Cloudflare的网站将会被全数封锁。然而,Cloudflare 服务了全球约 20% 的互联网流量,贸然封禁它带来的后果是不可估量的);要么耗费大量资源,维护一个黑名单IP列表;要么对出境网络实施彻底的白名单制度。

ECH的未来尚不明朗,但我们仍将拭目以待。

参见 Cloudflare官方博客 (https://blog.cloudflare.com/announcing-encrypted-client-hello/)

投稿:@ZaiHuaBot
频道:@TestFlightCN
☑️ ⭐

Netdata

Netdata

使用 windows_exporter 收集 Windows 主机的数据,并使用 Netdata 查看

在要监控的每台 Windows 主机上安装最新的 适用于 Windows 的 Prometheus 导出器 的MSI包, 执行 msiexec /i "[PATH_TO_MSI]" ENABLED_COLLECTORS=process,ad,adcs,adfs,cpu,dns,memory,mssql,net,os,tcp,logical_disk

windows_exporter: http://127.0.0.1:9182/

在监控平台上安装 Netdata。对于本方案,监控平台主机与被监控主机是同一台,使用 Docker Desktop (WSL2 Backend) 安装 Netdata,执行:

docker run -d --name=netdata \
  -p 19999:19999 \
  -v netdataconfig:/etc/netdata \
  -v netdatalib:/var/lib/netdata \
  -v netdatacache:/var/cache/netdata \
  -v /etc/passwd:/host/etc/passwd:ro \
  -v /etc/group:/host/etc/group:ro \
  -v /proc:/host/proc:ro \
  -v /sys:/host/sys:ro \
  -v /etc/os-release:/host/etc/os-release:ro \
  -v /var/run/docker.sock:/var/run/docker.sock:ro \
  --restart unless-stopped \
  --cap-add SYS_PTRACE \
  --cap-add SYS_ADMIN \
  --security-opt apparmor=unconfined \
  netdata/netdata

netdata: http://127.0.0.1:19999

然后配置 netdata,

\wsl.localhost\docker-desktop-data\data\docker\volumes\netdataconfig_data\edit-config

参考资料

Windows machine collector | Learn Netdata

[Install Netdata with Docker Learn Netdata](https://learn.netdata.cloud/docs/installing/docker)
☑️ ☆

Stable-Diffusion

Stable Diffusion

安装与配置

AUTOMATIC1111/stable-diffusion-webui

or an opinionated fork/implementation: vladmandic/automatic

SD WebUI 扩展 (Extension)

待补充

微调 (Fine-tuning)

What I Learned About Fine-tuning Stable Diffusion | harrywang.me

Lora

Civitai | Everything I Know About Lora

LoRA Training Guide

书签

Tag Groups Wiki | Danbooru

Danbooru: Anime Image Board

CIVITAI法典 - Google 文档

Tags collection

shirt overhang ![__inoue_yurina_original_drawn_by_karutamo__786a1a2fdc83fc96df357018b3713e61.png](https://cdn.donmai.us/original/78/6a/__inoue_yurina_original_drawn_by_karutamo__786a1a2fdc83fc96df357018b3713e61.png)

serafuku

school uniform

paizuri

笔记

  • 所有 附加网络(在 prompt 中以这样的形式出现<附加网络:名称:权重>,如Lora、LyCon,<lora:add_detail:0.4>)的权重之和不要大于1,这非常影响图片质量。当使用多个附加网络时,调节其权重的在全部附加网络中的占比以调节其权重。

  • Inpaint 才是局部重绘,重绘涂黑的部分

☑️ ☆

Tesla&Quadro

h1 id=tesla--quadroTesla amp; Quadro/h1 h2 id=tesla-显卡魔改txtTesla 显卡魔改.txt/h2 blockquote p以下两种方案均为 Windows10 22H2 专业版下(本人 x99 平台,用 Windows11 的方案可能会导致一些框架出现兼容性问题,也可以考虑 Windows Server 的方案,目前站内多为 Windows11 的方案)/p /blockquote blockquote pAMD显卡不能双显卡(OpenGL 版本必须兼容,否则会导致 87 报错,举例 P40 为 code class=language-plaintext highlighter-rougeDX12_1/code,与 10 系显卡同代,同时期发布的为 AMD 500 系列显卡,例如 588,理论上混合输出可行,但最好在 Windows11 下)/p /blockquote blockquote p前提条件(顺序不能反,不同主板可能存在差异):/p ul li硬盘改成 GPT 模式(可以使用 DiskGenius 软件,切记改好以后要创建 EFI 文件,否则会无法进入系统)/li li关闭CSM,实测本人的华南 X99-F8 的 BIOS 中为 code class=language-plaintext highlighter-rougeCSM configuration/code 选项调成 code class=language-plaintext highlighter-rougedisabled/code/li li打开 code class=language-plaintext highlighter-rougeAbove 4G Decoding/code 支持多显卡/li li设置 code class=language-plaintext highlighter-rougeFast Boot/code/li /ul /blockquote blockquote p所有方案均推荐优先使用 studio 驱动,目前推荐 527.56(不是最新,当然也可以选择别的版本的驱动,注意不能选择笔记本显卡的 studio 驱动),一般来说先下好驱动,然后再插卡安装驱动,安装驱动的时候最好断网。/p /blockquote h3 id=方案二quadro-显卡和-tesla-p40-一起使用方案二:Quadro 显卡和 Tesla P40 一起使用/h3 blockquote p原理是一样的,其他 quadro 卡也一样步骤,但除非需要 quadro 显卡的专业绘图功能,不再推荐使用 quadro 卡的驱动,而是使用 studio 驱动/p /blockquote h4 id=一选驱动一、选驱动/h4 p这里必须使用 Quadro K600 最新的驱动 473.81(其他 quadro 卡也选择对应版本最新驱动),从官网下载安装即可。/p p安装时选择自定义,注意 RTX Desktop Manager 和 Geforce Experience 没必要装。/p h4 id=二改注册表二、改注册表/h4 p首先退出英伟达控制面板。/p p打开注册表编辑器,找到 code class=language-plaintext highlighter-rougeHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}/code (和P106改注册表差不多)/p blockquote p魔改环境一般都有多个卡,0000 开始就是这些显卡的下标,你的 Tesla 具体是具体是哪个卡,看右侧 code class=language-plaintext highlighter-rougeDriverDesc/code 字段确定。/p /blockquote p导航到 Tesla,改下面两个键:/p ul licode class=language-plaintext highlighter-rougeAdapterType/code,dword 值,改为 code class=language-plaintext highlighter-rouge1/code/li licode class=language-plaintext highlighter-rougeFeatureScore/code,dword 值,从十六进制的 code class=language-plaintext highlighter-rougecf/code 改为十六进制的 code class=language-plaintext highlighter-rouged1/code/li /ul p新建一个键: code class=language-plaintext highlighter-rougeGridLicensedFeatures/code,dword 值,改为code class=language-plaintext highlighter-rouge7/code。(这一步是通过注册表强制打开 Grid 驱动支持,即打开 GPU-Z 中所有显卡功能)/p blockquote p注意这里不能安装 Grid 驱动,否则 Quadro 显卡无法识别。/p /blockquote p在设备管理器中找到 Tesla,禁用设备,再启用设备。/p blockquote p此时 Tesla 显卡已经自动变成 WDDM 模式,不需要再使用命令行修改。(如果没有打开就手动打开一下)/p /blockquote p注册表再次导航到: code class=language-plaintext highlighter-rougeHKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}/code(注意和前面的不一样!)/p p导航到 Tesla,删除 code class=language-plaintext highlighter-rougeAdapterType/code,添加一个 DWORD 32 位值,命名为 code class=language-plaintext highlighter-rougeEnableMsHybrid/code,值修改为code class=language-plaintext highlighter-rouge1/code/p p导航到 Quadro,添加一个 DWORD 32 位值,命名为 code class=language-plaintext highlighter-rougeEnableMsHybrid/code,值修改为 code class=language-plaintext highlighter-rouge2/code/p p刷新注册表:在设备管理器中禁用设备,再启用设备,两个设备都需要这样操作。/p h3 id=三重启电脑三、重启电脑/h3 h3 id=四windows图形设置四、Windows图形设置/h3 blockquote p使用 Windows 10 图形设置功能,您可以将某个应用或程序强制调用指定的显卡,从而达到最佳的使用性能,其优先级高于显卡控制面板的设置。/p /blockquote p操作步骤:/p p右键单击桌面空白处,选择显示设置。/p p点击显示 gt; 图形设置。/p p选择桌面应用或 Microsoft Store 应用(部分系统版本中显示的是通用应用或经典应用),选择您需要设置的应用,点击添加,然后点击选项。/p p将图形规格设置为高性能(即 Tesla 显卡,当然也可以选择 Quadro 显卡),点击保存即可。/p h3 id=实际使用实际使用/h3 p3Dmark 等游戏基本上正常调用,压力测试可以看到多显卡选项(如果使用高性能 GeForce 显卡,例如 RTX3090 ,则不需要改混合输出了) CUDA 和 Cudnn 可以正常安装,pytorch正常调用,可能存在 CUDA 设备号和 nvidia-smi 查看到的序号不一样的情况(此问题可以通过重新清洁安装驱动的方法解决)/p h3 id=推荐搭配推荐搭配/h3 pGeForce 方案最新 studio 驱动支持的最低显卡是 gtx1050(尽量选择同代,否则会出现 OpenGL 版本兼容性问题,导致电脑卡顿) quadro 方案要支持最新驱动建议选择 k620,当然也可以选择 p400(同代兼容性更好) 要安装最新驱动,显卡不得低于初代 Maxwell 架构,即 k620/p h3 id=补充一下-tesla-m40-的方法补充一下 Tesla M40 的方法/h3 pM40 可以和 k600 搭配,也可以和 900 系游戏卡搭配,但是都不能使用最新驱动。 M40 不需要魔改注册表,可直接通过命令行开启 wddm ,具体为: code class=language-plaintext highlighter-rougenvidia-smi -dm 0 -i lt;显卡idgt;/code,然后再改一下混合输出就能用,如果核显的话直接在控制面板里面设置全局调用即可。/p h3 id=关于主动散热改造关于主动散热改造/h3 pP40 的 pcb 布局和公版 1080ti 一致,仅供电接口位置不同,尽量不要改供电接口。散热器可以选择公版 1080ti 涡轮、titan x pascal、titan xp以及 pcb 采用公版方案的散热器(影驰耕升),注意 mos 散热即可。理论上其他 58 孔距的散热器也可以。当然也可以直接买那种 3D 打印的散热器,一个小涡轮的那种。 M40 的 pcb 布局和公版 980ti 一致,仅供电接口位置不同,尽量不要改供电接口。散热器可以选择公版 980ti 涡轮、gtx titan x 以及 pcb 采用公版方案的散热器,注意 mos 散热即可。理论上其他 58 孔距的散热器也可以。当然也可以直接买那种 3D 打印的散热器,一个小涡轮的那种。 P40 和 M40 的 pcb 布局基本一致,所以两个方案兼容。/p
☑️ ☆

Windows

h1 id=windowsWindows/h1 h2 id=安装与配置安装与配置/h2 ul lia href=https://atlasos.net/AtlasOS/a ul li p安装前硬盘提前在 WinPE 中用 DiskGenius 分好区/p p快速分区;strongGPT 分区表/strong;1个分区;创建 ESP、MSR 分区,大小默认/p /li li p跳过OOBE,启用 Administrator 账户安装/p pRef: a href=https://www.bilibili.com/read/cv4532680https://www.bilibili.com/read/cv4532680/a/p /li /ul /li li p安装必要的应用 a href=https://store.rg-adguard.net/store.rg-adguard.net/a/p div class=language-yaml highlighter-rougediv class=highlightpre class=highlightcodespan class=naPackages/spanspan class=pi:/span span class=pi-/span span class=naProductId/spanspan class=pi:/span span class=s9NBLGGH4NNS1/span span class=c1# 应用安装程序(winget)/span span class=pi-/span span class=naProductId/spanspan class=pi:/span span class=s9N4WGH0Z6VHQ/span span class=c1# 来自设备制造商的HEVC扩展/span span class=pi-/span span class=naPackageFamilyName/spanspan class=pi:/span span class=sMicrosoft.WindowsStore_8wekyb3d8bbwe/span span class=c1# Microsoft Store(备选,后面的方法无用时再来使用)/span span class=pi-/span span class=naProductId/spanspan class=pi:/span span class=s9NRMNT6GMZ70/span span class=c1# 中文(简体)本地体验包/span /code/pre/div /div div class=language-powershell highlighter-rougediv class=highlightpre class=highlightcodespan class=nAdd-AppxPackage/spanspan class=w /spanspan class=errlt;/spanspan class=nxfile/spanspan class=errgt;/spanspan class=w /span/code/pre/div /div /li li p使用 winget 安装 Visual C++ Redistributable/p details summary展开/summary ```powershell winget install Microsoft.VCRedist.2005.x86 winget install Microsoft.VCRedist.2005.x64 winget install Microsoft.VCRedist.2008.x86 winget install Microsoft.VCRedist.2008.x64 winget install Microsoft.VCRedist.2010.x86 winget install Microsoft.VCRedist.2010.x64 winget install Microsoft.VCRedist.2012.x86 winget install Microsoft.VCRedist.2012.x64 winget install Microsoft.VCRedist.2013.x86 winget install Microsoft.VCRedist.2013.x64 winget install Microsoft.VCRedist.2015+.x86 winget install Microsoft.VCRedist.2015+.x64 ``` /details /li li p使用 winget 安装 .NET Runtime/p details summary展开/summary ```powershell winget install Microsoft.DotNet.DesktopRuntime.7 winget install Microsoft.DotNet.DesktopRuntime.6 winget install Microsoft.DotNet.DesktopRuntime.5 winget install Microsoft.DotNet.DesktopRuntime.3_1 ``` /details /li li p使用 a href=https://blog.csdn.net/vbcom/article/details/7245186DirectX 修复工具/a 安装 DirectX/p /li li p安装 Microsoft Store/p div class=language-powershell highlighter-rougediv class=highlightpre class=highlightcodespan class=nGet-AppXPackage/spanspan class=w /spanspan class=o*/spanspan class=nxWindowsStore/spanspan class=o*/spanspan class=w /spanspan class=nt-AllUsers/spanspan class=w /spanspan class=o|/spanspan class=w /spanspan class=krForeach/spanspan class=w /spanspan class=p{/spanspan class=nAdd-AppxPackage/spanspan class=w /spanspan class=nt-DisableDevelopmentMode/spanspan class=w /spanspan class=nt-Register/spanspan class=w /spanspan class=s2/spanspan class=si$(/spanspan class=bp$_/spanspan class=o./spanspan class=nfInstallLocation/spanspan class=si)/spanspan class=s2\AppXManifest.xml/spanspan class=p}/spanspan class=w /span/code/pre/div /div /li li p安装 a href=https://go.microsoft.com/fwlink/p/?LinkId=2124703EdgeWebview/a (某些程序可能依赖它)/p pa href=https://go.microsoft.com/fwlink/p/?LinkId=2124703备用链接/a/p /li /ul blockquote pstrong软件包管理:WinGet 与 Scoop/strong/p /blockquote ul li p关快速启动/p /li li p启用休眠。因为 S3 睡眠与 DXE 鸡血不兼容/p ul li控制面板,电源选项,选择电源按钮的功能, img src=https://s2.loli.net/2023/06/24/c9YNFlMgn4hfqzy.png alt=power-config //li /ul /li li p系统属性,启动和故障恢复,写入调试信息,无/p /li li p当按下睡眠按钮时,系统进入休眠状态。/p pRef: a href=https://learn.microsoft.com/en-us/windows-hardware/customize/power-settings/power-button-and-lid-settings-sleep-button-actionhttps://learn.microsoft.com/en-us/windows-hardware/customize/power-settings/power-button-and-lid-settings-sleep-button-action/a/p pcode class=language-plaintext highlighter-rougeHKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Power\PowerSettings\4f971e89-eebd-4455-a8de-9e59040e7347\96996bc0-ad50-47ec-923b-6f41874dd9eb/code(若没有就查找 code class=language-plaintext highlighter-rouge96996bc0-ad50-47ec-923b-6f41874dd9eb/code),code class=language-plaintext highlighter-rougeAttributes/code 改为 code class=language-plaintext highlighter-rouge2/code/p /li li pMSStore,能源之星X/p /li /ul blockquote p随手休眠/p /blockquote ul listronga href=https://github.com/Koshak1013/HuananzhiX99_BIOS_modsKoshak1013/HuananzhiX99_BIOS_mods/a/strong/li /ul blockquote pstrongTip: 不要忘记利用还原点,如在配置驱动程序前创建还原点/strong/p /blockquote ul li pInSpectre,关闭幽灵熔断补丁,对比前后基准测试得分/p pa href=https://www.grc.com/files/InSpectre.exeInSpectre.exe/a from a href=https://www.grc.com/inspectre.htmhttps://www.grc.com/inspectre.htm/a/p /li li div class=language-powershell highlighter-rougediv class=highlightpre class=highlightcodespan class=nscoop/spanspan class=w /spanspan class=nxbucket/spanspan class=w /spanspan class=nxadd/spanspan class=w /spanspan class=nxextras/spanspan class=w /spanspan class=nscoop/spanspan class=w /spanspan class=nxinstall/spanspan class=w /spanspan class=nxextras/wpd/spanspan class=w /span/code/pre/div /div /li li pa href=https://www.sordum.org/9470/windows-update-blocker-v1-8/Windows Update Blocker/a/p /li li pa href=https://github.com/swagkarna/Defeat-Defender-V1.2.0Defeat Defender/a/p /li li p基准测试/p ul liCPU-Z/li liCPU-Z AVX2/li liCinebench R23/li li3DMark Time Spy/li li3DMark CPU Profile/li /ul /li li p压力测试/p ul liAIDA64 单烤FPU/li liPrime 95/li liLinX (测试AVX2)/li liFurmark/li /ul /li /ul h2 id=安装驱动程序安装驱动程序/h2 h3 id=主板主板/h3 pa href=http://www.huananzhi.com/more.php?lm=10amp;id=642X99-F8D PLUS V1.2 主板驱动/a/p h3 id=nvidiaNVIDIA/h3 p参见 code class=language-plaintext highlighter-rouge../Hardware/Teslaamp;Quadro.md/code/p ul liNV控制面板 输出动态范围 完全/li /ul h3 id=snappy-driver-installer-originstronga href=https://www.snappy-driver-installer.org/Snappy Driver Installer Origin/a/strong/h3 h2 id=安装软件与配置工作负载安装软件与配置工作负载/h2 blockquote pstrong此处只列举想到的部分,完整列表可参见现有设备上的 code class=language-plaintext highlighter-rougechoco list/code 、code class=language-plaintext highlighter-rougewinget list/code 的输出,或 BCUninstaller 列出的列表/strong/p /blockquote ul li pMozilla Firefox/p blockquote p若跳转到特供版,尝试代理,再不行全局,还不行全局美国/p /blockquote pa href=https://www.mozilla.org/en-US/firefox/download/thanks/https://www.mozilla.org/en-US/firefox/download/thanks//a/p /li li p各种破解软件/p ul li pProcess Lasso Pro/p pcode class=language-plaintext highlighter-rougeD:\Index_2023\Process Lasso Pro 12.0.2.18.rar/code/p /li li pESET Endpoint Antivirus/p pcode class=language-plaintext highlighter-rouge[bit.ly/43QyBFt](https://bit.ly/43QyBFt)/code/p /li li pIDM/p pcode class=language-plaintext highlighter-rougeD:\Index_2022_(Archived)\Index_2022\IDM绿色版(recommended)\IDM v6.38.7.2 中文绿色特别版.rar/code/p /li li pBeyond Compare/p pcode class=language-plaintext highlighter-rougeD:\GitHub_Repos\Beyond-Compare/code from a href=https://github.com/YKB2333/Beyond-Comparehttps://github.com/YKB2333/Beyond-Compare/a/p /li li pWinRAR/p pcode class=language-plaintext highlighter-rougeD:\Index_2023\WinRAR-6.22-x64-Final-烈火汉化版.exe/code from a href=https://www.423down.com/778.htmlhttps://www.423down.com/778.html/a/p /li li pPrimo Cache/p pcode class=language-plaintext highlighter-rougeD:\Index_2023\Primo Cache Server Edition 4.2.0 數位授權破解版_密码APK_TW.zip/code/p blockquote p加速ST4000VX015,一缓内存,二缓傲腾M10/p /blockquote /li li pGroupy/p pcode class=language-plaintext highlighter-rougeD:\Index_2023\Stardock Groupy/code/p /li li p3DMark/p pcode class=language-plaintext highlighter-rougeD:\Index_2023\3DMark/code/p /li li pBitComet/p /li /ul pcode class=language-plaintext highlighter-rougeD:\Index_2023\BitComet Stable (build 2.0.5.15) 比特彗星全功能解锁豪华版.7z/code/p ul li pAdobe Acrobat Pro/p /li li pUltimate Defrag/p pcode class=language-plaintext highlighter-rougeD:\Index_2023\UltimateDefrag6Setup.exe/code/p /li /ul /li li div class=language-powershell highlighter-rougediv class=highlightpre class=highlightcodespan class=nscoop/spanspan class=w /spanspan class=nxbucket/spanspan class=w /spanspan class=nxadd/spanspan class=w /spanspan class=nxversions/spanspan class=w /spanspan class=nscoop/spanspan class=w /spanspan class=nxinstall/spanspan class=w /spanspan class=nxversions/7zip-zstd/spanspan class=w /span/code/pre/div /div /li li pa href=https://github.com/Z-Siqi/Clash-for-Windows_ChineseClash-for-Windows_Chinese/a/p ul li p我的 Clash for Windows Mixin 配置 a href=https://bit.ly/42QwvUGbit.ly/42QwvUG/a/p /li li pGeoIP 数据库自动更新脚本:code class=language-plaintext highlighter-rougeC:\Users\jiera\.config\clash\update-geoip2.py/code/p /li /ul /li li pWindHawk/p /li li pcode class=language-plaintext highlighter-rougescoop install extras/powertoys/code/p /li li pcode class=language-plaintext highlighter-rougescoop install extras/memreduct/code/p /li li pcode class=language-plaintext highlighter-rougescoop install extras/everything/code/p /li li pcode class=language-plaintext highlighter-rougescoop install extras/wiztree/code/p /li li pcode class=language-plaintext highlighter-rougescoop install extras/bulk-crap-uninstaller/code/p /li li pcode class=language-plaintext highlighter-rougescoop install extras/bulk-rename-utility/code/p /li li pcode class=language-plaintext highlighter-rougescoop install extras/fastcopy/code/p /li li pa href=https://www.iobit.com/en/iobit-unlocker.phpIOBit Unlocker/a/p /li li图吧工具箱系列 ul liAIDA64 (使用图吧工具箱中的)/li licode class=language-plaintext highlighter-rougescoop install extras/dismplusplus/code/li licode class=language-plaintext highlighter-rougescoop install extras/cpu-z/code/li licode class=language-plaintext highlighter-rougescoop install extras/hwinfo/code/li licode class=language-plaintext highlighter-rougescoop install extras/coretemp/code/li licode class=language-plaintext highlighter-rougescoop install extras/throttlestop/code/li lia href=https://www.intel.cn/content/www/cn/zh/download/17881/intel-extreme-tuning-utility-intel-xtu.htmlIntel XTU/a/li licode class=language-plaintext highlighter-rougescoop install extras/gpu-z/code/li licode class=language-plaintext highlighter-rougescoop install extras/msiafterburner/code/li licode class=language-plaintext highlighter-rougescoop install extras/furmark/code/li licode class=language-plaintext highlighter-rougescoop install extras/ddu/code/li licode class=language-plaintext highlighter-rougescoop install extras/diskgenius/code/li licode class=language-plaintext highlighter-rougescoop install extras/crystaldiskinfo/code/li licode class=language-plaintext highlighter-rougescoop install extras/crystaldiskmark/code/li liCineBenchR23/li /ul /li li pTemp目录重定向到ImDisk内存盘/p /li li pJava/p ul lia href=https://www.oracle.com/java/technologies/downloads/#java17JDK 17 LTS/a/li li div class=language-powershell highlighter-rougediv class=highlightpre class=highlightcodespan class=nscoop/spanspan class=w /spanspan class=nxbucket/spanspan class=w /spanspan class=nxadd/spanspan class=w /spanspan class=nxjava/spanspan class=w /spanspan class=nscoop/spanspan class=w /spanspan class=nxinstall/spanspan class=w /spanspan class=nxjava/oraclejre8/spanspan class=w /spanspan class=nscoop/spanspan class=w /spanspan class=nxinstall/spanspan class=w /spanspan class=nxjava/oraclejdk-lts/spanspan class=w /spanspan class=c# JDK17/spanspan class=w /span/code/pre/div /div /li /ul /li liPython lt;!– ul liPython 3.7 (为venv备用)/li liPython 3.10 (为不兼容3.11的库备用)/li liPython 3.11 (PATH, pip install 用它) –gt;/li licode class=language-plaintext highlighter-rougescoop install extras/anaconda3/code ul libase (py310, PATH)/li lipy311/li lipy37/li lipyside6 (py311, code class=language-plaintext highlighter-rougepip install PySide6/code)/li /ul /li /ul /li li pcode class=language-plaintext highlighter-rougescoop install main/msys2/code/p /li li p字体/p blockquote p切记:右键,为所有用户安装(管理员权限)/p /blockquote ul li pa href=https://github.com/adobe-fonts/source-han-sans思源黑体/a amp; a href=https://github.com/adobe-fonts/source-han-serif思源宋体/a strong(Static Language Specific OTFs)/strong/p blockquote pimg src=https://s2.loli.net/2023/06/18/NF2xV7ovl1cRmOU.png alt=安装这些 //p /blockquote /li li div class=language-powershell highlighter-rougediv class=highlightpre class=highlightcodespan class=nscoop/spanspan class=w /spanspan class=nxbucket/spanspan class=w /spanspan class=nxadd/spanspan class=w /spanspan class=nxnerd-fonts/spanspan class=w /spanspan class=nscoop/spanspan class=w /spanspan class=nxinstall/spanspan class=w /spanspan class=nxnerd-fonts/Wenquanyi-Microhei/spanspan class=w /span/code/pre/div /div /li licode class=language-plaintext highlighter-rougescoop install nerd-fonts/JetBrains-Mono/code/li /ul /li li pcode class=language-plaintext highlighter-rougescoop install main/clink/code/p ul li复制 “C:\Users\jiera\AppData\Local\clink\clink_history”/li /ul /li li pa href=https://visualstudio.microsoft.com/Visual Studio/a/p ul liC++ 生成工具/li /ul /li li div class=language-powershell highlighter-rougediv class=highlightpre class=highlightcodespan class=nscoop/spanspan class=w /spanspan class=nxbucket/spanspan class=w /spanspan class=nxadd/spanspan class=w /spanspan class=nxextras/spanspan class=w /spanspan class=nscoop/spanspan class=w /spanspan class=nxinstall/spanspan class=w /spanspan class=nxextras/pycharm/spanspan class=w /span/code/pre/div /div /li li pcode class=language-plaintext highlighter-rougescoop install extras/vscode/code/p /li li pcode class=language-plaintext highlighter-rougescoop install extras/sublime-text/code/p /li li pcode class=language-plaintext highlighter-rougescoop install main/cloudflared/code/p /li li pMicrosoft Office/p pcode class=language-plaintext highlighter-rougescoop install extras/office-tool-plus/code/p /li li pcode class=language-plaintext highlighter-rougescoop install extras/context-menu-manager/code/p /li li pcode class=language-plaintext highlighter-rougescoop install extras/potplayer/code/p ul li div class=language-powershell highlighter-rougediv class=highlightpre class=highlightcodespan class=nscoop/spanspan class=w /spanspan class=nxbucket/spanspan class=w /spanspan class=nxadd/spanspan class=w /spanspan class=nxnonportable/spanspan class=w /spanspan class=nscoop/spanspan class=w /spanspan class=nxinstall/spanspan class=w /spanspan class=nxnonportable/lavfilters-np/spanspan class=w /span/code/pre/div /div /li licode class=language-plaintext highlighter-rougescoop install extras/madvr/code/li /ul /li li pcode class=language-plaintext highlighter-rougescoop install extras/mpv/code/p /li li pcode class=language-plaintext highlighter-rougescoop install extras/sharex/code/p /li li pcode class=language-plaintext highlighter-rougescoop install extras/sumatrapdf/code/p /li lia href=https://github.com/xiaoyifang/goldendict-ngxiaoyifang/goldendict-ng/a/li /ul h2 id=文件管理文件管理/h2 ul li p不再使用 code class=language-plaintext highlighter-rouge~/Desktop/新建文件夹/code/p ul li其中绿色版软件使用scoop安装,scoop中没有的,放于 code class=language-plaintext highlighter-rouge/Program Files//code or code class=language-plaintext highlighter-rouge/Program Files (x86)/code/li li程序快捷方式放于开始菜单文件夹(code class=language-plaintext highlighter-rougeC:\Users\Administrator\AppData\Roaming\Microsoft\Windows\Start Menu\Programs/code)/li li其他文档放于 code class=language-plaintext highlighter-rouge~/Documents/code/li /ul /li li p定期归档 code class=language-plaintext highlighter-rouge~/Downloads/code 中的文件/p p有用的文件放至 code class=language-plaintext highlighter-rougeD:\Index_20xx/code,其他文件至 code class=language-plaintext highlighter-rougeD:\[Archived]\MyWorkstation\Downloads/code/p p请遵循 code class=language-plaintext highlighter-rougeD:\[Archived]\README.md/code/p /li /ul
☑️ ⭐

WSL

h1 id=wslWSL/h1 h2 id=installationInstallation/h2 pstronga href=https://learn.microsoft.com/en-us/windows/wsl/installhttps://learn.microsoft.com/en-us/windows/wsl/install/a/strong/p pa href=https://learn.microsoft.com/en-us/windows/wsl/tutorials/gui-appsWSLg tutorial/a/p h2 id=troubleshootinga href=https://learn.microsoft.com/zh-cn/windows/wsl/troubleshootingTroubleshooting/a/h2 ul li perror 2147942402 (0x80070002) when launching Ubuntu 18.04 in WSL/p pAdd code class=language-plaintext highlighter-rouge%USERPROFILE%\AppData\Local\Microsoft\WindowsApps/code to User PATH/p pNote: 如果有 Python 记得把它放Python的PATH下面/p pa href=https://askubuntu.com/a/1422009https://askubuntu.com/a/1422009/a/p /li /ul h2 id=localizationLocalization/h2 div class=language-bash highlighter-rougediv class=highlightpre class=highlightcodespan class=nbsudo /spanapt update span class=nbsudo /spanapt span class=nbinstall /spanlanguage-pack-zh-hans /code/pre/div/div pcode class=language-plaintext highlighter-rougesudo dpkg-reconfigure locales/code/p ul li pzh_CN.UTF-8 UTF-8/p /li li pzh_CN.UTF-8/p /li /ul h2 id=cuda-wsl-2CUDA WSL 2/h2 pstronga href=https://docs.nvidia.com/cuda/wsl-user-guide/index.htmlhttps://docs.nvidia.com/cuda/wsl-user-guide/index.html/a/strong/p
❌