Fun with USB SSD and Linux

M

malch

Guest
So my 512GB Samsung T5 USB SSD arrived today from B&H.

I used a Samsung utility (not Magician, they have a different one for USB drives) to make sure the firmware was current. It was.

Installing Manjaro was simple enough. One of the first things I wanted to do was to check that I could use TRIM on a USB connected device. Well, it no workee.

Samsung specifically advertise trim support so this was disappointing.

sudo hdparm -I /dev/sdb

reported Data Set Management TRIM supported.

After a lot of research I did this:

sudo pacman -S sg3_utils
sudo sg_readcap -l /dev/sdb

This shows lbpme=0. Linux apparently requires the device/controller to report lbpme=1 for TRIM to work (although it seems Windows doesn't). There has been a proposal to modify the kernel to make it less picky but it seems to be deferred. But I was able to override lbpma with a udev rule:

ACTION=="add|change", ATTRS{idVendor}=="04e8", ATTRS{idProduct}=="61f5", SUBSYSTEM=="scsi_disk", ATTR{provisioning_mode}="unmap"

The vendor and product id's were easily found from lsusb.

With the udev rule TRIM works as confirmed with this test:

https://andyduffell.com/techblog/?p=852

Not sure if the invalid lbpma is Samsung's fault or if the controllers/BIOS/drivers in the chain have cleared it.

I should note that I deleted the "discard" rules from /etc/fstab. I prefer to trim manually on demand versus continuously. I perform the trim as part of a larger system update and maintenance script that I run once or twice a week.

In any event, I'm very happy to have this USB SSD working and with TRIM. Now to finish the Linux install with my usual customizations and packages.
 
Last edited:
Thanks for posting this info Malch. It will definietely be a good reference for others.

Out of curiosity, did you happen to see what the 'me' and 'rz' stand for in the two lbp attributes? I poked around a bit but all I found were additional examples of sg_readcap output.

I honestly have no idea why I want to know this. You can remove the nerd from being a storage admin but not the storage admin from the nerd, I guess.
 
Thanks for posting this info Malch. It will definietely be a good reference for others.

Out of curiosity, did you happen to see what the 'me' and 'rz' stand for in the two lbp attributes? I poked around a bit but all I found were additional examples of sg_readcap output.
No, I'm sorry.
 
Thanks for posting this info Malch. It will definietely be a good reference for others.

Out of curiosity, did you happen to see what the 'me' and 'rz' stand for in the two lbp attributes? I poked around a bit but all I found were additional examples of sg_readcap output.

I honestly have no idea why I want to know this. You can remove the nerd from being a storage admin but not the storage admin from the nerd, I guess.
Maybe this Oracle man page explains it? Please summarize for us, if it's clear to you.

https://docs.oracle.com/cd/E86824_01/html/E54764/sg-write-same-1m.html

Malch, I tried Manjaro Xfce and didn't like it as well as Manjaro KDE. Once I moved the panel to the left side, I couldn't move it back. Also I could not get the active window to have a colored titlebar. At this point in my life, I have plenty of computing power and don't need to sacrifice functionality for small and fast.
 
Last edited:
So I had Manjaro installed on the USB solid state drive. Trim was working.

Since then I have:

1. Installed all my favorite apps and configured them to my liking.

2. Added some logic to detect the GPU type at boot time and load the appropriate drivers. Now the drive is bootable on all of my systems no matter whether they have Intel or Nvidia graphics. I guess it could be made to handle AMD too but I don't have any.

3. Added some logic to detect that it's starting up on a 4k display and tweak various desktop settings accordingly. Those include:

* Panel height
* Cursor size
* Font DPI
* Window Manager theme (normal .v. hi-dpi theme)
* Desktop icon size

I wouldn't call the desktop look beautiful. But it is totally functional and works on every system regardless of GPU or display size. And it's a great little toy.

Better go make an image of this thing just in case my next tweak messes the whole thing up... :-)
 
