Posts with tag ubuntu

Bluetooth open but cant find device

2024-06-24
bluetoothosubuntu

Bluetooth open but cant find deviceTry this firstsudo rmmod btusb sleep 1 sudo modprobe btusbIf failed, try:ref: https://blog.51cto.com/u_14193285/5985919# 关闭蓝牙设备 sudo hciconfig hci0 down # 卸载蓝牙模块 sudo rmmod btusb # 重加载蓝牙模块 sudo modprobe btusb # 解锁蓝牙设备 sudo rfkill unblock bluetooth # 开启蓝牙设备 sudo hciconfig hci0 up #重启蓝牙服务 sudo systemctl restart bluetooth我这边做到 hci0 up 就无法继续了,但是没关系,关机 30s 后恢复,蓝牙就正常工作了。下午又挂了!而且上面方法没用了!试试这个,又成功启动了:https://blog.csdn.net/Insight__/article/details/132777714# 卸载并重新加载btusb内核模块(支持蓝牙设备的内核模块) sudo rmmod btusb sleep 1 sudo modprobe btusb # 安装蓝牙工具和工具包 # 使用apt安装blueman蓝牙管理工具 sudo apt install blueman # 使用apt-get安装blue-utils蓝牙实用工具 sudo apt-get install blue-utils # 使用apt-get安装bluez蓝牙套件的所有相关包 sudo apt-get install bluez* # 3、启动蓝牙服务 sudo service bluetooth start # 4、重新解除蓝牙设备的阻止 # 阻止蓝牙设备 rfkill block bluetooth # 解除对蓝牙设备的阻止 rfkill unblock bluetooth this cmd verified to be effective on 24.6.25this cmd verified to be effective on 24.6.25 again, the rmmod and modprobe is enoughthis cmd verified to be effective on 24.6.27 again, the rmmod and modprobe is enoughthis cmd verified to be effective on 24.9.9 on linux, the rmmod and modprobe is enoug

start-service-at-boot

2024-03-27
osserviceubuntu

Sol 1查看如下教程,注意,需要 sudo su nvidia -c 'bash /home/nvidia/Workspace/autoaim_startup.sh' 以用 nvidia 环境:tested ref: https://www.linode.com/docs/guides/start-service-at-boot/Tested in 2023, on Nvidia AGX. No problem.Sol 2sudo vim /etc/systemd/system/my_script.service[Unit] Description=My Custom Script After=network.target [Service] Type=simple ExecStart=/path/to/your/script.sh Restart=on-failure User=your_username # 可选,指定运行用户(如 root 或普通用户). 似乎不需要 [Install] WantedBy=multi-user.targetchmod +x /path/to/your/script.shsudo systemctl daemon-reload # 重新加载 systemd 配置 sudo systemctl enable my_script # 开机自启动 sudo systemctl start my_script # 立即运行查看状态和日志sudo systemctl status xxx journalctl [--user] -u xxx.service -

win + R, diskpart

2024-01-15
osubuntu

