0

So... i'm new in ElementaryOS and and I'm having some problems with freezes

Basically when I write something on the keyboard after a short time without writing anything, the system freezes for 1 - 3 secs and then returns to normal, the same happens when I use the keyboard volume control key.

This happens when I use keyboard shortcuts too. When I use shortcuts or other keys in the terminal eg the up arrow, when the system asks me for passwords in graphical interface and I type the password, then the system freezes.

Well, I run Elementary OS Desktop 5.0 Juno version and here is a log from dmesg: pastebin, I hope it helps

So... I started monitoring for htop if when I pressed a key, something froze my system, and I discovered that when I reproduce the reported bug, a strange application appears consuming 90% of my CPU for a few seconds, I also discovered that when I pressed Prt Sc to take a print of the process while the system was frozen, my keyboard stopped working soon after the system thawed, I hope these keyboard anomalies stop occurring when this error is fixed, this is the application:The application consuming 90% of my CPU

2
  • Be specific. If you ask a vague question, you’ll get a vague answer. But if you give us details and context, we can provide a useful answer. How do I ask a good question? - | - You need to provide more information, is a laptop? which version do you installed? do you know how to use the command line? can you provide a log?, etc
    – Sebastian
    Commented Dec 15, 2018 at 4:35
  • In the screenshot, the process is Xorg. In simple terms, without it you won't have a graphical environment.
    – Sebastian
    Commented Dec 16, 2018 at 18:18

4 Answers 4

1

About the QUESTION

Have you tried using another keyboard? And/Or another USB port? Linux is very reactive in terms of a faulty hardware, could be "working" but having EMI. This is just a theory, but easier to test another hardware first than to keep trying to find the needle on the haystack

