Thursday, August 27, 2020

GeForce GT 710 graphics card and Fedora Linux

 It works. Plug and play.

Where this get interesting is after installing the Nvidia drivers, which you don't need as the Nouveau drivers that come with Linux work just fine. I had a go with Nvidia drivers and this fanless $35 card to see if there would be any difference in picture quality over the build in graphics card on my ThinkCentre M93p running Fedora 32. Doesn't seem to be any difference as far as I can tell. Except for the one film I have in x265.10bit.HDR format, playback is choppy. I noted Kodi says the GT710 does not support the x265 codex, so no hardware excelleration. However, when I switched to the Nvidia drivers, playback of my x265 4K file is smooth.

Here's where the fun started. With the Nvidia drivers installed, the card wasn't getting the same EDID info from my Athem AVM 60 media center as I did with the Nouveau drivers. When I switched to the Nvidia drivers, Pulseaudio  (pavucontrol) showed the HDMI audio profiles as unplugged unavailible, so no sound. Even with Pulseaudio disabled, Kodi would see 4 HDMI profiles, but no sound.

edid-decode /sys/class/drm/card0-HDMI-A-1/edid

EDID and xorg.conf files


 


Monday, August 17, 2020

Welcome to Linux emergency mode! Enter control-d to continue

 


If you're stuck in this "emergency mode" boot cycle, and/or the system just hangs on boot, a common reason is a mistake in /etc/fstab. Recently I removed a drive but forgot to delete the entry in fstab, and it bit me on reboot. Just boot rescue mode, mount the / file system and edit the fstab.


Tuesday, July 28, 2020

Scanning on Linux will drive you Xsane!





xsane is an excellent tool for scanning on Linux, I've used it for 25 years, since I worked with the developer to resolve some issues running it under Solaris long ago. Until my recent upgrade to Fedora 31, everything worked fine with Xsane, with my old Epson USB scanner and then my Brother network scanner.  All of a sudden, xsane was giving "segmentation fault, core dumped" on start up, but only on 1 of the computers running Fedora 31, my main desktop.  On the others it worked fine. Here's the problem I found:

locnar<885>% gdb xsane
(gdb) run
Starting program: /usr/bin/xsane
Thread 1 "xsane" received signal SIGSEGV, Segmentation fault.
0x00007fffee9c07c0 in sanei_scsi_close ()
   from /usr/lib64/sane/libsane-epkowa.so.1

This ibsane-epkowa.so.1 was installed by the iscan package. Once I removed it, the trouble disappeared. I reinstalled xsane and sane-backends, followed by running linux-brprinter-installer-2.2.2-1 and I was back to scanning!

One issue I ran into with linux-brprinter-installer was it tried to install .deb packages and I need the .rpm packages on Fedora. This was because it tests to see if you have /bin/dpkg, which I did along with alien, so it thought I was on the wrong OS.


Learning Linux


The first to understand about Linux is it's not based on Windows, it's not another version of Windows, it's not "like" Windows, it didn't come after Windows, it's not a "free version" of Windows.  These are just common misconceptions repeated by Windows users that don't understand Linux.

Linux is based on the much older computer operating system called Unix.  Unix was around decades before MSDOS or Windows. Windows is derived from MSDOS, which is based on CP/M.

The second thing to understand about Linux is you don't need to "learn" Linux.  No one needs to learn an operating system today.  All you need to know is how to open the web browser and maybe how to copy pictures/music/video to/from the computer.  That's it!  Using a web browser, Gmail, Google Docs is just the same expirence on Linux as it is on Windows. The operating system is just there to enable you to run the web browser, anything beyond that is for computer hobbiests.

What you do need to know is how to get Linux, and it's improtant to understand Linux is FREE.  There's no cost, support is free, all the software that runs on Linux is free too!

Switching from Windows to Linux is much like switching from driving on left side of the road to driving on the right. If you've never driven before, it's easy to learn to drive on the right. However if you started with driving on the left, it's very hard to unlearn what you already know. Most "power users" of Windows are very unhappy with a move to Linux and generally revert to Windows in a very short time for this reason.

To makes things simple

Two main distros

Monday, May 20, 2019

Linux, Android phone, pictures sync


How do I move files, pictures, backups from my phone to my desktop? Actually it's very easy, and there's no need to install ADB, root your phone, connect USB cables, pop out SD cards, deal with FuseBlock filesystems or have to follow the arcane steps I see posted on other sites. It all can be done faster and better via Wifi with simple high level apps.

First, start with a Samsung account. Your phone, calendar, apps, etc get backed up to Samsung's cloud, 15GB for free. You can even store photos there and then view/download to your desktop. Lots of other features, like find your phone and view last calls.
Log onto https://findmymobile.samsung.com and/or support.samsungcloud.com.

Google Drive - shares files easily between phone and desktop, even share your photos with family and friends.

Google Keep - great app, I use it everyday. Lets you take notes on either desktop or mobile and they appear automatically on both, great for shopping lists, you can even share notes with other Google Keep users.

KDEConnect - very rich full featured app that integrates phone and desktop, lets you send and respond to SMS, see incoming phone calls on your desktop, use your phone as a desktop mouse, send files, browse files system and more. Another great app that I've used for years. Except for the problem of it not working. I get a few days or weeks out of it and then it unpairs and I have to go through a bunch of pair steps again, currently even though it's paired I can't send pictures to my desktop. Tried of dealing with, stopped using it.