So I had Manjaro installed on the USB solid state drive...I have: installed all my favorite apps and configured them to my liking, added some logic to detect the GPU type at boot time and load the appropriate drivers, etc. ...
Nice!

The advantage of a rolling release like Manjaro is that you don't have to worry about stuff like release dates and end of support, but for us Ubuntu heads:

Canonical announced that Ubuntu 18.04.1 LTS is ready for release. I'll be installing Kubuntu when I have a few minutes to spare.

https://news.softpedia.com/news/ubu...es-are-now-available-for-testing-522095.shtml

P.S. [Ed Grimley voice] I couldn't be more excited! My organisation (as Outlook spells it) just upgraded me to Windows 1709!
 
Last edited:
The advantage of a rolling release like Manjaro is that you don't have to worry about stuff like release dates and end of support, but for us Ubuntu heads:
Having tried it both ways... rolling releases are definitely for me.
Canonical announced that Ubuntu 18.04.1 LTS is ready for release. I'll be installing Kubuntu when I have a few minutes to spare.
I really enjoyed Lubuntu and Xubuntu but Manjaro is the one that clicked for me.

BTW, some time ago, you posted this:


I positively, absolutely cannot live with a highlighted active title bar. So how the hell can you do that with Cinnamon without choosing some theme and hacking away at a css or whatever?

Or even KDE/Plasma?

It just seems really weird that so many mainstream themes have dropped what I find to be an essential visual cue.
P.S. [Ed Grimley voice] I couldn't be more excited! My organisation (as Outlook spells it) just upgraded me to Windows 1709!
LOL. They're pandering to us Brits :-)
 
The advantage of a rolling release like Manjaro is that you don't have to worry about stuff like release dates and end of support, but for us Ubuntu heads:
Having tried it both ways... rolling releases are definitely for me.
Canonical announced that Ubuntu 18.04.1 LTS is ready for release. I'll be installing Kubuntu when I have a few minutes to spare.
I really enjoyed Lubuntu and Xubuntu but Manjaro is the one that clicked for me.

BTW, some time ago, you posted this:

https://www.dpreview.com/forums/thread/4190285?page=3#forum-post-60000630

I positively, absolutely cannot live with a highlighted active title bar.
"With"?
So how the hell can you do that with Cinnamon without choosing some theme and hacking away at a css or whatever?

Or even KDE/Plasma?

It just seems really weird that so many mainstream themes have dropped what I find to be an essential visual cue.
Or without? Not sure what you mean here.

My KDE install does indeed have a highlighted active title bar, and I didn't hack anything special to get it.
P.S. [Ed Grimley voice] I couldn't be more excited! My organisation (as Outlook spells it) just upgraded me to Windows 1709!
LOL. They're pandering to us Brits :-)
I've been wondering why my A7RIII PDF manual has a "GB" above every page number, but it always spells "color" correctly?

Fake "GB"? :-)
 
Last edited:
I positively, absolutely cannot live with a highlighted active title bar.
"With"?
Arghhhh. Without!
My KDE install does indeed have a highlighted active title bar, and I didn't hack anything special to get it.
Well, have completely failed to configure a Cinnamon desktop that I liked, I'm gonna have another shot with KDE today. As a matter of interest what themes are you using for "Look and Feel" and "Desktop"?
I've been wondering why my A7RIII PDF manual has a "GB" above every page number, but it always spells "color" correctly?

Fake "GB"? :-)
Maybe. It can get confusing. When I first moved to the USA I noticed all of the "No Soliciting" signs outside homes, stores, offices etc. I was kinda shocked since I really thought they were there to let hookers know they were not welcome :-)

Still, it could have been worse. In around 1985 I was attending a training course in Boston with a (very attractive) female British coworker. She raised her hand in class and asked in a clear voice if anyone had a rubber she could borrow.... you could hear a pin drop!
 