(Could be useful if you provide Xorg's log [/var/log/Xorg.0.log] and the syslog [/var/log/syslog.log]. Remember to replicate the problem just before that way the problem will get into the log)


ANNEX

(This didn't work for MrPiva, but I'll leave it as future reference.)

To fix/help with what's on dmesg

[   20.081766] random: crng init done
[   20.081776] random: 7 urandom warning(s) missed due to ratelimiting

It seems to be a bug fixed in plymouth/0.9.3-3 but Ubuntu and we have plymouth/0.9.3-1

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=897572#82

https://unix.stackexchange.com/a/442744

https://launchpad.net/ubuntu/+source/plymouth

https://packages.debian.org/search?keywords=plymouth


1. RNG-TOOLS

You could try installing rng-tools to help with the issue

Rng-tools. The rng-tools is a set of utilities related to random number generation in kernel. The main program is rngd, a daemon developed to check and feed random data from hardware device to kernel entropy pool. This is mainly useful to increase the quantity of entropy in kernel to make /dev/random faster.

Install rng-tools

sudo apt install rng-tools

If you installed haveged, remove it

sudo apt purge haveged

2. HAVEGE

Linux entropy source using the HAVEGE algorithm haveged is a userspace entropy daemon which is not dependent upon the standard mechanisms for harvesting randomness for the system entropy pool. This is important in systems with high entropy needs or limited user interaction (e.g. headless servers).

haveged uses HAVEGE (HArdware Volatile Entropy Gathering and Expansion) to maintain a 1M pool of random bytes used to fill /dev/random whenever the supply of random bits in dev/random falls below the low water mark of the device.

More information about HAVEGE is available at http://www.irisa.fr/caps/projects/hipsor/

Install:

sudo apt install haveged

sudo systemctl enable haveged

sudo systemctl start haveged

ref: https://unix.stackexchange.com/a/461466


8
  • The two lines did not disappear from dmesg: [6.004320] random: crng init done [6.004322] random: 7 urandom warning (s) missed due to ratelimiting
    – user16713
    Commented Dec 16, 2018 at 1:45
  • Try again, just updated it
    – Sebastian
    Commented Dec 16, 2018 at 3:06
  • I tried installing rng-tools and rng-tools5, but that line did not disappear, but I also don't bother with it, since my boot is not totally late because of it
    – user16713
    Commented Dec 16, 2018 at 4:55
  • then why put the dmesg log... maybe if you give us the syslog or a portion of it from the moment you have that freeze... | Anyway rng-tools can be useful for other things in your system until we get the upgraded version of plymouth.
    – Sebastian
    Commented Dec 16, 2018 at 5:42
  • I updated the ask
    – user16713
    Commented Dec 16, 2018 at 9:17
0

How to solve the issue when your system freezes for few seconds from time to time or at all and you have similar information in /var/log/syslog after typing the command?

grep 'Resetting' /var/log/syslog

May 18 06:30:35 DELL kernel: [  499.929699] i915 0000:00:02.0: Resetting rcs0 for hang on rcs0
May 18 06:34:48 DELL kernel: [  753.880818] i915 0000:00:02.0: Resetting rcs0 for hang on rcs0
May 18 06:40:02 DELL kernel: [ 1067.896600] i915 0000:00:02.0: Resetting rcs0 for hang on rcs0
May 18 06:42:10 DELL kernel: [ 1195.896294] i915 0000:00:02.0: Resetting rcs0 for hang on rcs0
May 18 06:45:50 DELL kernel: [ 1415.895996] i915 0000:00:02.0: Resetting rcs0 for hang on rcs0
May 18 06:47:45 DELL kernel: [ 1530.903906] i915 0000:00:02.0: Resetting rcs0 for hang on rcs0
May 18 06:54:21 DELL kernel: [ 1926.903712] i915 0000:00:02.0: Resetting rcs0 for hang on rcs0
May 18 06:57:51 DELL kernel: [ 2136.887378] i915 0000:00:02.0: Resetting rcs0 for hang on rcs0
May 18 07:01:29 DELL kernel: [ 2354.870458] i915 0000:00:02.0: Resetting rcs0 for hang on rcs0

Explanation for i915 chipset

If you randomly encounter total system freezes, or it freezes from time to time for few seconds and you have i915 Intel GPU (Intel HD Graphics), the following kernel option is a workaround:

intel_idle.max_cstate=1 i915.enable_dc=0 i915.enable_fbc=0 i915.enable_psr=0

On new Intel GPUs Elementary OS and also Ubuntu freezes sometimes for few seconds, like it was in my case. So the solution is to do this:

sudo vim /etc/default/grub

press insert (ins) button

and add this line intel_idle.max_cstate=1 i915.enable_dc=0 i915.enable_fbc=0 i915.enable_psr=0 to the list of options inside

GRUB_CMDLINE_LINUX_DEFAULT=" ". 

Then save that file and execute sudo update-grub from terminal. Reboot and it should be fixed. it should look like this after the change:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_idle.max_cstate=1 i915.enable_dc=0 i915.enable_fbc=0 i915.enable_psr=0"

I additionally installed rng-tools and haveged as advised above:

sudo apt install rng-tools
sudo apt install haveged
sudo systemctl enable haveged
sudo systemctl start haveged

Seems this solved issue totally. I am monitoring this with command:

sudo tail -f /var/log/syslog | grep 'Resetting'

There were errors like mentioned above, that is why I decided to compile the newest kernel. Solution provided in new post below or above.

0

No more error: Resetting rcs0 for hang on rcs0How to upgrade Elementary OS to the newest kernel.

Only for braves. It may be unstable.

I installed it, because my i915 GPU Intel HD Graphics was freezing the way it drove me mad.

mkdir /home/username/Downloads/kernel
mkdir /home/username/Downloads/amdgpu
mkdir /home/username/Downloads/i915
mkdir /home/username/Downloads/rtl

#### to get rid of missing firmware errors for amdgpu ####
cd /home/username/Downloads/amdgpu
wget https://github.com/M-Bab/linux-kernel-amdgpu-binaries/files/4124959/firmware-radeon-ucode-rock_2.110_all.deb.zip
unzip firmware-radeon-ucode-rock_2.110_all.deb.zip
sudo dpkg -i firmware-radeon-ucode-rock_2.110_all.deb

Or use eddy to install this deb

Source: https://github.com/M-Bab/linux-kernel-amdgpu-binaries/issues/82

My comment: I was brave enough.

#### to get rid of missing firmware errors for i915 ####
cd /home/username/Downloads/i915
git clone https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
sudo cp -R /linux-firmware/i915/* /lib/firmware/i915/

#### to get rid of missing firmware errors for rtl (Realtek LAN and Wi-Fi adapters in my DELL) ####
cd /home/username/Downloads/rtl
wget https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/rtl_nic/rtl8168fp-3.fw
wget https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/rtl_nic/rtl8125a-3.fw
sudo cp rtl8168fp-3.fw /lib/firmware/rtl_nic 
sudo cp rtl8125a-3.fw /lib/firmware/rtl_nic

#### Download kernel 5.6.13 ####
cd /home/username/Downloads/kernel
wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.6.13.tar.xz
tar -xf linux-5.6.13.tar.xz
cd linux-5.6.13

#### use 4 core/thread - if your processor have 4 cores ####
make -j 4

#### use 8 core/thread - if your processor have 8 cores ####
make -j 8

sudo make modules_install 
sudo make install 
sudo update-initramfs -c -k 5.6.13

#### ignore these errors below, just because those two bin files are not made yet ####
W: Possible missing firmware /lib/firmware/amdgpu/navi12_ta.bin for module amdgpu
W: Possible missing firmware /lib/firmware/amdgpu/navi10_mes.bin for module amdgpu

sudo update-grub
sudo reboot
uname -mrs
0

Update May 19th 2020. I did the sudo update-initramfs -c -k 5.3.0-51-generic However tail -f /var/log/syslog | grep 'Resetting' still shows errors.enter image description here

So the upgrade of the kernel is the only solution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.