Problems and troubleshooting



Not Unix's job to stop you from shooting yourself in the foot
Easy Linux tips project's "Solutions for 27 bugs in Linux Mint 19.1"
Easy Linux tips project's "System hacks for advanced Linux Mint users"
Neil Bothwick's "How to fix any Linux problem"

Star Trek Picard: have you tried reversing the polarity of something ?




Magic key-sequences




Eric Simard's "Frozen Linux System? Here are 3 Ways to Deal With It"
superuser's "Does Linux have a Ctrl+Alt+Del equivalent?"
kember's "REISUB - the gentle Linux restart"
Wikipedia's "Magic SysRq key"
Fedora Wiki's "QA/Sysrq"









Clean up space on disk



To see used/free space:

df -khT
df -khT -x squashfs -x tmpfs		# don't show snap devices

sudo du -h --summarize --exclude=/home --exclude=/sys --exclude=/proc --exclude=/run /
sudo du -h --summarize -c --exclude=/home --exclude=/sys --exclude=/proc --exclude=/run /*

sudo du -h --summarize -c /home/*
du -sh $HOME/* | sort -h
du -sh $HOME/.[0-9a-z]* | sort -h

sudo df -i

Easy Linux tips project's "How to clean Linux Mint 19 safely"






Performance



If your performance is bad, or you want to make it better:




Run Performance Tests



Phoronix test suite to check performance.
+/-

# Download and extract the test package.
# Then:

sudo ./install-sh
sudo apt install php-cli php-xml pkg-config

phoronix-test-suite --help
# have to accept some license terms etc

# can run via cli or GUI
# GUI will give a CLI-type interface; type 'quit' to get out

# https://www.phoronix-test-suite.com/documentation/phoronix-test-suite.html

phoronix-test-suite list-available-suites
phoronix-test-suite list-available-tests | less

# I want: simple, few dependencies, run in a few minutes, test CPU RAM disk.

# Best to run tests after a fresh boot, no other apps running.
# Run each test 3 times and average them.

phoronix-test-suite benchmark pts/sysbench
# My 2011 Dell Inspiron N5010 with Kubuntu 20.10:
# (Intel Core i3 370M @ 2.39GHz, 8 GB RAM, 320 GB WD3200BEVT-7 with ext4/LUKS)
# gave CPU 2100, RAM 9.8 M
# My 2021 KDE Slimbook 15 with KDE Neon 5.20.5:
# (AMD Ryzen 7 4800H @ 2.9GHz, 16 GB RAM, 256 GB NVMe SSD with ext4)
# gave CPU 17600, RAM 13.6 M

phoronix-test-suite benchmark pts/leveldb
# My 2011 Dell Inspiron N5010 with Kubuntu 20.10:
# (Intel Core i3 370M @ 2.39GHz, 8 GB RAM, 320 GB WD3200BEVT-7 with ext4/LUKS)
# gave seq fill 12 MB/S, hot read 1.76 usec/op, random read 1.71 usec/op.
# My 2021 KDE Slimbook 15 with KDE Neon 5.20.5:
# (AMD Ryzen 7 4800H @ 2.9GHz, 16 GB RAM, 256 GB NVMe SSD with ext4)
# gave seq fill 23 MB/S, hot read 7 usec/op, random read 7 usec/op.

phoronix-test-suite benchmark pts/fio
# Choose sub-test 3 (sequential read), option 4 (Linux AIO), Buffered, Not Direct,
# 4 KB block size.
# My 2011 Dell Inspiron N5010 with Kubuntu 20.10:
# (Intel Core i3 370M @ 2.39GHz, 8 GB RAM, 320 GB WD3200BEVT-7 with ext4/LUKS)
# gave 48 MB/S.
# My 2021 KDE Slimbook 15 with KDE Neon 5.20.5:
# (AMD Ryzen 7 4800H @ 2.9GHz, 16 GB RAM, 256 GB NVMe SSD with ext4)
# gave 1132 MB/S.




Network test: Speedcheck

My 2011 Dell Inspiron N5010 and 100 mbps chip with Kubuntu 20.10:
Without VPN on 600 mbps service: ping 75 down 95 up 100.
With Windscribe VPN (OpenVPN) on 600 mbps service: ping 80-90 down 55-75 up 45-80.
Without VPN on 100 mbps service: ping 70-80 down 95 up 100.
With Windscribe VPN (OpenVPN) on 100 mbps service: ping 85-125 down 85-90 up 75-80.
My 2021 KDE Slimbook 15 and 1000 Mbps chip with KDE Neon 5.20.5:
Without VPN on 600 mbps service: ping 45-55 down 365-445 up 105-130.
With Windscribe VPN (OpenVPN) on 600 mbps service: ping 65 down 15-20 up 50 [fast.com = 65/120].



Apparently some games, and Steam, will display a "frames per second" as you play the game. You can use this to compare performance before and after changes. Also, at CLI, run "glxgears" to see frame-rate.





Tweaking/fixing video



Definitely back up the config files before you start messing with stuff, it's easy to go wrong.

Check which GPU and which video driver you're using.
"lspci -nnk | grep -iA2 vga"
"lsmod | grep nouveau"
"sudo dmesg | grep gpu"

Maybe switch between X and Wayland to see which works better.
Maybe try a different compositor (picom ?) on X.

[NOT SURE] Video configurations, and drivers for them:
+/-
  • Intel CPU with integrated graphics: drivers built into kernel.
  • Intel CPU with Intel GPU (HD, Iris, UHD).
  • AMD CPU with integrated graphics: driver built into kernel.
  • AMD CPU with AMD GPU (Radeon): closed-source AMDPRO driver, or open-source AMDGPU driver built into kernel.
  • Any CPU with NVIDIA GPU (GeForce, Quadro, NVS): closed-source NVIDIA driver, or open-source Nouveau driver.

Some people report better results (more stability, especially in games) if they disable the "dashboard" that comes with manufacturer's drivers (GeForce Experience and the NVIDIA control panel for NVIDIA; Radeon Software for AMD). Maybe this applies to Windows only ?







Tweaking/fixing audio



There are various compatibility options. For example, running "apulse" on top of ALSA emulates the API of PulseAudio to the app above apulse. And PipeWire can be run along with PulseAudio, or without PulseAudio ?

The Well-Tempered Computer's "Linux Audio Architecture"
Venam's "Making Sense of The Audio Stack On Unix"
Ahmed S. Darwish's "PipeWire: The Linux audio/video bus"


Definitely back up the config files before you start messing with stuff, it's easy to go wrong.

ArchWiki's "Advanced Linux Sound Architecture / Troubleshooting" Dedoimedo's "Linux audio"
PulseEffects
Gamunu Balagalla's "Enable High Quality Audio on Linux"
Jahid Onik's "How To Fix Sound Issues On Ubuntu"

"less /etc/pipewire/pipewire.conf"
"sudo apt install pulseaudio-equalizer"
If speaker device disappears: do "pulseaudio -k"
If no sound, maybe "sudo alsa force-reload"
"ps -ax | egrep -e pulseaudio -e pipewire | grep -v grep"
"pactl info"
"apt list | grep alsa | grep installed"
"less /etc/modprobe.d/alsa-base.conf"







Reporting Bugs



On Mint, run System Reports application to see any crash reports.

Run "apt show PKGNAME" to get info about a package, including URLs for bug-reporting and source code.

For some apps, it's hard to even figure out what you're running. For example, in Ubuntu 20.04, the default app that plays mp4 video files has no app-name or About menu item anywhere in the UI of the app. From the file-association in file explorer, I found out it's called "Videos". But that name doesn't appear anywhere on disk or in packages or in running processes, that I can find. From the application store, I was able to find out its home web site: https://wiki.gnome.org/Apps/Videos From there, I was able to find that another name for it is "Totem". Then "apt show totem" gives useful info.

For a given problem, check the version number of the software you are running, and what the latest released version number is. Is it possible for you to upgrade and re-test ?

Rocket2DMn's "Improving Ubuntu: A Beginners Guide to Filing Bug Reports"
Brendan Hesse's "How to Submit a Bug Report to Apple, Google, Facebook, Twitter, Microsoft, and More"

My impression of what usually happens:
+/-
  • If you're reporting a clear crash or failure: expect friendly reaction.

  • If you're reporting something not useful or done wrong: expect acceptance and put on a list.

  • If you're asking for a new preference or feature: maybe acceptance, maybe "why don't you implement it yourself", maybe "go away".

  • If you're asking for a change to the way things work now: expect "go away" or something less polite.


A lot of bug-tracking and mailing lists, plus packages and PPAs, are hosted on Launchpad.




Miscellaneous



Tweaking/fixing mouse/trackpad/scrolling/video latency/tearing:

+/-
Definitely back up the config files before you start messing with stuff, it's easy to go wrong.
Check what drivers you are using.
Compare behavior in various apps; maybe change a "smooth scrolling" setting in an app.
For KDE, maybe try kwin-lowlatency package.
Maybe try a different DE, distro, or GPU hardware.



Webcam

+/-
ArchWiki's "Webcam setup"
"sudo apt install v4l-utils qv4l2" and launch "qv4l2" (note: that's 4 L 2).
"sudo apt install guvcview" and do "guvcview --control_panel" ?



Keyboard

+/-
X and Wayland do keyboard layout differently ?
setxkbmap, localectl ?

If you suspect a stuck key or bad touchpad or similar:
Do "xev -event keyboard" or similar.