How to provide information about peripherals with dmesg
You want to see how your Linux system reacts to a certain peripheral being plugged in (smartphone, monitor, USB stick etc.).
dmesg can provide that information, but one needs to separate it from previous messages.
- Make sure the device in question is unplugged.
- Open a terminal, maximise it.
dmesg -wor --follow (wait for new messages).
- Some systems require elevated privileges for
dmesg, if so prepend
sudoor become superuser first.
dmesg -wspat out lots of stuff and has hopefully settled down (if it hasn't that could point to a different problem), press <Enter> until your terminal window is blank.
- Now insert the peripheral you want information about and wait a few seconds.
- Copy all the new output that is visible now.
This can also be insightful when removing peripherals and in many other situations.