1

Recently I've moved to Ubuntu 20.04 LTS and for the first two months everything was amazing and I could do everything as much as I want but from about a month ago a new problem had come on the board.

The problem was when I leave the OS works for more than 6 hours at the first the 6 hours was 12 hours but now that is the deal ... whatever after 6 hours of working the gnome-shell start crashes (how did I know ?! I had seen it in the system monitor rising CPU usage from maybe 20% to 100% one core each time and for approximately one second every since and then ) and that is annoying because that affects other processes and make kind of interruption.

I don't know why but since that happens I start asking and searching for the reason and I found nothing then I decided to try using another desktop environment like KDE but that may cause other problems like how I found then I found someone talking about window manager and yeah I tried i3-WM and yeah the problem disappeared but new problems had appeared.

Now when I restart the system ... firstly it takes too long to start the system and then it shows messages that I didn't understand (in the image down the script) and everything goes harder and takes too much time to open or run even terminal or file manager ... I don't know what to do.

I'll appreciate your help.

the messages that show when I restart the system

cpu usage

disks app first start

SMART Data &self tests

The new error messages

9
  • You have NCQ errors. Before I give you a possible fix, edit your question and show me screenshots of the Disks application SMART Data scrollable window. Start comments to me with @heynnema or I'll miss them. – heynnema Aug 17 '20 at 20:50
  • @heynnema thank you for your interest ... actually I didn't know if i exactly did what you want me to do ... I'm wondering if you could give me some tips or instructions if that is not what you asking for – Ahmad Khadour Aug 18 '20 at 1:30
  • Status please... – heynnema Aug 20 '20 at 17:42
  • Status please... – heynnema Aug 23 '20 at 23:31
  • @heynnema I'm sorry for being too late to a response like that but I didn't have time to figure your solution out until yesterday ... Thank you a lot for your patient and there is one thing that happened ... when I start the command => Sudo e2fsck -fccky /dev/sdXX after replacing the sdXX with mine partition for Linux system file nothing happened an error message says that we can't abort e2fsck – Ahmad Khadour Sep 2 '20 at 16:36
0

fsck

First we check your file system...

  • boot to a Ubuntu Live DVD/USB in “Try Ubuntu” mode
  • open a terminal window by pressing Ctrl+Alt+T
  • type sudo fdisk -l
  • identify the /dev/sdXX device name for your "Linux Filesystem"
  • type sudo fsck -f /dev/sdXX, replacing sdXX with the number you found earlier
  • repeat the fsck command if there were errors
  • type reboot

NCQ

Then we fix the NCQ errors...

Native Command Queuing (NCQ) is an extension of the Serial ATA protocol allowing hard disk drives to internally optimize the order in which received read and write commands are executed.

Edit sudo -H gedit /etc/default/grub and change the following line to include this extra parameter. Then do sudo update-grub to write the changes to disk. Reboot. Monitor hangs, and watch /var/log/syslog or dmesg for continued error messages.

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash libata.force=noncq"

bad block

Then we map out bad blocks...

Note: do NOT abort a bad block scan!

Note: do NOT bad block a SSD

Note: backup your important files FIRST!

Note: this will take many hours

Note: you may have a pending HDD failure

Boot to a Ubuntu Live DVD/USB in “Try Ubuntu” mode.

In terminal...

sudo fdisk -l # identify all "Linux Filesystem" partitions

sudo e2fsck -fcky /dev/sdXX # read-only test

or

sudo e2fsck -fccky /dev/sdXX # non-destructive read/write test (recommended)

The -k is important, because it saves the previous bad block table, and adds any new bad blocks to that table. Without -k, you loose all of the prior bad block information.

The -fccky parameter...

   -f    Force checking even if the file system seems clean.

   -c    This option causes e2fsck to use badblocks(8) program to do
         a read-only scan of the device in order to find any bad blocks.
         If any bad blocks are found, they are added to the bad block
         inode to prevent them from being allocated to a file or direc‐
         tory.  If this option is specified twice, then the bad block scan
         will be done using a non-destructive read-write test.

   -k    When combined with the -c option, any existing bad blocks in the
         bad blocks list are preserved, and any new bad blocks found by
         running badblocks(8) will be added to the existing bad blocks
         list.

   -y    Assume an answer of `yes' to all questions; allows e2fsck to be
         used non-interactively. This option may not be specified at the
         same time as the -n or -p options.
0

Console messages: they don't look very interesting to me, when using Linux you have to learn to accept a lot of meaningless console messages.

Slow boot: You don't mention what you consider slow.

Non Gnome configuration... X windows at its core is very simple. You should be able to create a $HOME/.xsessionrc and just execute one program in there.. say a terminal like gnome-terminal. Then you'll be dumped in a graphical screen with only a terminal. You've got the most basic X session possible. Now you can start other X programs. A windows manager for example. If fvwm, then just type "fvwm &" now you have a window manager. If that works, you can create a .xsessionrc that only does one thing: starts your favourite window manager.

Gnome shell: You should check if you have any gnome shell extensions installed. If so, maybe one of them is no good.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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