Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question

3 Answers 3

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
share|improve this answer

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.

share|improve this answer

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.

share|improve this answer
1  
I admit I had a hard time understanding exactly why the mouse & keyboard need so much random data, but I can image that they need some. I'm assuming that they're wireless and that the random bits are used to modulate the signal somehow. I can imagine that some poor program resulted in the need for lots of needless random bits, draining the pool. –  Huckle Jan 28 '12 at 18:06
    
@Huckle, no, the mouse and keyboard have no need of random data, they are used to generate random data. That is why gpg tells you to type away on the keyboard when it's trying to generate a new key. If the wireless signal is modulated at all, it is done with hardware, not software. –  psusi Jan 28 '12 at 18:13
    
Well, then 'It should have nothing at all to do with normal usage of the keyboard' is probably not worded correctly in the answer, as it does have something to do with it. Maybe you meant to say 'It shouldn't prevent normal operation of the keyboard'. –  Huckle Jan 28 '12 at 21:07
    
@Huckle, yes, I suppose so. Corrected answer. –  psusi Jan 28 '12 at 22:52

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.