Ubuntu 19.04 freezes on writing to disk SSD
Solution 1
If you have nVIDIA and Gnome 3.32 on Ubuntu 19.04 then please follow: https://devtalk.nvidia.com/default/topic/957814/linux/prime-and-prime-synchronization/post/5323965/#5323965 Add the variable as follows:
sudo gedit /etc/environment
__GL_MaxFramesAllowed=1
On my Dell 7577 laptop (with nVIDIA GTX 1060 with max-Q design) I had since the upgrade from Ubuntu 18.10 to 19.04 freezes of 2 seconds when starting an application like Thunderbird or Firefox. Also VLC was stuttering. With the above variable my gnome is running smooth.
Solution 2
Exact same thing here, but instead of Ubuntu, with an update of Debian Stretch to Debian Buster. The 3 seconds freeze, and the high CPU usage on gnome-shell, just by doing a simple touch hello
in a terminal.
I have been using that user on Stretch for years, so it has a ton of docs and configs.
I did not want to go to KDE, as the comments suggest. So, what I did was to see if the problem was happening on a brand-new user. On the new user, no problem at all.
So, my solution has been:
- log out of every session
- log in as root on console
mv /home/myusualuser /home/myusualuser2
mkdir /home/myusualuser
-
chown myusualuser:myusualuser /home/myusualuser
- and login again as myusualuser
Problem gone.
Now I am moving my files gradually. If I find what directory/file/config was creating the problem I'll update this entry.
Solution 3
You could have hit the APST bug described here:
1. https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1678184
2. https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1689357
They suggest editing /etc/default/grub and adding kernel parameter nvme_core.default_ps_max_latency_us=xxx
in the kernel command line
for the different devices, xxx is different, if it works with 0, you can start increasing to (max 5500) to allow for deeper power saving states. Don't forget to run update-grub after editing & before reboot. Anyway, read the thread.
Related videos on Youtube
Ivan
Updated on September 18, 2022Comments
-
Ivan over 1 year
I just updated to 19.04 from 18.10 (and previously from Debian Stretch). Since the upgrade, any writing operation freezes the entire system, including mouse, for 3 or more seconds. It's quite bizarre because didn't happen before the upgrade, and the system is the same. hdparm reports 517 MB/s reads and smart is not showing any errors:
sudo smartctl -a /dev/sdb smartctl 6.6 2017-11-05 r4594 [x86_64-linux-5.0.0-13-generic] (local build) Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org === START OF INFORMATION SECTION === Device Model: LITEON L8H-128V2G-11 M.2 2280 128GB Serial Number: BR0RJW291CB0075GB0VE Firmware Version: F87110C User Capacity: 128.035.676.160 bytes [128 GB] Sector Size: 512 bytes logical/physical Rotation Rate: Solid State Device Form Factor: M.2 Device is: Not in smartctl database [for details use: -P showall] ATA Version is: ACS-2 (minor revision not indicated) SATA Version is: SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s) Local Time is: Sat Apr 20 11:47:56 2019 -03 SMART support is: Available - device has SMART capability. SMART support is: Enabled === START OF READ SMART DATA SECTION === SMART overall-health self-assessment test result: PASSED General SMART Values: Offline data collection status: (0x02) Offline data collection activity was completed without error. Auto Offline Data Collection: Disabled. Self-test execution status: ( 0) The previous self-test routine completed without error or no self-test has ever been run. Total time to complete Offline data collection: ( 0) seconds. Offline data collection capabilities: (0x11) SMART execute Offline immediate. No Auto Offline data collection support. Suspend Offline collection upon new command. No Offline surface scan supported. Self-test supported. No Conveyance Self-test supported. No Selective Self-test supported. SMART capabilities: (0x0003) Saves SMART data before entering power-saving mode. Supports SMART auto save timer. Error logging capability: (0x01) Error logging supported. General Purpose Logging supported. Short self-test routine recommended polling time: ( 1) minutes. Extended self-test routine recommended polling time: ( 10) minutes. SCT capabilities: (0x003d) SCT Status supported. SCT Error Recovery Control supported. SCT Feature Control supported. SCT Data Table supported. SMART Attributes Data Structure revision number: 1 Vendor Specific SMART Attributes with Thresholds: ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE 5 Reallocated_Sector_Ct 0x0003 100 100 000 Pre-fail Always - 0 9 Power_On_Hours 0x0002 100 100 000 Old_age Always - 681 12 Power_Cycle_Count 0x0003 100 100 000 Pre-fail Always - 535 175 Program_Fail_Count_Chip 0x0003 100 100 000 Pre-fail Always - 0 176 Erase_Fail_Count_Chip 0x0003 100 100 000 Pre-fail Always - 0 177 Wear_Leveling_Count 0x0003 100 100 000 Pre-fail Always - 76 178 Used_Rsvd_Blk_Cnt_Chip 0x0003 100 100 000 Pre-fail Always - 0 179 Used_Rsvd_Blk_Cnt_Tot 0x0003 100 100 000 Pre-fail Always - 0 180 Unused_Rsvd_Blk_Cnt_Tot 0x0003 100 100 000 Pre-fail Always - 147 181 Program_Fail_Cnt_Total 0x0003 100 100 000 Pre-fail Always - 0 182 Erase_Fail_Count_Total 0x0003 100 100 000 Pre-fail Always - 0 187 Reported_Uncorrect 0x0003 100 100 000 Pre-fail Always - 0 195 Hardware_ECC_Recovered 0x0003 100 100 000 Pre-fail Always - 0 241 Total_LBAs_Written 0x0003 100 100 000 Pre-fail Always - 215371 242 Total_LBAs_Read 0x0003 100 100 000 Pre-fail Always - 68520 SMART Error Log Version: 1 No Errors Logged SMART Self-test log structure revision number 1 Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error # 1 Short offline Completed without error 00% 58 - # 2 Short offline Completed without error 00% 58 - # 3 Short offline Completed without error 00% 58 - # 4 Short offline Completed without error 00% 0 - Selective Self-tests/Logging not supported
fstab has the common options for a system with LVM:
cat /etc/fstab # /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for a # device; this may be used with UUID= as a more robust way to name devices # that works even if disks are added and removed. See fstab(5). # # <file system> <mount point> <type> <options> <dump> <pass> /dev/mapper/euclides--vg-root / ext4 noatime,nodiratime,errors=remount-ro 0 1 # /boot was on /dev/sdb1 during installation UUID=456b218a-f23c-4a35-8b39-ad416b03204f /boot ext2 defaults 0 2 /dev/mapper/euclides--vg-home /home ext4 defaults 0 2 /swapfile none swap sw 0 0
Any ideas on what's going on and how to fix this?
EDIT: For testing, I switched from Gnome to KDE and, surprise surprise, the lag was gone. So this probably was not an issue with my SSD but really something related to Gnome.
-
JoelParke almost 5 yearsOn my Oryo Pro, I was seeing random lockups. Until I did this. Now ALL is good!!! Thanks much for the suggestion!!