8

I have noticed so keyboard/mouse hanging and other issues since I bought my new computer and installed Ubuntu 11.10.

I researched where increasing the /proc/sys/kernel/random/entropy_avail helps and it does.

Currently I do this by running $ ls -R / in a terminal. Of course this just reads the directory and files.

It does in fact raise it to 4000 plus. Then it drops back down to 300 and 400.

After looking and trying to find a solution, how can I increase the entrophy_avail without manually LSing the hard drives from the terminal?

I must confess that I have been using Ubuntu full time since 8.04 and Windows completely free since Natty. I don't really understand this entropy_avail but my computer seems to do better when it is high at peak usage.

Jorge Castro
  • 73,717
p37307
  • 161
  • 1
  • 2
  • 7

4 Answers4

5

I have the same issue. I found haveged works the best. Simply run

sudo apt-get install haveged -y

and you are done. It will start itself and add entries to start on boot.

Nash0
  • 201
4

Try using

rngd -r /dev/urandom -o /dev/random -b -t 1

This worked for me.

Byte Commander
  • 110,243
nobody
  • 49
  • 1
4

This article here seems to have found a package that will essentially feed the random number generator with the output of the random number generator... essentially generating as much random as you need at the cost of have 'less random' numbers.

The reason that ls -R / works is because the primary source of random bits in linux is hardware noise. ls'ing the whole filesystem generates a lot of that.

The instructions from the other article are reproduced here:

sudo apt-get install rng-tools
sudo vim /etc/default/rng-tools
#Set the value: HRNGDEVICE=/dev/urandom
sudo /etc/init.d/rng-tools start
Huckle
  • 7,258
1

Increasing the avilible entropy pool gives more cryptographic random data for things like gpg and openssl to generate encryption keys. The keyboard and mouse do not know or care how much entropy is available, and a lack of entropy should not cause anything to hang other than generating new cryptography keys. In fact, normal use of the keyboard and mouse add to the entropy pool.

psusi
  • 38,031