首页
关于 About
网站安全性 Security
Search
1
Chrome/Chromium 在 Linux 平台的视频硬解方案
1,545 阅读
2
将 USB 设备连接到 WSL2
302 阅读
3
关闭 Intel VMD 解决 INACCESSIBLE_BOOT_DEVICE 蓝屏
273 阅读
4
Android 14 平台程序开发中文件共享权限问题
200 阅读
5
为河北邯郸被害少年发声
199 阅读
数字安全
教程
公告
默认
高通设备开发
登录
Search
标签搜索
Linux
Windows
Qualcomm
QCS8250
SM8250
高通
Chromium
Chrome
AppArmor
PKI
Android
OpenWrt
NVIDIA
CertificateTransparency
X509
Python
pip
Docker
Electron
WSL
日暮清林
累计撰写
22
篇文章
累计收到
11
条评论
首页
栏目
数字安全
教程
公告
默认
高通设备开发
页面
关于 About
网站安全性 Security
搜索到
14
篇与
的结果
2024-02-07
Chrome/Chromium 在 Linux 平台的视频硬解方案
前言“天下苦 NVIDIA 久矣” —— 不知道谁说的切换生产环境到 Linux 后,各种调教是必不可少的,但是忽然发现 Chrome 竟然没有视频硬解,这真的太恐怖了。各种研究,发现许多人说自从 99 版本后,Chrome 在 Linux 平台上基于 VA-API 的视频解码似乎就失效了。经过摸索后终于发现解决方案。测试于 Intel Core i7-13700H 平台的 Intel Alderlake_p (12Gen) 核心显卡,电脑也搭载了 NVIDIA RTX4060 Laptop 8GB 独立显卡。电脑已装 Intel intel-media-va-driver-non-free iHD 驱动和 NVIDIA Linux 545.23.08 驱动。使用 Intel 核显启动(默认)Chrome.目前还未测试在编译安装第三方开发者为 NVIDIA 显卡编写的 libva 驱动后,Chrome 是否可以使用该驱动硬解。原因不明。解决方案Chrome 启动命令行加入下列命令行参数来启用 VaapiVideoDecodeLinuxGL 特性,同时禁用(忽略)硬编码于 Chrome 的显卡黑名单。--ignore-gpu-blocklist --enable-features=VaapiVideoDecodeLinuxGL除此之外,若想完整使用硬解码和硬编码能力,可使用下列命令行参数:--use-gl=angle --use-angle=gl --ignore-gpu-blocklist --enable-features=VaapiVideoDecodeLinuxGL,VaapiVideoEncoder,VaapiOnNvidiaGPUs --disable-gpu-driver-bug-workaround请注意:VaapiOnNvidiaGPUs特性仅用于测试 NVIDIA 显卡注:第三方编写的 nvidia-vaapi-driver 仅支持硬解码,不支持硬编码。
2024年02月07日
1,545 阅读
0 评论
1 点赞
2024-02-02
快速上手编译 OpenWrt
前言快速编译 OpenWrt!(演示于 Ubuntu 24.04 LTS 系统)教程安装编译依赖sudo apt update && sudo apt install build-essential ccache ecj fastjar file g++ gawk gettext git java-propose-classpath libelf-dev libncurses5-dev libncursesw5-dev libssl-dev python-is-python3 python3 unzip wget python3-distutils python3-setuptools python3-dev rsync subversion swig time xsltproc zlib1g-dev拉取源码git clone https://git.openwrt.org/openwrt/openwrt.git为路由器准备配置文件拉取并安装所有 seeds 源./scripts/seeds update -a && ./scripts/seeds install -a打开 GUI 菜单并配置make menuconfig预下载编译资源make -j $(nproc --all) download开始编译make -j $(nproc --all)等待编译完成即可。编译产物可在 ./bin/ 内获取。
2024年02月02日
68 阅读
0 评论
0 点赞
2024-02-01
Android 14 平台程序开发中文件共享权限问题
前言最近在写 Android 应用项目,在 App 内部存储(/data/data/<package_name>/)的 context files 里存了一个文件。想要调用系统程序打开。结果报错 FileUriExposedException。原因自从 Android 7 开始,应用间的文件共享必须使用 content:// scheme 的 Uri 来访问,而通常从 File 对象获取到的 Uri 均为 file:// 的 scheme。而 Google 禁止应用程序间使用 file:// 的 Uri 来共享文件。解决方案试过直接禁用严格模式(StrictMode) 但是没有用。因此需要在清单文件 AndroidManifest.xml 中注册程序的 FileProvider,随后使用 FileProvider 获取文件的 content:// Uri。代码自行替换下面代码部分内容中的包名 com.example.application1 为你程序的包名,请勿无脑复制粘贴。注册 FileProvider<application> ... <provider android:name="androidx.core.content.FileProvider" android:authorities="com.example.application1.provider" android:exported="false" android:grantUriPermissions="true"> <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/provider_paths" /> </provider> ... </application>在 res/xml/ 下新建 xml 文件 provider_paths.xml,在其中指定程序可访问的路径。<?xml version="1.0" encoding="utf-8"?> <paths> <files-path name="files_root" path="."/> </paths>在程序调用代码: val fileUri: Uri = FileProvider.getUriForFile( this, "com.example.application1.provider", File(filesDir, RESULT_FILE_NAME) ) val intent = Intent(Intent.ACTION_VIEW).apply { data = fileUri addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION) } startActivity(intent)
2024年02月01日
200 阅读
0 评论
0 点赞
2024-01-28
基于 Electron 的软件无法运行在 Ubuntu 24.04 LTS 的解决方案
前言从 Ubuntu 23.10 更新到 Ubuntu 24.04 LTS 后发现所有基于 Electron 的 app 都无法打开。比如 QQ 和 Motrix。原因Ubuntu 所用的 Linux 内核自带 AppArmor 做访问控制。在 Ubuntu 24.04 LTS 中默认启用了 kernel.apparmor_restrict_unprivileged_userns 安全特性。解决方案临时解决在终端中临时禁用(重启后失效)该特性:sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0持久化生效修改 sysctl 配置文件:sudo vim /etc/sysctl.conf文件末尾加入:kernel.apparmor_restrict_unprivileged_userns=0随后重新载入:sudo sysctl -p
2024年01月28日
140 阅读
0 评论
0 点赞
1
2
3