Syncthing - My new favorite thing, rsync made easy. I've configured it to automatically transfer pics I take on my phone to my desktop. It doesn't have all the features of KDEConnect, but really all I care about, or anyone does, is getting pictures off my phone. Just one small problem, it doesn't support SD cards, where most people store their pictures. This makes it a practically useless app. However, there's a (arcane) workaround. All you need to do is manually create a file called ".stfolder" on the SD card in the photos directory. This can be easily done with ES File Explorer, or pop out the SD card and mount it on your desktop. The only problem is finding the right path on the phone, in my case I created this file "/storage/3138-3961/DCIM/Camera/.stfolder" and now all my photos sync from the SD Card to my Linux desktop.
Check out http://127.0.0.1:8384 after you install the Syncthing RPM.

AndFTP - Uses SSH to send files from your phone to your desktop, always works, great fall back if nothing else works.

So between Samsung cloud backups and Syncthing photo transfers, it's very easy now to get things off my Android phone.

Thursday, April 11, 2019

Linux and the hard drive, LVM, SSD, USB, capacity, speed and lifespan

Mass External Storage


For mass external storage I use Seagate Expansion USB3 drives, I have 2 5TB and 4 8TB drives.  I thought they were the same drive except for capacity but I'm here waiting for 2.2TB of data to write to the 5TB drive, and 16 hours later, it's still not finished.  Yesterday day I was able to fill the 8TB drive with 5TB data in a few hours (I didn't time it).  Near as I can tell, the 5TB drive has the "Seagate 5TB BarraCuda 5400 RPM 128MB Cache" inside and the 8TB has the "Seagate Barracuda 7200 RPM 256MB Cache" inside.  I'm guessing platter density is where most of the speed boost is coming from, heads are writting 2x more per pass, and the higher RPM and larger cache helps, but this 5x faster write speed on the 8TB drive is just amazing!

At $140 for 8TB, I don't see any other choice for cheap external storage, at that price I can buy three 8TB drives for the cost of one 14TB drive.  And I don't see any other choice for the next 5-10 years, the new drive head tech is coming later in 2019 with 20TB drives, but I expect it to be $1,000+, I doubt we'll see those 20TB drives hit the sub $200 price point in less than 5 years.

2020 - now the best value is the Seagate Expansion 10TB on Amazon, for around $180. (In 2021 I shelled out $270 for the 14TB) And when they say 10TB they mean 9TB, formatted:

 Number  Start (sector)    End (sector)  Size       Code  Name
   1              40     19532873693   9.1 TiB     8300  Linux filesystem

 lsusb -t - will tell you what speed (USB) the drive is attached at, sometimes if you had a USB 2 (480M) device plugged to that USB port you may not get USB 3 speed (5000M) until you reboot.

amber<534>%  lsusb -t
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
    |__ Port 1: Dev 2, If 0, Class=Mass Storage, Driver=uas, 5000M
    |__ Port 3: Dev 3, If 0, Class=Mass Storage, Driver=uas, 5000M
    |__ Port 4: Dev 5, If 0, Class=Mass Storage, Driver=uas, 5000M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 480M
    |__ Port 2: Dev 3, If 0, Class=Mass Storage, Driver=uas, 480M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/3p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/8p, 480M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/3p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/6p, 480M




For backup of the most critical backups, like photographs, I'm using MDisc BD, said to last 1,000 years.

When will my internal SSD die?


smartctl --all /dev/sda tells me my Samsung EVO 850 has 32541 Power_On_Hours, nearly 4 years, and Total_LBAs_Written is 60265626638, 28.06 TB.  Only 33 Power-On cycles.  Should I worry?  No one knows for sure about SSD lifespan, with tests and opinions varying, except that the first generation SSDs died young and the next gen like the Samsung EVO's seems to live forever.  I don't expect any problems, I have a EVO 840 that's 6 years old and no sign of problems.  If and when I replace the EVO 850 likely I would go with the Seagate 2TB FireCuda, it's the best of the SSD+HD world.
In 2022 - NVMe pretty much owns the internal drive space, 2T for $200, and incredibly fast.

Formatting steps:

dmesg = drive letter "?" (or from mount, did it automount??)
0) umount !! ; dmesg -T
1) gdisk -l /dev/sdb (got the right drive???)
2) gdisk /dev/sdb
3) d = delete existing partion
4) n = create new, 8300 for Linux
5) w = write/exit
6) power off, or reread??
7) gdisk -l /dev/sdb ; umount  /run/media/charles/EFI
8) mkfs -V -t ext4 /dev/sdb1 = newfs
9) tune2fs -L seagate5 /dev/sdb1
10) tune2fs -m 0 /dev/sdb1
11) vi /etc/fstab, LABEL=seagate5  /seagate5       ext4    defaults 0 0 (use tabs!!)
12) mkdir /seagate5; mount /seagate5 ; df

Note - there are differences between umount and eject that can bite you!
May need a reboot to reset the USB port speed, if you had an optical in that port.
for i in 1 2 3; do hdparm -tT /dev/sdb; done
If dmesg is showing "Ring error" that may mean bad cable.

Mounting by label / file system busy error

Say you pull a drive from another system, in the old days one could mount the drive simply as /dev/sdb1. But if it's a LVM partition it's a bit more complicated and you likely will get the "file system busy" error when you try to mount it. Simple solution is to attach the drive via a USB enclosure and "ls /dev/mapper". Likely you'll see your drive there as the label it's know by and you can then mount that label:

locnar<76># ls /dev/mapper
control                       fedora_localhost--live-swap@  fedora_miner-swap@
fedora_localhost--live-home@  fedora_miner-home@
fedora_localhost--live-root@  fedora_miner-root@

add this line to fstab:
/dev/mapper/fedora_miner-home /mnt/d2    ext4    defaults 1 1              

mkdir /mnt/d2; mount /mnt/d2

External USB case, pop in 2.5 or 3.5 drives