This article explains some methods for general troubleshooting. For application specific issues, please reference the particular wiki page for that program.
This article or section needs expansion.
It is crucial toalways read any error messages that appear. Sometimes it may be hard, e.g. with graphical applications, to get a proper error message.
--verbose/-v/-V or--debug/-d) if there is still not enough information to debug./var/log,$HOME/.cache or$HOME/.localIf you require any additional support, you may ask onthe forums or onIRC.
When asking for support post thecomplete output/logs, not just what you think are the significant sections. Sources of information include:
systemd.log_level=debug boot parameter. This will produce a tremendous amount of output, so only enable it if it is really needed.-x parameter because this needlessly clutters the output and makes it harder to read.-b unless you need logs from a previous boot. Not specifying this may lead to extremely large pastes that may even be too big for any pastebins.journalctl -k ordmesg (both with root privileges).Xorg.log may be located in one of several places: the system journal,/var/log/ or$HOME/.local/share/xorg/.Xorg.log in its own log directory./var/log/pacman.log.--debug parameter.One of the better ways to post this information is to use apastebin.
A link will then be output that you can paste to the forum or IRC.
Additionally, you may wish to reviewhow to properly report issues before asking.
This article or section needs expansion.
nomodeset on some hardware? (Discuss inTalk:General troubleshooting)When diagnosing boot problems, it is very important to know in which stage the boot fails.
If the debugging tools provided by any stage are not enough to fix the broken component, try using a e.g.USB stick with the latest Arch Linux ISO on it.
After the boot process, the screen is cleared and the login prompt appears, leaving users unable to read init output and error messages. This default behavior may be modified using methods outlined in the sections below.
Note that regardless of the chosen option, kernel messages can be displayed for inspection after booting by usingjournalctl -k ordmesg. To display all logs from the current boot usejournalctl -b.
This is basic management that applies to most terminal emulators, including virtual consoles (VC):
Ctrl+s to pause the output.Ctrl+q to resume it.This pauses not only the output, but also programs which try to print to the terminal, as they will block on thewrite() calls for as long as the output is paused. If yourinit appears frozen, make sure the system console is not paused.
To see error messages which are already displayed, seeGetty#Have boot messages stay on tty1.
Most kernel messages are hidden during boot. You can see more of these messages by adding different kernel parameters. The simplest ones are:
debug, which has the following effects:ignore_loglevel, which has the same effect on the kernel asdebug orloglevel=8 (since debug messages are at7), but prevents the log level from being raised later in the boot.Other parameters you can add that might be useful in certain situations are:
earlyprintk=vga,keep prints kernel messages very early in the boot process, in case the kernel would crash before output is shown. You must changevga toefi forEFI systems.log_buf_len=16M allocates a larger (16 MiB) kernel message buffer, to ensure that debug output is not overwritten.#Printing more kernel messages indicates how to print of the kernel log buffer to the console, but that buffer itself won't contain any messages it didn't already (aside from the debug systemd output). This heading discusses methods for getting more detailed information out of the kernel log.
Messages printed withpr_debug or related functions such asdev_dbg(),drm_dbg(), andbt_dev_dbg() will not be produced unless you either:
DEBUG where desired.This section will discuss how to use dynamic debug, which is useful if you have already looked at your kernel log with everything up to informational logs, and would like even more debugging information from a particular location.
Firstly, you must be running a kernel that was compiled with theCONFIG_DYNAMIC_DEBUG kernel configuration option set. This is already the case forlinux, so no action is required if you are using that kernel.
Then, you need to know where you want to see debug messages from. A couple of options are:
i915 DRMkernel module.Using that "source" of messages, you have to come up with a dynamic debug query that indicates which debug messages to enable, of the format:
match_typematch_parameterflags
Where:
module orfile.+p to start printing its messages, or-p to undo that.Some examples of queries are:
module i915 +p to print debug messages from thei915 kernel module.file drivers/gpu/drm/* +p to print debug messages from DRM drivers.file * +p to print debug messages.Finally, to actually enact the query, you can either:
# echo "query" > /sys/kernel/debug/dynamic_debug/control
dyndbg="query"kernel parameterThis is a greatly simplified overview of dynamic debug's capabilities; seethe documentation for further details.
There are also a number of separate debug parameters for enabling debugging in specific subsystems e.g.bootmem_debug,sched_debug. Also,initcall_debug can be useful to investigate boot freezes. (Look for calls that did not return.) Check thekernel parameter documentation for specific information.
netconsole is a kernel module that sends all kernel log messages (i.e. dmesg) over the network to another computer, without involving user space (e.g. syslogd). Name "netconsole" is a misnomer because it is not really a "console", more like a remote logging service.
It can be used either built-in or as a module. Built-innetconsole initializes immediately after NIC cards and will bring up the specified interface as soon as possible. The module is mainly used for capturing kernel panic output from a headless machine, or in other situations where the user space is no more functional.
Getting an interactive shell at some stage in the boot process can help you pinpoint exactly where and why something is failing. There are several kernel parameters for doing so, but they all launch a normal shell which you canexit to let the kernel resume what it was doing:
rescue launches a shell shortly after the root file system is remounted read/writeemergency launches a shell even earlier, before most file systems are mountedinit=/bin/sh (as a last resort) changes the init program to a root shell.rescue andemergency both rely onsystemd, but this should work even ifsystemd is broken.Another option is systemd's debug-shell which adds a root shell ontty9 (accessible withCtrl+Alt+F9). It can be enabled by either addingsystemd.debug_shell to thekernel parameters, or byenablingdebug-shell.service.
SeeKernel modules#Obtaining information.
Unfortunately, freezes are usually hard to debug and some of them take a lot of time to reproduce. There are some types of freezes which are easier to debug than others:
If nothing else helps, try aclean shutdown. Pressing the power buttononce may unfreeze the system and show the classic "shutdown screen" which displays all the units that are getting stopped. Alternatively, using the magicSysRq keys may also help to achieve a clean shutdown. This is very important because thejournal may contain hints why the machine froze. The journal may not be written to disk on an unclean shutdown. Hard freezes in which the whole machine is unresponsible are harder to debug since logs can not be written to disk in time.
Remote logging may help if the freeze does not permit writing anything to disk. A crude remote logging solution, which needs to be invoked from another device, can be used for basic debugging:
$ sshfreezing_host journalctl -f
Many fatal freezes in which the whole system does not respond anymore and require a forced shutdown may be related to buggy firmware, drivers or hardware. Trying a different kernel (seeKernel#Debugging regressions) or even a different Linux distribution or operating system, updating the firmware and running hardware diagnostics may help finding the problem.
If a freeze does not permit gathering any kind of logs or other information required for debugging, try reproducing the freeze in a live environment. If a graphical environment is required to reproduce the freeze or if the freeze can be reproduced on the archiso, use the live environment of a different distribution, which is preferably not based on Arch Linux to eliminate the possibility that the freeze is related to the version or patches of the kernel.Should the freeze still happen in a live environment, chances are that itmay be hardware-related. If it does not happen anymore, it is necessary to be aware of the differences of both systems. Different configurations, differences in versions and kernel parameters and other, similar changes may have fixed the freeze.
However, a blinking caps lock LED may indicate akernel panic. Some setups may not show the TTY when a kernel panic occurred, which may be confusing and can be interpreted as another kind of freeze.
If an update causes an issue butdowngrading the specific package fixes it, it is likely aregression. If this happened after a normal full system upgrade, check yourpacman.log to determine which package(s) may have caused the issue. The most important part of debugging regressions is checking if the issue was already fixed, as this can save much time. To do so, first ensure the application is fully updated (e.g. ensure the application is the same version as in theofficial repositories). If it already is or if updating it does not fix the issue, try using the development version, usually aVCS version, which may already be packaged in theAUR. If this fixes the issue and the version with the fixes is not yet in the official repositories, wait until the new version arrives in them and then switch back to it.
If the issue still persists, debug the issue and/orbisect the application and report the bug on the upstream bug tracker so it can be fixed.
This will manifest commonly (but probably not only) as:
/dev/,FATAL: Modulemodule not found in directory /lib/module/kernelversion when usingmodprobe to load a module that was not already used before the kernel package update.As partially covered inSystem maintenance#Restart or reboot after upgrades, the kernel is not updated when you update the package but only once you reboot afterwards. Meanwhile, the kernel modules, located in/usr/lib/modules/kernelversion/ are removed by pacman when installing the new kernel. As explained inFS#16702, this approach avoids leaving files on the system not handled by the package manager but leads to the aforementioned symptoms. To fix them, reboot systematically after updating the kernel. The long-term evolution, yet to be implemented, will be to use versioned kernel packages : the main blocker being how to handle the removal of the previous kernel versions once they are not needed anymore.
Another solution is available askernel-modules-hook, where two pacman hooks use rsync to keep the kernel modules on the file system after the kernel update andlinux-modules-cleanup.service that marks the old modules for removal four weeks after onceenabled.
SeePacman#Troubleshooting for general topics, andpacman/Package signing#Troubleshooting for issues with PGP keys.
If apartial upgrade was performed, try updating your whole system. A reboot may be required.
# pacman -Syu
If you usually boot into a GUI and that is failing, perhaps you can pressCtrl+Alt+F1 throughCtrl+Alt+F6 and get to a working tty to runpacman through.
If the system is broken enough that you are unable to runpacman,boot using a monthly Arch ISO from a USB flash drive, an optical disc or a network with PXE. (Do not follow any of the rest of the installation guide.)
Mount your root file system:
# mount /dev/rootFileSystemDevice /mnt
Mount any other partitions that you created separately, adding the prefix/mnt to all of them, i.e.:
# mount /dev/bootDevice /mnt/boot
Try using your system'spacman while chrooted:
# arch-chroot /mnt# pacman -Syu
If that fails, exit thechroot, and try:
# pacman -Syu --sysroot /mnt
If that fails, try:
# pacman -Syu --root /mnt --cachedir /mnt/var/cache/pacman/pkg
This article or section needs expansion.
fuser is a command-line utility for identifying processes using resources such as files, file systems and TCP/UDP ports.
fuser is provided by thepsmisc package, which should be already installed as a dependency of thebasemeta package. Seefuser(1) for details.
/usr/lib/udev/rules.d/70-uaccess.rules and[5])First, make sure you have a valid local session within X:
$ loginctl show-session $XDG_SESSION_ID
This should containRemote=no andActive=yes in the output. If it does not, make sure that X runs on the same tty where the login occurred. This is required in order to preserve the logind session.
Basicpolkit actions do not require further set-up. Some polkit actions require further authentication, even with a local session. A polkit authentication agent needs to be running for this to work. Seepolkit#Authentication agents for more information on this.
If, while using a program, you get an error similar to:
error while loading shared libraries: libusb-0.1.so.4: cannot open shared object file: No such file or directory
Usepacman orpkgfile to search for the package that owns the missing library:
$ pacman -F libusb-0.1.so.4
extra/libusb-compat 0.1.5-1 usr/lib/libusb-0.1.so.4
In this case, thelibusb-compat package needs to beinstalled. Alternatively, the program requesting the library may need to be rebuilt following asoname bump.
The error could also mean that the package that you used to install your program does not list the library as a dependency in itsPKGBUILD: if it is an official package,report a bug; if it is anAUR package, report it to the maintainer using its page in the AUR website.