Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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:

share|improve this question

8 Answers 8

up vote 115 down vote accepted

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 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.
  • sudo lshw --class X can also give a bit of valuable hardware info.

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 [pastebin.ubuntu.com]. 2. 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
share|improve this answer
4  
+1 for the opening sentence, how many times do I ask the same three questions to my clients.... –  ecoologic Apr 1 '12 at 14:33

These might be helpful (depending on the type of hardware):

dmesg
lspci
lsusb
share|improve this answer
    
lscpu too - :) there are many more commands ... –  dschinn1001 Aug 6 at 0:26

Execute these following commandline tool:

cat /var/log/Xorg.0.log
lspci
dmesg
lsusb

share|improve this answer

See https://wiki.ubuntu.com/DebuggingHardwareDetection

https://wiki.ubuntu.com/DebuggingProcedures is usually a good starting point if you want to know what information is useful for a bug report.

share|improve this answer

The following logs will contain details about hardware as it was seen by various system services (kernel, udev, etc) at boot time:

/var/log/udev
/var/log/dmesg
share|improve this answer

Wireless Cards

Wireless connectivity issues are fortunately becoming rarer with each Ubuntu release. However problems still occur.

The following information will help diagnose wireless connectivity issues in questions posted on Ask Ubuntu, you can open a terminal by hitting Ctrl-Alt-T and typing in one of these commands, then edit your question to add the information.

How the kernel recognises your network cards

sudo lshw -class network

Details of your USB wireless card

lsusb

This can give a long list depending upon how many USB devices are connected. If in doubt, post the entire list.

Details of your PCI wireless card

lspci

This can give a long list depending upon how many PCI devices are fitted. If in doubt, post the entire list.

How to see if a wireless card is soft-blocked or hard-blocked:

rfkill list all

Errors whilst connecting

Often you can see useful errors by looking at your kernel logs.

If you attempt to connect via network manager you can see what errors are produced by looking at dmesg

Suggested procedure - type dmesg, then attempt to connect and then type dmesg again. The new output displayed should give an indication as to the error.

Another useful output is dmesg | grep -i firmware - if you see some errors in the output then this can indicate you need to install some firmware - usually a package from the repository.

NDISWrapper

Searching on Google will sometimes bring results suggesting using NDISWrapper. This is an old technique where obtaining a Windows XP driver can be made to work in Ubuntu.

Generally, this should be avoided in current versions of Ubuntu since the drivers in the kernel have less compatibility issues.

If you have any wireless issues post the results of the four command-line entries above into your question BEFORE trying NDISWrapper.

share|improve this answer

One of the most useful things you can do when describing a hardware issue, is describe what you did, what is connection you are using.

For example:

"I plugged in a monitor and my desktop did not automatically extend on to it."

  • Tell us what port your monitor uses (for example, vga or hdmi).
  • Did you get any notifications when you plugged it in?
  • Did you ensure that the connection you used is the correct one?

This kind of information may seem very simple, but it can help to pin point where common problems come from, or if you question may be off topic.

share|improve this answer

A general problem-solving hint

I've noticed that I often collect data to diagnose a problem by:

First, identifying the problem - what did I do, what did I expect to happen, and what seemed to happen? Can I repeat the problem?

Then, causing the problem to happen, and listing the system's logs in reverse order of modification time:
ls -lrt /var/log,
tail -n 25 on recently modified log files (for reasonable values of 25), and
dmesg.
Read, wonder, think, guess, test, repeat as needed

share|improve this answer

protected by Community Jul 2 '12 at 17:27

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.