From ffb4d53062dcbe731e04b87cec327590a61d12d3 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 21 Nov 2023 20:17:29 +0800 Subject: [PATCH] RP @geekpi https://linux.cn/article-16403-1.html --- ...231118 Enabling Bluetooth on Arch Linux.md | 101 ++++++++---------- 1 file changed, 43 insertions(+), 58 deletions(-) rename {translated/tech => published}/20231118 Enabling Bluetooth on Arch Linux.md (58%) diff --git a/translated/tech/20231118 Enabling Bluetooth on Arch Linux.md b/published/20231118 Enabling Bluetooth on Arch Linux.md similarity index 58% rename from translated/tech/20231118 Enabling Bluetooth on Arch Linux.md rename to published/20231118 Enabling Bluetooth on Arch Linux.md index 076362eae2..da9338405f 100644 --- a/translated/tech/20231118 Enabling Bluetooth on Arch Linux.md +++ b/published/20231118 Enabling Bluetooth on Arch Linux.md @@ -3,20 +3,22 @@ [#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" [#]: collector: "lujun9972/lctt-scripts-1693450080" [#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-16403-1.html" -在 Arch Linux 上启用蓝牙 +故障排除:在 Arch Linux 上启用蓝牙 ====== +![][0] + +> Arch Linux 上的蓝牙无法工作?以下是对我有用的方法,以及解决 Arch 上蓝牙问题的其它技巧。 + [我很轻松地安装了 Arch Linux][1],这要归功于 archinstall 脚本。 在我开始使用它并探索之后,我尝试使用我的蓝牙耳机,却发现蓝牙无法工作。 -我可以看到蓝牙选项,但无法启用它。单击开关会继续切换回禁用状态。 - -蓝牙开启按钮不起作用 +我可以看到蓝牙选项,但无法启用它。单击开关会只会切换回禁用状态。 下面是我所做的以及有作用的事情。 @@ -27,53 +29,43 @@ 检查蓝牙服务的状态并查看其是否正在运行。 ```` - - systemctl status bluetooth - +systemctl status bluetooth ```` 它给了我以下输出: ``` - - [abhishek@itsfoss ~]$ systemctl status bluetooth - ○ bluetooth.service - Bluetooth service - Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; disabled; preset: disabled) - Active: inactive (dead) - Docs: man:bluetoothd(8) - +[abhishek@itsfoss ~]$ systemctl status bluetooth +○ bluetooth.service - Bluetooth service + Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; disabled; preset: disabled) + Active: inactive (dead) + Docs: man:bluetoothd(8) ``` -如你所见,`蓝牙`服务处于非活动状态。它没有运行。并且状态被禁用。 +如你所见,`bluetooth` 服务处于非活动状态。它没有运行。并且状态被禁用。 这意味着蓝牙守护程序当前未运行,也未设置为每次启动时自动启动。 -这让我的事情变得更容易了。我在第一次尝试中就找出了根本原因。在 Arch Linux 中这种情况并不常见。 +这让事情变得更容易了。我在第一次尝试中就找出了根本原因。在 Arch Linux 中这种情况并不常见。 使用以下命令启动蓝牙守护进程: ```` - - sudo systemctl start bluetooth - +sudo systemctl start bluetooth ```` 让蓝牙服务在系统启动时自动运行: ```` - - systemctl enable bluetooth - +systemctl enable bluetooth ```` 它应该显示以下输出: ``` - - [abhishek@itsfoss ~]$ systemctl enable bluetooth - Created symlink /etc/systemd/system/dbus-org.bluez.service → /usr/lib/systemd/system/bluetooth.service. - Created symlink /etc/systemd/system/bluetooth.target.wants/bluetooth.service → /usr/lib/systemd/system/bluetooth.service. - +[abhishek@itsfoss ~]$ systemctl enable bluetooth +Created symlink /etc/systemd/system/dbus-org.bluez.service → /usr/lib/systemd/system/bluetooth.service. +Created symlink /etc/systemd/system/bluetooth.target.wants/bluetooth.service → /usr/lib/systemd/system/bluetooth.service. ``` 现在,蓝牙已启用,并且在系统设置中很明显: @@ -82,7 +74,7 @@ ### 连接蓝牙设备的提示 -你可能已经认为应该首先将蓝牙设备置于配对模式。这很关键。 +你可能已经知道应该首先将蓝牙设备置于配对模式。这很关键。 之后,你可以尝试关闭然后再次打开蓝牙按钮,以便它搜索可用的设备。 @@ -92,55 +84,47 @@ 以下是修复 Arch Linux 中蓝牙连接问题的更多提示: -#### 确保不堵塞 +#### 确保未被阻止 确保蓝牙未被阻止: ```` - - rfkill list - +rfkill list ```` 检查输出: ``` - - [abhishek@itsfoss ~]$ rfkill list - 0: hci0: Bluetooth - Soft blocked: no - Hard blocked: no - 1: phy0: Wireless LAN - Soft blocked: no - Hard blocked: no - +[abhishek@itsfoss ~]$ rfkill list +0: hci0: Bluetooth + Soft blocked: no + Hard blocked: no +1: phy0: Wireless LAN + Soft blocked: no + Hard blocked: no ``` 如果你发现蓝牙被阻止,请使用以下命令取消阻止: ``` - - rfkill unblock bluetooth - +rfkill unblock bluetooth ``` #### Pipewire 与 Pulseaudio -在某些情况下,如果你过去尝试过 Pipewire 和 Pulseaudio,它们可能会破坏游戏。 +在某些情况下,如果你过去尝试过 Pipewire 和 Pulseaudio,它们可能会破坏工作。 如果你使用 Pipewire,请确保安装了 pipeline-pulse: -```` - - sudo pacman -Syu pipeline-pulse - -```` +``` +sudo pacman -Syu pipeline-pulse +``` 如果你使用 Pulseaudio,`bluez` 和 `pulseaudio-bluetooth` 可以帮助你。 查看 Arch Wiki 页面以获取更多信息。 -![][3] +> **[蓝牙耳机 - Arch 维基][3]** ### 这对你有用吗? @@ -148,11 +132,11 @@ 事情没有单一的解决方案。你的系统可能存在与我的系统不同的问题,此处提到的建议可能适合你,也可能不适用于你。 -完善的 Arch Wiki 提供的建议比我所能提供的要多得多。如果你仍然无法解决蓝牙问题,请执行此操作。 +完善的 Arch 维基提供的建议比我所能提供的要多得多。如果你仍然无法解决蓝牙问题,请执行此操作。 -![][3] +现在看你的了。对你有用吗?如果有,是哪种方法?如果没有,你遇到了什么样的问题,以及到目前为止你尝试过哪些故障排除方法? -现在交给你了。对你有用吗? 如果有,是哪种方法? 如果没有,你遇到了什么样的问题以及到目前为止你尝试过哪些故障排除方法? +*(题图:MJ/60bd220b-bb4f-4d51-9c41-162c8c4714b3)* -------------------------------------------------------------------------------- @@ -161,7 +145,7 @@ via: https://itsfoss.com/bluetooth-arch-linux/ 作者:[Abhishek Prakash][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -170,3 +154,4 @@ via: https://itsfoss.com/bluetooth-arch-linux/ [1]: https://www.youtube.com/watch?v=WksxVLrALhg [2]: https://itsfoss.com/content/images/2023/11/bluetooth-working-arch-linux.png [3]: https://wiki.archlinux.org/favicon.ico +[0]: https://img.linux.net.cn/data/attachment/album/202311/21/201358dz5gex5xu9689kkx.png \ No newline at end of file