时间: 23.7.3系统: 双系统 win11 + ubuntu 22.04UninstallF2 进入 BIOS,进入 Boot,把 Windows 移到最上面,Save and ExitWin + R listpart 删除 Ubuntu 分区(由 15 GB 开头的“未知”分区)。给系统分区命名,然后用管理员打开记事本,打开其中文件资源管理器删除系统分区下 EFI 下 Ubuntu。see: https://blog.csdn.net/Wenyuanbo/article/details/126381967注意:就算你装 ubuntu 的时候没有手动分出 efi,仍然需要删除该教程中第一个 EFI/ubuntu 文件夹(用记事本那个),但第二个 EFI 分区不用删。进入 BIOS,把 Windows 移到最先启动,保存退出如下# win + R, diskpart list disk # 选择 ubuntu 所在磁盘 select disk 0 # 选择 ubuntu 所在分区,类型必为未知,可在磁盘管理中查看 select partition 5 delete partition override # 选择 ubuntu EFI 所在分区,一般是 1 select partition 1 assign letter=P # 记事本管理员打开,选择 打开 -> 删除 P 盘 EFI/ubuntu remove letter=PDone. 进磁盘管理看看 ubuntu 分区是不是变成未分配了。Installref: https://zhuanlan.zhihu.com/p/461271487ref: https://www.cnblogs.com/easy5weikai/p/17470402.html买一个 U 盘下载 ubuntu-amd64.iso用 Rufus 软件把 U 盘变成启动盘(需下载)计算机管理 -> C 盘压缩出 200 MB 作为 存放 Ubuntu EFI。另外开一个未知分区作为 Ubuntu 硬盘(很可能不需要)重启进入 BIOS,修改 Boot Mode 为 UEFI Only,然后把 U 盘放在 Windows 上面分区,200 MB 作为 efi ,剩下所有作为 /Install,改 BIOS 中的启动顺序特殊系统win10 + 华硕主板进入 bios 很难,见:https://zhuanlan.zhihu.com/p/374951491开启 CSM 也不方便,见:https://www.machunjie.com/linux/302.html以上在 24-6-24 测试成功。Configure to your style终端sudo apt install konsole sudo apt install neovim # 这个版本会比较老,之后去 neovim release 下个新的 sudo apt install git sudo apt install curlapt 源下面这个是 ubuntu 22.04 arm64 好用的清华源:# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释 deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy-updates main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy-updates main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy-backports main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy-backports main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy-security main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy-security main restricted universe multiverse # 预发布软件源,不建议启用 # deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy-proposed main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy-proposed main restricted universe multiversessh 和 mfans 服务器ssh-keygen -t rsa ssh-copy-id username@remote-server现在可以免密码连接服务器了。nvim ~/.ssh/config Host mfa HostName mfans.fans User julyfunfish shellsudo apt-add-repository ppa:fish-shell/release-3 sudo apt update sudo apt install fish chsh -s /usr/bin/fish gnome-session-quit mkdir -p ~/Documents/GitHub cd ~/Documents/GitHub scp -r mfa:~/Documents/GitHub/mfa.fish .vim .../config.fish source .../mfa.fishmfa init接下来可以用另一台电脑传递文件和信息了。clash for windows下载 Clash for windows,运行可执行文件,放入配置文件 (.yaml)记住 Ubuntu 中必须把 Settings -> Network proxy 改成 127.0.0.1:7890(我把 http, https, socks5 都改成这个了,可以)cfw 会调用 clash。如果 ./cfw 报错:FATA[0000] Parse config error: yaml: unmarshal errors: line 1: cannot unmarshal !!str `c3M6Ly9...` into config.RawConfig那是因为 ~/.config/clash 里面的配置废了。rm -rf 以后在重新运行一次 clash,输出三行后可以退出。同样把可以用的 profiles.yaml 传过去,用 clash for windows 打开.Oh my fishgithub 搜 oh-my-fish. 用 curl 下载的。curl https://raw.githubusercontent.com/oh-my-fish/oh-my-fish/master/bin/install | fishbassomf install bass omf install lneovimIn ~/.config/nvim/init.vimset number set relativenumber见 neovim 相关文章。搜狗拼音按照官方教程装。如果你出现假的输入法切换,那么你就sudo vim /etc/environment GTK_IM_MODULE=fcitx QT_IM_MODULE=fcitx XMODIFIERS=@im=fcitx不断地 logout。[later 2025] For ubuntu 22.04, 我没有成功使用 sogou pinyin,最后用的 Google Pinyin (同样是 fcitx 框架)常用软件wget http://fishros.com/install -O fishros && bash fishrosGithub DesktoprosVSCoderose-pineclangd打开一个 cpp 自动安装 clangd,好吧其实不一定成功,那么下载 clangd 的 zip 然后解压,在 vscode clangd 的位置参数里面填位置。cmakecode spell checkertabnineneovimclang-formatpip install clang-formatclang-tidypip install clang-tidyerror lenscudanvidia-detector > nvidia-driver-535 # 下面这句不一定对 sudo apt install nvidia-utils-535 sudo ubuntu-drivers autoinstallreboot现在 nvidia-smi 正常了。看看教程 https://jackfrisht.medium.com/install-nvidia-driver-via-ppa-in-ubuntu-18-04-fc9a8c4658b9在类似 https://developer.nvidia.com/cuda-toolkit 的网站找到你的 cuda 版本对应的 toolkit,选择了 deb(network),官网会告诉你命令。到 tensorrt download。结果没有任何直接给 12.2 的版本。下载个 12.0 到 12.1 版本的试试吧。sudo dpkg -i nv-tensorrt-repo-ubuntu1604-cuda10.0-trt7.0.0.11-ga-20191216_1-1_amd64.deb sudo cp /var/nv-tensorrt-local-repo-ubuntu2204-8.6.1-cuda-12.0/nv-tensorrt-local-42B2FC56-keyring.gpg /usr/share/keyrings/ sudo apt update sudo apt install tensorrt然后是 cudnn。遵循下面这个教程:https://github.com/wang-xinyu/tensorrtx/blob/master/tutorials/install.md下次也可以试试这个教程,这个教程甚至没有去官网找东西:https://gist.github.com/denguir/b21aa66ae7fb1089655dd9de8351a202tldrpip install tld

No more posts to load.