MX21 sluggish and unresponsive once persistence is activated  [Solved]

Help for Current Versions of MX
When asking for help, use Quick System Info from MX Tools. It will be properly formatted using the following steps.
1. Click on Quick System Info in MX Tools
2. Right click in your post and paste.
Message
Author
pteroglossus
Posts: 8
Joined: Sat Dec 24, 2022 2:10 pm

MX21 sluggish and unresponsive once persistence is activated

#1 Post by pteroglossus »

Hi,

I followed this tutorial https://mxlinux.org/wiki/system/create- ... s-desktop/ to create a Persistent install of MXLinux21 and after several attempts with two different USB keys and two different laptops, my installs always end up being laggy once persistence is activated.

Firefox takes about a minute to open, and opening a new tab takes 30 seconds, I'm sure you'll agree that it's not usable.

The laptop I'm currently using is an I5-10210U and has 8GB of RAM . The usb stick is a 128GB Corsair GS https://www.corsair.com/us/en/Categorie ... tech-specs. These devices should be fast enough to run a decent persistent live system, shouldn't they?

The system info output below was generated using a non-persistent Live system.

Code: Select all

System:    Kernel: 5.18.0-4mx-amd64 [5.18.16-1~mx21+1] x86_64 bits: 64 compiler: gcc v: 10.2.1 
           parameters: BOOT_IMAGE=/antiX/vmlinuz quiet splasht nosplash lang=en_US kbd=fr 
           tz=America/New_York 
           Desktop: Xfce 4.16.0 tk: Gtk 3.24.24 info: xfce4-panel wm: xfwm 4.16.1 vt: 7 
           dm: LightDM 1.26.0 Distro: MX-21.2.1_ahs_x64 Wildflower September 18  2022 
           base: Debian GNU/Linux 11 (bullseye) 
Machine:   Type: Laptop System: LENOVO product: 20RD001FFR v: ThinkPad E15 serial: <filter> 
           Chassis: type: 10 serial: <filter> 
           Mobo: LENOVO model: 20RD001FFR v: SDK0J40697 WIN serial: <filter> UEFI: LENOVO 
           v: R16ET23W (1.09 ) date: 01/07/2020 
Battery:   ID-1: BAT0 charge: 28.7 Wh (73.0%) condition: 39.3/45.7 Wh (85.9%) volts: 11.3 
           min: 11.1 model: Celxpert 5B10W138 type: Li-poly serial: <filter> status: Discharging 
           cycles: 142 
CPU:       Info: Quad Core model: Intel Core i5-10210U bits: 64 type: MT MCP arch: Kaby Lake 
           note: check family: 6 model-id: 8E (142) stepping: C (12) microcode: CA cache: 
           L2: 6 MiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 33599 
           Speed: 883 MHz min/max: 400/4200 MHz Core speeds (MHz): 1: 883 2: 900 3: 900 4: 900 
           5: 898 6: 825 7: 806 8: 800 
           Vulnerabilities: Type: itlb_multihit status: KVM: VMX disabled 
           Type: l1tf status: Not affected 
           Type: mds status: Not affected 
           Type: meltdown status: Not affected 
           Type: mmio_stale_data 
           status: Vulnerable: Clear CPU buffers attempted, no microcode; SMT vulnerable 
           Type: retbleed mitigation: Enhanced IBRS 
           Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl 
           Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization 
           Type: spectre_v2 
           mitigation: Enhanced IBRS, IBPB: conditional, RSB filling, PBRSB-eIBRS: SW sequence 
           Type: srbds status: Vulnerable: No microcode 
           Type: tsx_async_abort status: Not affected 
