I have a hardware detection problem, what logs do I need to look into?
Tags: ubuntu, debugging
Published: 2021-11-22 12:01:03

---
title: I have a hardware detection problem, what logs do I need to look into?
published: true
date: 2021-11-22 11:51:58 UTC
tags: Ubuntu,debugging
canonical_url: https://stackallflow.com/ubuntu/i-have-a-hardware-detection-problem-what-logs-do-i-need-to-look-into/
---

<header>
<p><span style="font-size: 1.2em; color: initial;">debugging</span></p>
</header>

I am trying to ask a question about getting my hardware to work but I don’t know what information to add to my question to get help, what do I need to do?

Related if you don’t have access to a GUI:

- [How do I get information from the logs on my computer when I only have access to the command line?](https://askubuntu.com/questions/440087/how-do-i-get-information-from-the-logs-on-my-computer-when-i-only-have-access-to)

#### Accepted Answer

**The most important information you can give is what you’ve _done_, what you _expected_ to happen, and what you _observe_ has happened**.

[This question](https://askubuntu.com/q/14071/188) is a particularly fine example of a hardware-detection problem with a USB device.

Other examples of this could be:

> I installed Ubuntu 10.04 Desktop on my Dell Optiwhatever 312 laptop. When  
> I log in, my wireless card isn’t visible in the Network Manager popup menu,  
> although the wired network shows up there.

or

> I have Ubuntu 10.04 Netbook edition on my System76 laptop. When I plug my  
> headphones into the socket, the sound comes out the headphones but also  
> out the speakers.

or

> I’m using Ubuntu 10.04. I used the “Additional Drivers” program to install the  
> current nVidia drivers for my GeForce FX 5200. Now when I boot the system stops  
> with a black screen after the Ubuntu boot splash is finished.

After this general problem description, what other information is interesting depends on what sort of hardware you’re having problems with, and what problems you’re having.

In general:

- `sudo lspci -nn` will list all the PCI devices in your system. This will include all the expansion cards (Video cards, WiFi, etc) in your system, whether or not the kernel has a driver for them. This information is useful if you’re not sure precisely what hardware you have.
- `lsusb` will list all the USB devices connected to your system. Again, this is useful if you’re not sure precisely what hardware you have. It’s also useful to check that the device is actually plugged in correctly!
- `/var/log/udev` and `/var/log/dmesg` will have information about what devices the kernel has detected. These logs are generally very big – unless you know what parts of the log are interesting it’s not a good idea to include these in your question, although a link to them could be useful (you can use [http://paste.ubuntu.com](http://paste.ubuntu.com) for large logs)
- `sudo lshw --class X` pr `sudo lshw -C X` can also give a bit of valuable hardware info on the specifed class `X` – examples classes include `cdrom`, `communication`, `core`, `cpu`, `display`, `isa`, `medium`, `memory`, `multimedia`, `network`, `pci`, `scsi`, `serial`, `storage` and `usb` – so for instance you can use `sudo lshw -C network` to show info on the network cards the computer can detect.

For **Video** problems:

- `/var/log/Xorg.0.log` is the X server log file. This is useful for all video problems. This file can get long so feel free to just put it on [http://paste.ubuntu.com](http://paste.ubuntu.com). Be sure to give a link to your “paste” so we can find it when we need to.
- `LIBGL_DEBUG=verbose glxinfo` will display information about 3D acceleration support, useful for problems with 3D or desktop effects.
- `lspci -nn | grep VGA` will list all the video cards in your system, useful if you are not sure what type of video card you have.
- `/usr/lib/nux/unity_support_test -p` should be used for compiz and other Unity compatability issues.

For **Audio** problems:

- `cat /proc/asound/cards` will list the audio devices that have been detected. You should include this.
- `cat /proc/asound/card0/codec#0` will contain information about the first sound card, including information about the input/output ports connected to it. If you have a problem with plugging in a microphone, headsets, or external speakers, include this. You may also have more than one sound device. In that case, there will be more than one `/proc/asound/card???` directory.
- Wiki: [Debugging Sound Problems](https://wiki.ubuntu.com/DebuggingSoundProblems)

The post [I have a hardware detection problem, what logs do I need to look into?](https://stackallflow.com/ubuntu/i-have-a-hardware-detection-problem-what-logs-do-i-need-to-look-into/) appeared first on [Stack All Flow](https://stackallflow.com).