hald 是硬件访问层进程,运行的几个hald进程是为了跟踪系统安装的硬件,包括usb设备和热插拔设备的变化 。

引用原文如下 :

The  – Hardware Access Layer Daemon – runs several processes in order to keep track of what hardware is installed on your system. This includes polling USB Drives and ‘hot-swap’ devices to check for changes along with a host of other tasks.

You might see it running on your system as follows:

2474 ?        S      0:00  \_ hald-runner

2481 ?        S      0:00      \_ hald-addon-acpi: listening on acpid socket /var/run/acpid.socket

2487 ?        S      0:00      \_ hald-addon-keyboard: listening on /dev/input/event0

2495 ?        S     41:47      \_ hald-addon-storage: polling /dev/hdc

If your system is static and the devices do not change, you can actually disable this service using a policy entry.

Create a file in your policy directory, for example /etc/hal/fdi/policy/99-custom.fdi. Add the text:

version="1.0" encoding="UTF-8"?>

version="0.2">

>

key="storage.removable" bool="true">

key="info.addons" type="strlist">hald-addon-storage>

>

>

>

Save and reload the hald using /etc/init.d/haldaemon restart.

And you will find that service no longer is polling your hardware.

Of course to turn it back on, remove that policy entry and restart the haldaemon again, it will be back in service.

- See more at:

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