# hald high cpu usage



## SIFE (Dec 20, 2009)

salamo alikom
hald runing up 80% and some times to 100% ,i ma using FreeBSD 8 stable with compiled kernel .
var/log/message does not show any thing .

```
last pid:  1159;  load averages:  1.25,  1.35,  1.88                  up 0+00:45:54  13:53:35
89 processes:  4 running, 85 sleeping
CPU: 47.1% user,  0.0% nice, 49.3% system,  3.6% interrupt,  0.0% idle
Mem: 155M Active, 61M Inact, 182M Wired, 248K Cache, 108M Buf, 566M Free
Swap: 1000M Total, 1000M Free

  PID USERNAME    THR PRI NICE   SIZE    RES STATE    TIME   WCPU COMMAND
  745 haldaemon     1 113    0  7728K  4216K RUN     40:09 80.86% hald
  865 SIFE          3  45    0 67432K 42308K ucond    0:27 12.45% nautilus
  836 SIFE          1  46    0 69016K 57076K RUN      0:15  3.56% Xorg
  884 SIFE          1  45    0 38776K 17756K select   0:03  1.66% wnck-applet
  858 SIFE          1  44    0  6728K  2864K getblk   0:01  0.49% gam_server
  864 SIFE          1  44    0 41844K 20080K select   0:07  0.00% gnome-panel
  862 SIFE          1  44    0 23484K 13392K select   0:03  0.00% metacity
  923 SIFE          2  66    0 40400K 19872K piperd   0:03  0.00% gnome-terminal
  851 SIFE          2  54    0   103M 15204K piperd   0:02  0.00% gnome-settings-daem
  901 SIFE          1  44    0 41108K 18672K select   0:01  0.00% mixer_applet2
  880 SIFE          1  44    0 23092K 12144K select   0:01  0.00% gnome-screensaver
  903 SIFE          1  44    0 40504K 18912K select   0:01  0.00% clock-applet
  611 root          1  44    0  3708K   964K select   0:01  0.00% moused
  770 root          1  44    0  4064K  1520K select   0:01  0.00% hald-addon-storage
  847 SIFE          1  44    0  9160K  5032K select   0:01  0.00% gconfd-2
  899 SIFE          1  44    0 29360K 13200K select   0:00  0.00% notification-area-a
  907 root          1  76    0 14068K 11076K select   0:00  0.00% perl5.8.9
  871 SIFE          1  44    0    98M 14948K select   0:00  0.00% gnome-volume-contro
```
here is my kernel config :

