Troubleshooting/ko

The purpose of this page is to provide users, in particular new ones, with a set of techniques and tools to allow them to troubleshoot and fix problems with their Gentoo setups on their own. In addition, for those problems which are more complicated, this article seeks to provide users with the skills to collect information that will aid them and their supporters in resolving their issues with a greater degree of expediency.

This article assumes that the Gentoo Handbook has been read and that there is a basic understanding of using Gentoo.

Where to get help
Gentoo has quite a few wikis all of which have a wealth of information. Be wary that some articles may contain old or outdated information, but hands down, reading wiki articles is always a critical step when using Gentoo.


 * The Official Gentoo Wiki
 * The unofficial Gentoo wiki
 * An Archive of old Gentoo-Wiki.com Articles
 * Knowledge Base, for common practices and problems

On IRC, #gentoo is the recommended channel for general issues. This is probably the fastest way to get an answer.

Since IRC channels require active presence, some users might prefer leaving a message at a forum or [mailing list which continues to exist after closing the browser. When an answer pops up, a notification (usually through an e-mail) is sent back.

When all else fails, and it appears something is broken with Gentoo, Gentoo's bug tracker is a great resource to see if something has already been reported, or to create new bugs if need be. This is a very effective way to reach the Gentoo Developers, which can then use the given feedback to improve the problematic situation and solve the problem.

Programs
This is a collection of tools that are highly recommended:

First steps
In order to shape a problem into a solution; first understand the problem well enough. If the problem is not clear then it will be very hard, if not impossible to come up with a solution. An accurate, detailed description of the problem is more likely to yield a solution that best fits the problem.

Identifying the problem
This part may seem like it's a no-brainer, but without it, any troubleshooting will be next to impossible.

Take note of a few things:
 * 1) Is this problem related to hardware or software?
 * 2) What was done or has been changed recently that may have been the cause of this issue?
 * 3) Can additional information about the problem be collected?

Storing any form of detail, logs, other people experiencing it and more can be valuable and gives a good overview.

Drivers
Driver issues for hardware is one of the more common issues that are reported on IRC.

First and foremost, identify what the hardware is that is causing problems. lspci and lsusb are great tools for this purpose. For demonstration purposes, we'll be looking at an Ethernet card as the troublesome device.

Determining the proper driver
First look with lspci and find the device information:

It is also possible to use the  option to give a short-hand notation (which might be easier to search for on the Internet):

The model name and vendor/model  can be used to look up the device on a place like WikiDevi or Debian HCL to find the right driver to use in Linux.

Verifying the driver is loaded
Getting the driver is less than half of the battle. Most of the trouble with drivers is making sure that they are loaded and operating correctly.

Relying on our friend lspci again, run:

Note that here, an indicator is given that a driver is in use. If not, then no driver has claimed responsibility over this hardware. Assuming the driver was built as a module rather than built-in, try modprobe  to attempt loading the right module. If the driver was built-in, consider making it a module, because modules can be loaded with modprobe and unloaded with modprobe -r which saves on number reboots while debugging the issue.

Troubleshooting a driver
Compile the driver as a module, then capture the output it generates when the module is loaded. Make sure to first remove all modules that depend on the driver (see lsmod).

The following command will compare the dmesg</tt> output after removing the module (in this example, r8169</tt>) with the output after adding the module again, effectively showing the messages that were added (lines starting with +).

The most common issue is missing firmware. If a message shows up that informs the administrator about missing firmware, grab either or a specific firmware package from Portage and install it. After the firmware installation, unload and load the kernel module again to see if this fixes the situation.

Dependency graph slot conflicts
Occasionally, messages like this occur when trying to emerge a package:

Generally, this means that the packages listed have multiple requested versions in the dependency graph. And fortunately most, if not all, cases allow to resolve it by manually upgrading to the highest requested version. So assuming that the following message was received:

The most recent version desired is 20120520, so:

Often, it's advantageous to one-shot ( or  ) all of the conflicts at once because they sometimes depend on one another.

Here is another example of a block:

