3

I have Ubuntu 16.04 (running on HP Spectre x360). Quite recently the following problem has occurred:

Every so often (maybe every 30 minutes at this point), th e WiFi does, the bar that has all my icons disappears, and also the bar that has volume and WiFi and clock etc. also disappears.

Things also freeze and I have to hard restart.

I don't even know where to begin trying to fix this issue. Any help would be greatly appreciated.


I upgraded to 18.04 and it was working fine for a while. But then this same thing happened.

Occassionally it will also fail to some kind of terminal screen with scrolling error messages:

Error Message

  • 1
    An old article but give a try : https://www.fosslinux.com/537/fix-user-interface-ubuntu-unity-disappearing-problem-after-upgrade-to-ubuntu-16-04.htm – Madhubala Jan 09 '20 at 18:18
  • post your /etc/fstab and the output of fdisk -l please, it seems that one of your partitions is being wrongly mounted as read-only. Although there shouldn't be any problems in there, can't hurt to check. Additionally see if you can find when/why the filesystem gets remounted as read only, look for the line "Remounting filesystem read-only" in your log output. – Cestarian Jan 14 '20 at 13:33

2 Answers2

4

The system freeze might be unrelated, but the console output shows file system errors. The systemd journal can't be written to disk because it is mounted as read-only and read operations from the EXT4 file system fail too.

I'd highly recommend you back up your data and then attempt a file system repair, once your data is safe.

Execute fsck.ext4 -f -n /dev/sda5 to check for filesystem corrpution. The disk (hardware) could also be failing, preventing read/write access to happen. Be aware that r/w intensive operations like file system checks and repair can cause the disk to fail completely if it has issues to begin with.

NoMad
  • 752
2

Your hard drive partition is most likely corrupted. When Linux detects a partition is corrupted it is automatically re-mounted as read-only which is most likely what's happening here.

Most linux distributions run a file system check (fsck) command on boot to check for and repair filesystem and partition errors. A possible but unlikely reason for this problem is that you have somehow disabled this automatic file system checking.

Like NoMad suggested, try running (as root) fsck.ext4 -f -n /dev/sda5 to see what the level of file system corruption is on your partition (note: just because there's corruption doesn't mean everything breaks, I got 7 unfixed errors and 2 unoptimized warnings, with a warning that the filesystem still has errors, but everything still works fine.)

The output you're seeing on the terminal screen can be accessed with the dmesg command (may require sudo). Try this:

dmesg | grep -B 5 -A 5 filesystem

Preferably after you encounter the issue. This should show you when your filesystem got mounted as read-only and hopefully the exact reason why.

If it really is a corrupted filesystem then there are many possible causes for it. Chief among them would be that your hard drive is failing (especially if this happened between formats).

To check if your hard drive is failing I suggest you run S.M.A.R.T tests. To do this you need to install smartmontools, alternatively you can use a graphical front-end for smart tests like GSmartControl but below is a guide for how to use smartmontools to test.

Then run (as root)

smartctl -i /dev/sda

(where sda is the hard drive you want to test. In your specific question that would be /dev/sda) to find out if the hard drive supports SMART (the bottom line of this output).

If support is available but not enabled, enable it.

smartctl -s on /dev/sda 

If support is available and enabled, then run a smart test.

smartctl -t long /dev/sda

The output will tell you to wait until a specific time to check and see the results, it will look like this:

=== START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===
Sending command: "Execute SMART Short self-test routine immediately in off-line mode".
Drive command "Execute SMART Short self-test routine immediately in off-line mode" successful.
Testing has begun.
Please wait 2 minutes for test to complete.
Test will complete after Tue Jan 14 13:54:05 2020

And after the mentioned time you run

smartctl -l selftest /dev/sda
smartctl -a /dev/sda
smartctl -H /dev/sda

And see what can be gleaned from the results. This should tell you if your hard drive is failing or not.

If even a single test fails, your drive is failing and you should back up your data and try to find a replacement. There's no use switching to windows either it'd just give you a BSOD.

If your hard drive is fine and your fsck comes out clean, then I'm not entirely sure what is the likeliest cause.

Cestarian
  • 1,903