I positively, absolutely cannot live with a highlighted active title bar.
"With"?
Arghhhh. Without!
My KDE install does indeed have a highlighted active title bar, and I didn't hack anything special to get it.
Well, have completely failed to configure a Cinnamon desktop that I liked, I'm gonna have another shot with KDE today. As a matter of interest what themes are you using for "Look and Feel" and "Desktop"?
Look and Feel is "Breeze", so is Desktop.

The default cursor theme is mighty ugly IMO, but there are plenty of other choices.
I've been wondering why my A7RIII PDF manual has a "GB" above every page number, but it always spells "color" correctly?

Fake "GB"? :-)
Maybe. It can get confusing. When I first moved to the USA I noticed all of the "No Soliciting" signs outside homes, stores, offices etc. I was kinda shocked since I really thought they were there to let hookers know they were not welcome :-)
Dang, that's rude. After all, the oldest profession deserves some respect. And aren't they a 'protected class' yet?
Still, it could have been worse. In around 1985 I was attending a training course in Boston with a (very attractive) female British coworker. She raised her hand in class and asked in a clear voice if anyone had a rubber she could borrow.... you could hear a pin drop!
Oh, dear. There are still a few references in British English I don't get, like when reading the Economist, FT, or Charles Stross' novels.
 
Last edited:
My KDE install does indeed have a highlighted active title bar, and I didn't hack anything special to get it.
Well, have completely failed to configure a Cinnamon desktop that I liked, I'm gonna have another shot with KDE today. As a matter of interest what themes are you using for "Look and Feel" and "Desktop"?
Mint Cinnamon 19 lacks good themes IMO. The "totally hip" Mint-Y themes do not have a highlighted active title bar. I found the old Mint-X themes on Github and installed them, so it looks like before, with teal colored active title bar, Metabox borders.

In KDE Neon and Manjaro KDE it was easy to change the active title bar from dark gray to teal. No such luck in Manjaro Xfce; maybe it's a CSS file edit. KDE Neon does not have a Terminal in the default applications (weird!) but it's probably easy to add. Heck even Windows 10 has CMD and PowerShell in the menus.
Fake "GB"? :-)
Maybe. It can get confusing. When I first moved to the USA I noticed all of the "No Soliciting" signs outside homes, stores, offices etc. I was kinda shocked since I really thought they were there to let hookers know they were not welcome :-)

Still, it could have been worse. In around 1985 I was attending a training course in Boston with a (very attractive) female British coworker. She raised her hand in class and asked in a clear voice if anyone had a rubber she could borrow.... you could hear a pin drop!
One time when I was camping in a Adirondack lean-to with others, I could not stop laughing when a Brit exclaimed "O damn, I con't find my torch!"
 
In KDE Neon and Manjaro KDE it was easy to change the active title bar from dark gray to teal.
Ahhh, how did you do that (in Manjaro)?

Very few themes in Manjaro (Cinnamon or KDE) differentiate the active and inactive window appearance. Breeze is one of the few so thanks Austinian for that tip.

I prefer a dark desktop wallpaper so dark gray for the active title bar is less than ideal.
 


I prefer a dark desktop wallpaper so dark gray for the active title bar is less than ideal.
Here's how I have my Xfce installs setup:



1a33daf9f6144f3585b00f449ba51aff.jpg.png
 
In KDE Neon and Manjaro KDE it was easy to change the active title bar from dark gray to teal.
Ahhh, how did you do that (in Manjaro)?

Very few themes in Manjaro (Cinnamon or KDE) differentiate the active and inactive window appearance.
I didn't know that. I too require a highlighted active title bar; guess I just got lucky with KDE choices.
Breeze is one of the few so thanks Austinian for that tip.
You're welcome. There's a lot of KDE config possibilities I haven't needed (like the numerous desktop effects) that I played around with back in the Sabayon days but decided I could do without.
 
Ahhh, how did you do that (in Manjaro)?

Very few themes in Manjaro (Cinnamon or KDE) differentiate the active and inactive window appearance.
I didn't know that. I too require a highlighted active title bar; guess I just got lucky with KDE choices.
Changing the color of the active title was a breeze with Breeze :-) I just went into System Settings | Colors.

