Ubuntu20.04;dmesg显示rfkill调用占用了大约26s的启动时间:
[ 10.111972] IPv6: ADDRCONF(NETDEV_CHANGE): enp0s25: link becomes ready
[ 16.059851] rfkill: input handler disabled
[ 34.849174] rfkill: input handler enabled
[ 41.532380] rfkill: input handler disabled
[ 42.740710] audit: (...)
我觉得这个rfkill电话很奇怪,因为这个安装从来没有用在一台带有with硬件的机器上;这两台使用这个磁盘的计算机都只有以太网。
我试过“禁用”或“掩码”rfkill,但没有成功。
user@ubuntu-fossa:/lib/systemd/system $ sudo systemctl disable rfkill
Failed to disable unit: Unit file rfkill.service does not exist.
user@ubuntu-fossa:/lib/systemd/system $ sudo systemctl mask rfkill
Unit rfkill.service does not exist, proceeding anyway.
Created symlink /etc/systemd/system/rfkill.service → /dev/null.
我怎样才能在启动时完全禁用那些rfkill调用,或者至少使其更快呢?
发布于 2023-03-01 23:58:58
这很奇怪,但我解决了这个问题,在/etc/sysctl.conf
中的以下设置中,将1's改为0's:
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
net.ipv6.conf.tun0.disable_ipv6 = 1
如果你戴着红帽子,你可以用
sysctl -w net.ipv6.conf.all.disable_ipv6=1
sysctl -w net.ipv6.conf.default.disable_ipv6=1
sysctl -w net.ipv6.conf.tun0.disable_ipv6=1
然后是重新启动。
https://askubuntu.com/questions/1387762
复制相似问题