Whenever I have to troubleshoot "wifi is not working", "video is not working" etc. problems in linux I really do not understand how to do it correctly. My approach is messy: try lspci, look into dmesg, look into some logs, google and hopefully you'll find the solution. What I really want is to understand what is going on and to be able to trace the whole path and find out when exactly something's going wrong.

Let's say wifi is broken.

I run lspci to find out what kind of network card is in my computer. Usually I can see something related to wifi in lspci's output. This "something" includes the name and model of my card. But how does it work? Does this command list only the devices previously successfully discovered by something else (udev may be?) Where does it take the name/description of the device? Is it stored somewhere inside the hardware? Is it possible that lspci would not report my piece of hardware if something went wrong on previous steps?

Now I need to understand if appropriate kernel module is present for my hardware. What I do is I go into kernel sources, run make menuconfig and search for the name of my hardware. Does it mean that the kernel must know about all the network card models on Earth? This seems strange because there are way too many of such models. I guess all the network cards should have similar interfaces, what is so different between them that makes it necessary to have different modules for different types of cards?

Is there a better way to find out suitable kernel model for my card? What should I do if even after the module I found is compiled and installed the card still does not work? How can I make sure the module is correct (that would mean that the problem happens on some later stages)?

Now I run ifconfig or iwconfig. These commands display network interfaces. If I see the wifi interface in the result, does it mean that the kernel successfully detected the hardware and created the interface so that other programs can use it now? Does it mean that the problem now is more high-level (such as wrong password or smthn like that)?

Can contents of /dev/ directory help me somehow to understand what is going wrong (or make sure that something is definitely going right)?

Sorry if this question looks messy, it reflects the mess in my head. Please help me to get rid of this mess.

closed as too broad by Michael Homer, Rui F Ribeiro, Satō Katsura, Eric Renouf, Shadur Sep 30 '16 at 12:13

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    Dear moderators! It's a pity that format of my question is not suitable for this site. But I am still interested to get the answer. Could you please suggest a proper place to ask a questions like this? – lesnik Oct 2 '16 at 7:59
  • No moderator was involved in closing this question, it was done by the 5 users listed above. If you feel it was incorrectly closed, please open a discussion on Unix & Linux Meta. Alternatively, try removing the introductory details and streamlining your question down to the basics. I can't really understand what you're asking about. You need to make it more specific to be answerable. – terdon Oct 7 '16 at 9:14

Browse other questions tagged or ask your own question.