```
cpu		I686_CPU
ident		STABLE
options 	SCHED_ULE		# ULE scheduler
options 	PREEMPTION		# Enable kernel thread preemption
options 	INET			# InterNETworking
options 	SCTP			# Stream Control Transmission Protocol
options 	FFS			# Berkeley Fast Filesystem
options 	SOFTUPDATES		# Enable FFS soft updates support
options 	UFS_ACL			# Support for access control lists
options 	UFS_DIRHASH		# Improve performance on big directories
options 	UFS_GJOURNAL		# Enable gjournal-based UFS journaling
options 	MD_ROOT			# MD is a potential root device
options 	MSDOSFS			# MSDOS Filesystem
options 	CD9660			# ISO 9660 Filesystem
options 	PROCFS			# Process filesystem (requires PSEUDOFS)
options 	PSEUDOFS		# Pseudo-filesystem framework
options 	GEOM_PART_GPT		# GUID Partition Tables.
options 	GEOM_LABEL		# Provides labelization
options 	COMPAT_43TTY		# BSD 4.3 TTY compat (sgtty)
options 	COMPAT_FREEBSD7		# Compatible with FreeBSD7
options 	SCSI_DELAY=5000		# Delay (in ms) before probing SCSI
options 	KTRACE			# ktrace(1) support
options 	STACK			# stack(9) support
options 	SYSVSHM			# SYSV-style shared memory
options 	SYSVMSG			# SYSV-style message queues
options 	SYSVSEM			# SYSV-style semaphores
options 	P1003_1B_SEMAPHORES	# POSIX-style semaphores
options 	_KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions
options 	PRINTF_BUFR_SIZE=128	# Prevent printf output being interspersed.
options 	KBD_INSTALL_CDEV	# install a CDEV entry in /dev
options 	HWPMC_HOOKS		# Necessary kernel hooks for hwpmc(4)
options 	AUDIT			# Security event auditing
options 	MAC			# TrustedBSD MAC Framework
options		FLOWTABLE		# per-cpu routing cache
device		cpufreq
device		acpi
device		pci
device		ata
device		atadisk		# ATA disk drives
device		ataraid		# ATA RAID drives
device		atapicd		# ATAPI CDROM drives
device		atapist		# ATAPI tape drives
options 	ATA_STATIC_ID	# Static device numbering
					# output.  Adds ~128k to driver.
					# output.  Adds ~215k to driver.
device		scbus		# SCSI bus (required for SCSI)
device		da		# Direct Access (disks)
device		atkbdc		# AT keyboard controller
device		atkbd		# AT keyboard
device		psm		# PS/2 mouse
device		kbdmux		# keyboard multiplexer
device		vga		# VGA video card driver
device		splash		# Splash screen and screen saver support
device		sc
device		cbb		# cardbus (yenta) bridge
device		pccard		# PC Card (16-bit) bus
device		cardbus		# CardBus (32-bit) bus
device		uart		# Generic UART driver
device		ppc
device		ppbus		# Parallel port bus (required)
device		lpt		# Printer
device		ppi		# Parallel port interface device
device		miibus		# MII bus support
device		sis		# Silicon Integrated Systems SiS 900/SiS 7016
device		ed		# NE[12]000, SMC Ultra, 3c503, DS8390 cards
device		loop		# Network loopback
device		random		# Entropy device
device		ether		# Ethernet support
device		tun		# Packet tunnel.
device		pty		# BSD-style compatibility pseudo ttys
device		md		# Memory "disks"
device		firmware	# firmware assist module
device		bpf		# Berkeley packet filter
device		uhci		# UHCI PCI->USB interface
device		ohci		# OHCI PCI->USB interface
device		ehci		# EHCI PCI->USB interface (USB 2.0)
device		usb		# USB Bus (required)
device		uhid		# "Human Interface Devices"
device		ulpt		# Printer
device		umass		# Disks/Mass storage - Requires scbus and da
device		firewire	# FireWire bus code
device		fwe		# Ethernet over FireWire (non-standard!)
device		fwip		# IP over FireWire (RFC 2734,3146)
device		dcons		# Dumb console driver
device		dcons_crom	# Configuration ROM for dcons
options		ALTQ
options		ALTQ_CBQ
options		ALTQ_RED
options		ALTQ_RIO
options 	ALTQ_HFSC
options		ALTQ_PRIQ
options 	ALTQ_NOPCC
options KVA_PAGES=512
options NETGRAPH
options NETGRAPH_ETHER
options NETGRAPH_PPPOE
options NETGRAPH_SOCKET
```
rc.conf :

```
hostname="localhost"
ifconfig_sis0="DHCP"
keymap="us.iso"
moused_enable="YES"
dbus_enable="YES"
hald_enable="YES"
linux_enable="YES"
fusefs_enable="YES"
zfs_enable="YES"
pf_enable="YES"
pf_rules="/etc/pf.conf"
pf_flags=""
pflog_enable="YES"
pflog_flags=""
pflog_logfile="/var/log/pf/pflog"
```


----------



## sixtydoses (Dec 20, 2009)

Try to remove devel/libusb port and rebuild hal. libusb is now part of the base system.


----------



## SIFE (Dec 23, 2009)

hald open the wrong usb device so i add "device da" to kernel config then i recompile kernel and reboot ,now every think good .
problem solved .


----------



## SeaHag (Feb 6, 2010)

I'm having high cpu usage by hald. I went to devel/libusb and did make deinstall. I don't know how to rebuild hal. How do you do that?


----------



## sixtydoses (Feb 6, 2010)

Use `portupgrade` or `portmaster` to rebuild sysutils/hal.


----------



## dennylin93 (Feb 6, 2010)

The Handbook is always useful: Upgrading Ports.


----------



## SeaHag (Feb 7, 2010)

sixtydoses said:
			
		

> Use `portupgrade` or `portmaster` to rebuild sysutils/hal.



Thanks that worked.


----------



## SeaHag (Feb 7, 2010)

dennylin93 said:
			
		

> The Handbook is always useful: Upgrading Ports.




Only if you know that's what you're supposed to do. I thought I had to rebuild kernel.


----------