Better still, I found a KDE color scheme based on Clearlooks (an old classic that I like) and imported that:

You're welcome. There's a lot of KDE config possibilities I haven't needed (like the numerous desktop effects) that I played around with back in the Sabayon days but decided I could do without.
Yeah, I'm really not into desktop effects at all. Still have to figure out how to turn off some of the defaults.
 
I prefer a dark desktop wallpaper so dark gray for the active title bar is less than ideal.
Here's how I have my Xfce installs setup:

1a33daf9f6144f3585b00f449ba51aff.jpg.png
Vair vair niiice, as they say in Quebec. I like the blue border all the way around, similar to W10! I assume this is Manjaro Xfce and you got the blue border with Colors menu, as you wrote in another post.

You asked how I got colored active title bar in KDE, but I guess Austinian answered? It was very intuitive... edit Theme, set color... can't recall the full details.

They say KDE Plasma is faster and less resource intensive than Xfce. Cinnamon has the extra burden of being Gnome (GTK+) based. Currently Gnome sux the most. It is very slow. When I used Gnome Shell on SUSE, I thought it had been designed by some Microsoft moles trying to make Windows 8 look good.

I really like the way KDE Plasma window turn transparent only while being moved, then turn opaque again.

P.S. I did have problems moving the Manjaro Xfce panel to the side, then back to the bottom. But this is a one-time operation, so it doesn't matter much. Logout-login might be a workaround.
 
Last edited:
Vair vair niiice, as they say in Quebec. I like the blue border all the way around, similar to W10! I assume this is Manjaro Xfce and you got the blue border with Colors menu, as you wrote in another post.
I like it. The blue border wasn't by design. It came for free with the themes I'd selected.

For Xfce that was:

* Piranha Window Manager
* Clearlooks-Phenix
* Gnome Brave icons

Now I'm really making progress with KDE. I'm liking:

* Breeze, but with a Clearlooks color scheme
* Fusion widgets
* Clearlooks-Phenix GTK2/3
* Gnome Brave icons
* Adwaita cursor

Much more to tweak and explore but I'm keeping notes as I go. However, I'm far enough along that I think I can make KDE work for me. Somewhat optimistic that I can make it dance and really enjoy it...
 
They say KDE Plasma is faster and less resource intensive than Xfce.
Nah, that's definitely #FakeNews..

Boot, login, launching large apps like Firefox are all noticeably faster with Xfce here.

And that's Manjaro Xfce .v. Manjaro KDE, same version levels, same kernel, same hardware. Maybe I'll try record some actual CPU, wall clock and memory measurements over the weekend.
 
I went ahead and replaced Mint 18.2 with Manjaro Xfce on my NUC earlier tonight. Even in my short time with it so far it really does feel like a pretty ideal blend of looks and speed.

The only thing that’s jumped out at me as a drawback so far is the default theme. I don’t mind its looks or general overall functionality. It just still has those itty bitty teeny tiny corner resizing handles that seem typical of Xfce. I’m wondering if a theme with thicker borders is the only way around this or if there’s some way of just increasing the size of the “target” area where the corner resizing handles become active. First item for the research list I guess.
 
I went ahead and replaced Mint 18.2 with Manjaro Xfce on my NUC earlier tonight. Even in my short time with it so far it really does feel like a pretty ideal blend of looks and speed.

The only thing that’s jumped out at me as a drawback so far is the default theme. I don’t mind its looks or general overall functionality. It just still has those itty bitty teeny tiny corner resizing handles that seem typical of Xfce. I’m wondering if a theme with thicker borders is the only way around this or if there’s some way of just increasing the size of the “target” area where the corner resizing handles become active. First item for the research list I guess.
You may be able to hack away at ~/.gtkrc-2.0 and the Gtk3 css for your theme but... try this...

Hold down the Alt key, right-click and drag.

Now your corner gripper extends to the entire window. That should be big enough for you :-)
 

Keyboard shortcuts

Back
Top