The "To Keep Up" Wiki

A collection of information we find useful

User Tools

Site Tools


linux_annoyances

This page last changed 2023.03.30 08:36 visits: 2 times today, 3 times yesterday, and 1190 total times

Linux Annoyances

Tips and tricks to know about when using Linux.

Distribution specific information
Q4OS

Set dual boot Win10 - Linux

Random halts Mint 19.3 on hp 8540w

[20210109] This may be caused by the Nvidia graphics card in the machine. Recently I've found that using a lower resolution on the monitor prevents the halts and graphics issues.

found info

Trying this from link Random freezes on Intel-based computers 25. On certain hardware combinations with Intel CPU's, you can experience random freezes of your system. In particular the Bay Trail series of Intel CPU's is known to be affected by this.
This can often be solved by sharply reducing the maximum sleep state of the CPU when idle (maximal C-state). Namely from 6 (or 9) to 1.
The price you pay for that is some extra power consumption, which is of course rather annoying for laptops (you'll notice a somewhat higher battery drain speed). But at least your machine should run stable now.

Proceed like this:

a. Launch a terminal window.
b. First check your current max C-state. cat /sys/module/intel_idle/parameters/max_cstate
The output will probably be 6 or 9.
c. Now copy/paste the following line into the terminal, in order to edit a settings file:

xed admin:///etc/default/grub

d. Delete this existing line:
GRUB_CMDLINE_LINUX=“”
Replace it by this line (use copy/paste to transfer it):
GRUB_CMDLINE_LINUX=“intel_idle.max_cstate=1”
e. Save the changes and close the modified file.
f. Then execute this command line in the terminal:
sudo update-grub
g. Reboot.
h. Check the change with this command:
cat /sys/module/intel_idle/parameters/max_cstate
The output should be 1 now.

Install ISO-to-USB Burner

From https://www.linuxbabe.com/beginners/unetbootin-linux-live-usb-creator

  1. sudo add-apt-repository ppa:gezakovacs/ppa
  2. sudo apt-get update
  3. sudo apt-get install unetbootin

Virtual Box with Windows

You have bootable Windows 10 USB and want to run it in Virtual Box on Linux

(Thanks Bob Primak)
I found this hint online:
“VirtualBox itself does not support booting from a USB device. In order to boot from a USB device, another bootloader is required.”

“The easiest solution is to copy the contents of the USB key into an iso file (well, next time I'll just download the iso on the right machine, no USB key needed in the first place)

dd if=/dev/sdc of=myusbkey.iso

And then add this .iso as an optical drive in the VirtualBox settings, under Storage, Controller: IDE (or SATA, I guess).

No need to make a .vmdk file, VirtualBox supports .iso files.”

All of this is from the thread here:
https://askubuntu.com/questions/693719/how-to-boot-from-a-usb-drive-in-virtualbox

So the answer seems to be, convert (copy) the USB drive to an ISO file and run the ISO as a VM in Virtual Box. VB can run ISO's as VMs, but it cannot run USB Flash Drives as VMs. (I don't know if it can reach out to USB hard drives or SSDs and use them for VMs, but it looks like it cannot do so.)

Read exfat in Ubuntu and Linux Mint

Open a terminal (Ctrl+Alt+T shortcut in Ubuntu) and use the following command to enable the universe repository because this repo contains your packages. Chances are that you already have the Universe repository enabled but no harm in double checking.

  1. sudo add-apt-repository universe
  2. sudo apt update
  3. sudo apt install exfat-fuse exfat-utils

Once you have installed these packages, go to file manager and click on the USB disk again to mount it. There is no need to replug the USB. It should be mounted straightaway.

Install and Use NordVPN

[20230330] In Terminal: Install or update

  1. sudo apt-get update
  2. sudo apt-get upgrade
  3. sudo apt-get install nordvpn

Use

  1. nordvpn login (log in using browser)
  2. nordvpn set autoconnect enabled
  3. nordvpn connect

Done.

older info

from https://support.nordvpn.com/Connectivity/Linux/1325531132/Installing-and-using-NordVPN-on-Debian-Ubuntu-and-Linux-Mint.htm

  1. sudo dpkg -i /pathToFile/nordvpn-release_1.0.0_all.deb replace /pathToFile/
  2. sudo apt update
  3. sudo apt install nordvpn or sudo apt-get install nordvpn
  4. nordvpn login
  5. nordvpn connect to connect to a NordVPN server

Using NordVpn

  • nordvpn connect US connects to US server, cf AU JP
  • nordvpn disconnect
  • nordvpn set cybersec enabled
  • nordvpn set autoconnect enabled
  • nordvpn set autoconnect enabled US
  • nordvpn settings shows current settings
  • nordvpn status shows current status
  • nordvpn set threatprotectionlite enabled
  • nordvpn set notify enabled
  • man nordvpn

Install Zoom

Instructions are for Mint, will likely work for Ubuntu and other Debian distributions.

  1. Get the client. Browse to https://zoom.us/download?os=linux
  2. Select your Linux type (e.g., Mint) and OS Architecture (e.g., 64 bit)
  3. Download the DEB installer
  4. Open the download location using file manager
  5. Right-click on the file manager and select Open in Terminal
  6. sudo apt install ./zoom_amd64.deb (make sure it's the same file you downloaded you're installing)

If dependencies are missing, update the package database in Terminal by doing sudo apt update and then try the above again.

Other Programs to Consider Installing in Linux

A checklist of applications to install on a fresh Linux installation. Some are covered above.

  • Krusader – alternative to File manager
  • Virtualbox – virtualization system, allows Windows or other Linux distros to run in Linux
  • Keepass2 – password manager
  • Chromium browser, and MyIpCam extension
  • VLC – Video player
  • MPV – Video player
  • SMPlayer – frontend for MPV, supports DVDs
  • Filezilla – File transfer software (FTP)
  • Gimp – graphics/picture editor
  • NordVPN – VPN software
  • Brackets – WYSIWYG HTML editor
  • Vim – text editor; consider gVim

also to consider

  • pCloud – cloud storage space
  • gparted – partition editor
  • Audacity

See also
https://www.fossmint.com/awesome-linux-software/

Installing DaVinci Resolve in Linux

A frustration for me as I don't have a machine I can use for Linux that has a working nVidia board. I've tried on a hp 8540w repeatedly without success. This machine has a nVidia FX 1800 that's just not good enough.

Install DaVinci Resolve 16.1 in Linux Mint and Ubuntu, Debian

NOTE: smi has not been able to get DaVinci Resolve to work on a Linux Mint or Ubuntu machine yet [20200113]

See this link for instructions relevant to Ubuntu and Linux Mint, to create a .deb and install. Scroll down to “Install professional video editing software DaVinci Resolve 16 or 16.1 in Ubuntu / Debian / Linux Mint / Pop!_OS”. I've digested these instructions here:

  1. sudo apt install libssl1.0.0 ocl-icd-opencl-dev fakeroot xorriso
  2. Download the latest DaVinci Resolve 16 or 16.1 for Linux and extract it in your home folder (scroll down to the end of the page for the download button)
  3. Download The MakeResolveDeb script and extract it in the same folder where you extracted DaVinci Resolve 16 or 16.1.
  4. Run the MakeResolveDeb script to create the DaVinci Resolve 16 or 16.1 deb package: ./makeresolvedeb*.sh lite
  5. Now you can install the DaVinci Resolve 16 or 16.1 deb on Debian, Ubuntu, Linux Mint, and other Debian/Ubuntu based Linux distributions using Ubuntu Software, Gdebi or the command line: sudo dpkg -i davinci-resolve*_amd64.deb

Install Nvidia Driver on Ubuntu 18.04

WARNING: This breaks the system and requires a reinstall on HP 8540w.

see https://www.linuxbabe.com/ubuntu/install-nvidia-driver-ubuntu-18-04, scroll down to Ubuntu section

Update Nvidia to use more recent CUDA on Ubuntu

WARNING: may break the system on HP 8540w.

May also work with Mint 19.3 as it's based on Ubuntu 18.04.
https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html

Measure system speed

From https://www.wikihow.com/Check-CPU-Speed scroll down to Linux.

  1. Open Terminal
  2. run uname -r and note the version number X.XX.XX-XX
  3. run sudo apt-get install linux-tools-X.XX.XX-XX linux-cloud-tools-X.XX.XX-XX
  4. run sudo modprobe msr as this will install the MSR module you'll need to run the tool
  5. Open another Terminal and run sudo openssl speed This will start the OpenSSL speed test which will push our CPU to the maximum.
  6. Return to the first terminal window and type sudo turbostat This will display a variety of readouts about your processor.

Look at the Bzy_MHz and TSC_MHz columns to see turbo speed and regular speed for each of the CPUs. Core and CPU identify core and CPUs on the core.

VSFTPD ftp service

[20200605 I did not have success getting this to run on Hawley and be accessible from Cortland and Honeycrisp.]

https://www.howtoforge.com/tutorial/how-to-install-and-configure-vsftpd/
The configure file is /etc/vsftpd.conf

https://www.2daygeek.com/start-stop-restart-enable-reload-vsftpd-server-service-in-linux/

Start it service vsftpd start
Stop it service vsftpd stop
Restart itservice vsftpd restart
Load it service vsftpd reload
View statusservice vsfpd status
Enable the server when Linux bootschkconfig vsftpd on

System Information

Benchmarking

from https://linuxconfig.org/how-to-benchmark-your-linux-system

sudo apt install sysbench

cpusysbench –test=cpu run
memorysysbench –test=memory run

sudo apt install hardinfo
Then run from start, “System Profiler and Benchmark”

Devices

https://www.tecmint.com/commands-to-collect-system-and-hardware-information-in-linux/

System hardware info sudo lshw
What flavor & version Linux?cat /etc/os-release
CPU informationlscpu
SCSI devices infofirst sudo apt-get install lsscsi
lsscsi or lsscsi -s to see sizes
File System Infosudo fdisk -l
storage device infolsblk
controllerslspci
Graphics card & driver lshw -c display
Graphics card, driver, and moreinxi -Fxz
Display resolutionxrandr
inxi -G
Menu>Preferences>Display

Other

Memoryfree
sudo lshw -short -C memory

Processes

Process infops -efr – all processes, with busiest ones first, pipe to more-E=display environment also, -h=repeat info header
Kill a process given its pidkill -9 pid-2=interrupt, -3=quit, -6=abort; -9=non catchable, non-ignorable kill

Find an active process and kill it

  • ps -efr | more – list all processes (ef) with ones using most CPU time first (f)
  • Find the process number to kill (e.g., 1234)
  • kill -9 1234
linux_annoyances.txt · Last modified: 2023.03.30 11:36 by Steve Isenberg