There should be no problem changing poppler versions. Note that luatex and cups-filters don't require a specific version of poppler, but they need to be rebuild with whatever version is used:

추가 정보 수집
도움을 요청할 때, 단 한번도 어떤 내용을 요구받지 않는다기보다는 어떤 추가 정보든 명령 출력 내용 같은 걸 여러번 요구받습니다. 이 문제는 수십줄 내지는 백여줄의 텍스트가 있습니다. 프리노드의 젠투 지원 채널 같은 IRC 대화방에 적당히 붙여넣기에는 너무 많습니다. 때문에 이 문제를 간편하게 해주는 를 도입했습니다. 사용자로 하여금 긴 출력 내용을 간단한 링크로 어딘가에 게시할 수 있게 해줍니다.

를 설치했는지 확인하십시오:

예를 들어 의 내용을 보여주려면 를 활용하여 다음과 같이 단순화할 수 있습니다:

또는 명령의 자세한 출력을 누군가가 필요하다고 한다면:

Sometimes it is necessary to redirect stderr to stdout so that error messages can be pasted as well. That can be done like this:

These return a link to a pastebin site page that can be easily shared with someone to get help.

붙여넣을때 고려해야 할 사항은:

하드웨어 문제 또는 커널 문제일 경우:


 * 포티지 문제일 경우:


 * 꾸러미 설치 문제일 경우:


 * Xorg 문제일 경우:


 * 시스템에 설치한 모든 꾸러미를 제공해야 할 경우:

Wrapping things together
Below is a shell function that can be used to have several commands executed and their output processed by a single wgetpaste</tt> command so that only one URL needs to be provided to the user or developer that wants to help out:

Please do not use pastebin services on the gentoo-user mailing list
Most pastebin services expire old pastes periodically (not to mention that pastebin services are hardly profitable, and close down all the time) whereas mailing list messages are archived in multiple places and are referenced for years. If the relevant output is short, or can be trimmed, then copy and paste it into the body of the email - longer output can be directed into a text file and added as a plain attachment.

해결책 정리
문제 설명문을 알기 쉽게 작성하고, 동작에 대한 모든 기록, 모든 종류의 디버깅 데이터(세부 문제, 하드웨어 / 소프트웨어 정보, 로그, 백트레이스 등) 를 포함한 쓸만한 데이터 모음을 바람직하게 모아두면 해결책을 찾아볼 수 있습니다:

In general, repeat the following steps to come to a solution:


 * Get an idea where the problem might be, think about possible causes.
 * If there are no obvious areas to look into, become more acquainted with the related areas or ask an expert more about it.
 * Sometimes it is necessary to make assumptions to proceed. When assumptions are made, put it to the test: false assumptions should not make users and developers blind of other causes.
 * Obtain additional debugging information in the area of a problem, or perform tests.

Often this will lead to multiple possible causes. It is important to test them (to verify it is the actual cause or not) and therefore test them individually; this is also known as "divide and conquer".

Let's say a problem like "my browser sometimes displays white pages when I boot" comes up and a lot of details are already known about it, then there may be number of possible causes:


 * Is this because the browser was improperly closed when the system rebooted?
 * Verify this by killing the process and pulling the plug several times, each time checking if the pages are white after booting again. If this is a cause, is it the actual cause or are there other causes?


 * Is this the result of a specific browser version being broken?
 * Try older or newer versions for a few days or reboots and see if they are broken as well.

등등...

With the additional information, dare to think about more specific causes:


 * Does a certain pinned tab X that loads plugin Y break the system?
 * Unpin the tab so it doesn't open on launch anymore or disable the plugin, see if this keeps the problem away.


 * Graphical issues were reported as well, might this maybe mean this is caused by the video drivers?
 * Try a different version for those drivers, or alternative drivers if available.

As each possible cause is investigated, the actual cause of the problem might come closer and closer.

And in the end, if the cause is still not found, the Where to get help resources at the top of this article yield a multitude of places with people that are looking forward to help; make them happy with a careful problem description and mentioning what has already been tried so far, it'll help them help out.