Graphics:  Device-1: Intel CometLake-U GT2 [UHD Graphics] vendor: Lenovo driver: i915 v: kernel 
           bus-ID: 00:02.0 chip-ID: 8086:9b41 class-ID: 0300 
           Device-2: Chicony Integrated Camera type: USB driver: uvcvideo bus-ID: 1-8:3 
           chip-ID: 04f2:b6d9 class-ID: 0e02 serial: <filter> 
           Display: x11 server: X.Org 1.20.14 compositor: xfwm4 v: 4.16.1 driver: 
           loaded: modesetting unloaded: fbdev,vesa display-ID: :0.0 screens: 1 
           Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.0x11.2") 
           s-diag: 582mm (22.9") 
           Monitor-1: eDP-1 res: 1920x1080 hz: 60 dpi: 142 size: 344x194mm (13.5x7.6") 
           diag: 395mm (15.5") 
           OpenGL: renderer: Mesa Intel UHD Graphics (CML GT2) v: 4.6 Mesa 22.0.5 
           direct render: Yes 
Audio:     Device-1: Intel Comet Lake PCH-LP cAVS vendor: Lenovo driver: snd_hda_intel v: kernel 
           alternate: snd_sof_pci_intel_cnl bus-ID: 00:1f.3 chip-ID: 8086:02c8 class-ID: 0403 
           Sound Server-1: ALSA v: k5.18.0-4mx-amd64 running: yes 
           Sound Server-2: PulseAudio v: 14.2 running: yes 
Network:   Device-1: Intel Comet Lake PCH-LP CNVi WiFi driver: iwlwifi v: kernel modules: wl 
           port: 3000 bus-ID: 00:14.3 chip-ID: 8086:02f0 class-ID: 0280 
           IF: wlan0 state: up mac: <filter> 
           Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: Lenovo 
           driver: r8169 v: kernel port: 2000 bus-ID: 04:00.0 chip-ID: 10ec:8168 class-ID: 0200 
           IF: eth0 state: down mac: <filter> 
Bluetooth: Device-1: Intel type: USB driver: btusb v: 0.8 bus-ID: 1-10:5 chip-ID: 8087:0026 
           class-ID: e001 
           Report: hciconfig ID: hci0 rfk-id: 2 state: up address: <filter> bt-v: 3.0 lmp-v: 5.2 
           sub-v: 2014 hci-v: 5.2 rev: 2014 
           Info: acl-mtu: 1021:4 sco-mtu: 96:6 link-policy: rswitch sniff link-mode: slave accept 
           service-classes: rendering, capturing, object transfer, audio 
Drives:    Local Storage: total: 253.13 GiB used: 2.04 GiB (0.8%) 
           SMART Message: Unable to run smartctl. Root privileges required. 
           ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Toshiba model: N/A size: 238.47 GiB 
           block-size: physical: 512 B logical: 512 B speed: 15.8 Gb/s lanes: 2 type: SSD 
           serial: <filter> rev: 0108ADLA temp: 31.9 C scheme: GPT 
           ID-2: /dev/sda maj-min: 8:0 type: USB vendor: Kingston model: DataTraveler 3.0 
           size: 14.65 GiB block-size: physical: 512 B logical: 512 B type: N/A serial: <filter> 
           rev: PMAP scheme: MBR 
           SMART Message: Unknown USB bridge. Flash drive/Unsupported enclosure? 
Swap:      Alert: No swap data was found. 
Sensors:   System Temperatures: cpu: 44.0 C mobo: N/A 
           Fan Speeds (RPM): fan-1: 0 fan-2: 0 
Repos:     Packages: note: see --pkg apt: 1932 lib: 979 flatpak: 0 
           No active apt repos in: /etc/apt/sources.list 
           Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list 
           1: deb http://deb.debian.org/debian bullseye-updates main contrib non-free
           Active apt repos in: /etc/apt/sources.list.d/debian.list 
           1: deb http://deb.debian.org/debian bullseye main contrib non-free
           2: deb http://security.debian.org/debian-security bullseye-security main contrib non-free
           Active apt repos in: /etc/apt/sources.list.d/mx.list 
           1: deb http://mirrors.rit.edu/mxlinux/mx-packages/mx/repo/ bullseye main non-free
           2: deb http://mirrors.rit.edu/mxlinux/mx-packages/mx/repo/ bullseye ahs
Info:      Processes: 258 Uptime: 27m wakeups: 3 Memory: 7.48 GiB used: 2.34 GiB (31.2%) 
           Init: SysVinit v: 2.96 runlevel: 5 default: 5 tool: systemctl Compilers: gcc: N/A 
           alt: 10 Client: shell wrapper v: 5.1.4-release inxi: 3.3.06 
Boot Mode: UEFI
I tried both the "persist_all" and "persist_static" options while setting things up, used the default size for the rootfs and homefs files, a 500MB swap file and semi-automatic sync.

Finally I initially installed the MX-21.2.1_x64 image and I'm now using the MX-21.2.1_x64 "ahs" version.

On both laptops and both USB sticks, the Live system without persistence runs perfectly well!

Could anyone point me in the right direction to make this work?

Thanks,
P

lilith
Posts: 85
Joined: Thu Mar 21, 2019 6:51 pm

Re: MX21 sluggish and unresponsive once persistence is activated

#2 Post by lilith »

Are you using them directly on the PC or on a hub? Did you try USB 3 and 2 ports?

Did you try a different USB stick as well for the persistent ISO?

Don't know if that helps (others might know better), but I wasn't able at all to boot from the stick. Only after using

Code: Select all

intel_iommu = off
as a boot option it worked.
I also had sluggish behavior. Not sure exactly where it came from, but possibly the stick(s) were broken.

User avatar
m_pav
Developer
Posts: 1850
Joined: Sun Aug 06, 2006 3:02 pm

Re: MX21 sluggish and unresponsive once persistence is activated

#3 Post by m_pav »

When using persistence, I always recommend using anything other than USB BOT Flash Media drives, which is what you have.

BOT stands for Bulk Only Transport and as it's title suggests, these devices are designed primarily for simple storage and transfer, not for active use. USB Flash media advertised as having USB3.1 or USB 3.2 capabilities only show their ability to send and receive data when matched with a port that meets the same or higher standards, making them appear to have great specs, but when the flash storage media can only handle 1 read or 1 write operation at a time, they become less than stellar for Live Persistence. BOT drive are however, perfectly fine for Live USB operation because only read operations are performed when running Live.

Of course, all this depends on what type of persistence you've chosen, actively writing changes to the drive as they happen is going to be incredibly slow and the storage media will be very short lived.

A better choice for Live Persistence is to use a UAS drive. UAS stands for USB Attached Storage and these types typically have an onboard controller and a small amount of cache to assist in IO operations. Most commonly, these are essentially mini-SSD drives in the form of what looks like a regular USB stick and they cost barely more than a supposedly high speed BOT drive. Well worth the investment if you ask me.

How can you tell if you have a UAS drive? Fire up a terminal, expand the window so it will contain at least 30 lines of text, plug the drive in, wait a few seconds and issue the command as below.

Code: Select all

dmesg |tail 25
Here's an example from an older, but fast for it's time BOT drive

Code: Select all

[259197.224921] usb 2-4: new SuperSpeed Gen 1 USB device number 34 using xhci_hcd
[259197.242695] usb 2-4: New USB device found, idVendor=125f, idProduct=dd3b, bcdDevice=11.00
[259197.242702] usb 2-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[259197.242707] usb 2-4: Product: ADATA USB Flash Drive
[259197.242711] usb 2-4: Manufacturer: ADATA
[259197.242714] usb 2-4: SerialNumber: 26226174763300F1
[259197.247538] usb-storage 2-4:1.0: USB Mass Storage device detected
[259197.248906] scsi host3: usb-storage 2-4:1.0
[259198.617500] scsi 3:0:0:0: Direct-Access     ADATA    USB Flash Drive  1100 PQ: 0 ANSI: 6
[259198.618356] sd 3:0:0:0: Attached scsi generic sg1 type 0
[259198.619396] sd 3:0:0:0: [sdc] 121466880 512-byte logical blocks: (62.2 GB/57.9 GiB)
[259198.619822] sd 3:0:0:0: [sdc] Write Protect is off
[259198.619827] sd 3:0:0:0: [sdc] Mode Sense: 43 00 00 00
[259198.620225] sd 3:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[259198.624392]  sdc: sdc1 sdc2
[259198.628883] sd 3:0:0:0: [sdc] Attached SCSI removable disk
Here's an example from a UAS drive, note the 7th and 8th line

Code: Select all

[258277.013255] usb 2-4: new SuperSpeed Gen 1 USB device number 33 using xhci_hcd
[258277.025999] usb 2-4: New USB device found, idVendor=0dd8, idProduct=3908, bcdDevice=13.01
[258277.026004] usb 2-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[258277.026007] usb 2-4: Product: DISK 3.2
[258277.026010] usb 2-4: Manufacturer: Netac
[258277.026013] usb 2-4: SerialNumber: DD56419883A31
[258277.031259] scsi host3: uas
[258277.031944] scsi 3:0:0:0: Direct-Access     Netac    DISK 3.2         1301 PQ: 0 ANSI: 6
[258277.032847] sd 3:0:0:0: Attached scsi generic sg1 type 0
[258277.537707] sd 3:0:0:0: [sdc] 250069680 512-byte logical blocks: (128 GB/119 GiB)
[258277.537712] sd 3:0:0:0: [sdc] 4096-byte physical blocks
[258277.537855] sd 3:0:0:0: [sdc] Write Protect is off
[258277.537859] sd 3:0:0:0: [sdc] Mode Sense: 53 00 00 08
[258277.538168] sd 3:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[258277.538462] sd 3:0:0:0: [sdc] Optimal transfer size 33553920 bytes not a multiple of physical block size (4096 bytes)
[258277.540530]  sdc: sdc1
[258277.542400] sd 3:0:0:0: [sdc] Attached SCSI disk
The differences between these two drives is unmistakable, the Netac drive is as fast as any of my USB drive enclosures with a SSD drive inserted and it is able to perform more than a few IO operations simultaneously. The Adata drive can only perform one IO operation at a time, it's either a single read operation or a single write operation at significantly slower speeds than the Netac, and every command has to be queued by the USB host.

Needless to say, I use the Adata drive as a Ventoy host with multiple ISO's for testing or other, it works perfectly.
Mike P

Regd Linux User #472293
(Daily) Lenovo T560, i7-6600U, 16GB, 2.0TB SSD, MX_ahs
(ManCave) AMD Ryzen 5 5600G, 32G, 8TB mixed, MX_ahs
(Spare)2017 Macbook Air 7,2, 8GB, 256GB SSD, MX_ahs

pteroglossus
Posts: 8
Joined: Sat Dec 24, 2022 2:10 pm

Re: MX21 sluggish and unresponsive once persistence is activated

#4 Post by pteroglossus »

Thank you both for your input!
lilith wrote: Fri Jan 06, 2023 3:28 pm Are you using them directly on the PC or on a hub? Did you try USB 3 and 2 ports?

Did you try a different USB stick as well for the persistent ISO?
Yes, yes and yes. No hub, the sticks are directly plugged into the PC. There are 3 ports on this Lenovo laptop: two USB 3 and one USB2, I tried both USB 3 ports, didn't think using a USB 2 could help.

I initially tried using a cheap Kingston Data Traveler 3.0 that I had lying around. As it was too slow, I repeatedly tried with a 3.0 Corsair GS 128GB drive.
m_pav wrote: Fri Jan 06, 2023 4:38 pm How can you tell if you have a UAS drive? Fire up a terminal, expand the window so it will contain at least 30 lines of text, plug the drive in, wait a few seconds and issue the command as below.
dmesg | tail25 gave me this:

Code: Select all

$ dmesg | tail 25
tail: cannot open '25' for reading: No such file or directory
But with dmesg I could find the following info on my Corsair USB drive, the one I tried to use persistence on:

Code: Select all

[    2.191400] usb 2-3: new SuperSpeed USB device number 2 using xhci_hcd
[    2.205064] usb 2-3: New USB device found, idVendor=1b1c, idProduct=1a0d, bcdDevice= 1.10
[    2.205068] usb 2-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    2.205069] usb 2-3: Product: Voyager GS
[    2.205070] usb 2-3: Manufacturer: Corsair
[    2.205071] usb 2-3: SerialNumber: 070896C0011C1642
[    2.262938] usb-storage 2-3:1.0: USB Mass Storage device detected
[    2.263028] scsi host1: usb-storage 2-3:1.0
[    2.263068] usbcore: registered new interface driver usb-storage
[    2.263387] usbcore: registered new interface driver uas
For the older, cheaper Kingston drive:

Code: Select all

[ 2385.473057] usb 1-5: new high-speed USB device number 13 using xhci_hcd
[ 2385.811106] usb 1-5: New USB device found, idVendor=0951, idProduct=1666, bcdDevice= 1.00
[ 2385.811121] usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2385.811127] usb 1-5: Product: DataTraveler 3.0
[ 2385.811132] usb 1-5: Manufacturer: Kingston
[ 2385.811136] usb 1-5: SerialNumber: 08606E6D41B3BF1137012F2B
[ 2385.812746] usb-storage 1-5:1.0: USB Mass Storage device detected
[ 2385.813594] scsi host2: usb-storage 1-5:1.0
[ 2386.929212] scsi 2:0:0:0: Direct-Access     Kingston DataTraveler 3.0 PMAP PQ: 0 ANSI: 6
[ 2386.929742] sd 2:0:0:0: Attached scsi generic sg1 type 0
[ 2388.585878] sd 2:0:0:0: [sdb] 30728832 512-byte logical blocks: (15.7 GB/14.7 GiB)
[ 2388.586092] sd 2:0:0:0: [sdb] Write Protect is off
[ 2388.586105] sd 2:0:0:0: [sdb] Mode Sense: 23 00 00 00
[ 2388.586304] sd 2:0:0:0: [sdb] No Caching mode page found
[ 2388.586310] sd 2:0:0:0: [sdb] Assuming drive cache: write through
[ 2388.614765]  sdb: sdb1
[ 2388.617142] sd 2:0:0:0: [sdb] Attached SCSI removable disk
Then I went ahead and tested the "good" Corsair stick with hdparm:

Code: Select all

 sudo hdparm -t --direct /dev/sda

/dev/sda:
 Timing O_DIRECT disk reads: 944 MB in  3.01 seconds = 314.13 MB/sec
The issue doesn't seem to be related to the performance of my USB drive, does it?
m_pav wrote: Fri Jan 06, 2023 4:38 pm Of course, all this depends on what type of persistence you've chosen, actively writing changes to the drive as they happen is going to be incredibly slow and the storage media will be very short lived.
I did try both "persist_all" and "persist-static" options.

Any other ideas?

User avatar
m_pav
Developer
Posts: 1850
Joined: Sun Aug 06, 2006 3:02 pm

Re: MX21 sluggish and unresponsive once persistence is activated

#5 Post by m_pav »

Ahh, sorry, my error. I missed the dash before the 25. You can use any value you want, 25 just means show the last 25 lines.
The command should be

Code: Select all

dmesg |grep tail -25
Older Adata "fast" BOT USB

Code: Select all

/dev/sdc1:
 Timing O_DIRECT disk reads: 398 MB in  3.01 seconds = 132.35 MB/sec
Newer Netac UAS USB

Code: Select all

/dev/sdd1:
 Timing O_DIRECT disk reads: 1230 MB in  3.00 seconds = 409.69 MB/sec
Did you use MX Live-USB maker to make your Live Persistence USB?
Mike P

Regd Linux User #472293
(Daily) Lenovo T560, i7-6600U, 16GB, 2.0TB SSD, MX_ahs
(ManCave) AMD Ryzen 5 5600G, 32G, 8TB mixed, MX_ahs
(Spare)2017 Macbook Air 7,2, 8GB, 256GB SSD, MX_ahs

pteroglossus
Posts: 8
Joined: Sat Dec 24, 2022 2:10 pm

Re: MX21 sluggish and unresponsive once persistence is activated

#6 Post by pteroglossus »

m_pav wrote: Fri Jan 06, 2023 9:49 pm Ahh, sorry, my error. I missed the dash before the 25. You can use any value you want, 25 just means show the last 25 lines.
No worries, I figured that one out later but the part containing the info on my USB devices was way up, around the middle of the output anyways.
m_pav wrote: Fri Jan 06, 2023 9:49 pm Newer Netac UAS USB

Code: Select all

/dev/sdd1:
Timing O_DIRECT disk reads: 1230 MB in 3.00 seconds = 409.69 MB/sec
The performance of my drive is not that far from yours then, 314.13 MB/sec. So it is really not due to stick's speed.
m_pav wrote: Fri Jan 06, 2023 9:49 pm Did you use MX Live-USB maker to make your Live Persistence USB?
I initially used Rufus from a Windows PC, and seeing the result, I then booted into a live MXLinux session on the slow drive and used Mx Live-USB maker on the faster Corsair Drive.

I believe I'm going to give up and use Ventoy, as many people seem to have good results with it, and it'll allow me to experiment with different distros. I just wanted to understand why it wouldn't work...!
Last edited by pteroglossus on Sun Jan 08, 2023 6:08 pm, edited 1 time in total.

User avatar
argonaut459
Posts: 527
Joined: Tue Oct 04, 2022 11:49 am

Re: MX21 sluggish and unresponsive once persistence is activated

#7 Post by argonaut459 »

With Ventoy you CAN'T create a persistant stick.
You (probably) really need to create the USB stick with the MX tool to get it working.

I ran into the same issues, and ended up going with an actual SSD, as the different programs and DE's I wanted to test would've got to big for my USB sticks.
https://forum.mxlinux.org/viewtopic.php?t=72716

The sluggishness already got apparant for me in the GRUB menu selecting a different language.
Thank you very much in advance :heart:
Linux noob being grateful for help and assistance.

pteroglossus
Posts: 8
Joined: Sat Dec 24, 2022 2:10 pm

Re: MX21 sluggish and unresponsive once persistence is activated [SOLVED]  [Solved]

#8 Post by pteroglossus »

argonaut459 wrote: Sun Jan 08, 2023 10:06 am With Ventoy you CAN'T create a persistant stick.
Oh OK, I thought I had read it was possible.
argonaut459 wrote: Sun Jan 08, 2023 10:06 am You (probably) really need to create the USB stick with the MX tool to get it working.
I did use the MX Live-USB Maker.

I believe I have found a satisfactory workaround. In the end, what I need is an install that has the right keyboard, time zone, saved bluetooth mouse and headset, a VPN installed and some Firefox add-ons. So I went ahead and and used MxSnapshot to create an ISO that contained all that, installed it on my good USB drive and it's working great! I save my downloaded files to an external drive, and if I really need to install anything else, I'll create a new ISO.

Thank you all for your ideas, let's consider my issue solved!

Huckleberry Finn

Re: MX21 sluggish and unresponsive once persistence is activated

#9 Post by Huckleberry Finn »

@pteroglossus You just need to click a checkmark icon, like this:
You do not have the required permissions to view the files attached to this post.

User avatar
user-green
Posts: 326
Joined: Sat Mar 14, 2020 1:40 am

Re: MX21 sluggish and unresponsive once persistence is activated

#10 Post by user-green »

In order to make a writable Live USB, you have to use MX Live USB Maker (LUM). Maybe you can only make read-only Live USB by using other utilities and "dd" or "cp" commands.

Once you made a MX Live USB by LUM, you should select Persistence Option from Advanced Menu from Boot Menus. For example, paesist_all or p_static_root and then select Save Option.

It is recommended to user a USB flash drive with more than 8 GB and USB 3.0 support.

Post Reply

Return to “MX Help”