Troubleshooting Hardware

Video Activity
Join over 3 million cybersecurity professionals advancing their career
Sign up with
Required fields are marked with an *
or

Already have an account? Sign In »

Time
21 hours 25 minutes
Difficulty
Intermediate
CEU/CPE
21
Video Transcription
00:00
>> Hey, there Cybrarians. Welcome back to
00:00
the Linux plus course here at Cybrary.
00:00
I'm your instructor Rob Gels.
00:00
In today's lesson, we're going to
00:00
be discussing troubleshooting hardware.
00:00
Upon completion of today's lesson,
00:00
you're going to be able to understand
00:00
the types of system hardware issues that you
00:00
may need to troubleshoot and
00:00
identify issues with things like memory,
00:00
video, communications ports as well
00:00
as USB printers and keyboard mapping.
00:00
We're going to see how to locate files and
00:00
use commands to troubleshoot system hardware.
00:00
This should probably go without saying by now,
00:00
but before you buy any hardware or software,
00:00
make sure it will work with your Linux distribution.
00:00
If you're unsure, check your distribution website for
00:00
what is called a hardware compatibility list HCl,
00:00
or for software compatibility information.
00:00
You can also check next community sites for
00:00
recommendations on hardware that people are using,
00:00
what they're buying to build a Linux system.
00:00
Now physical memory issues
00:00
are really tricky to troubleshoot
00:00
because there can be a lot of
00:00
symptoms of physical memory issues.
00:00
We can have a system freeze or
00:00
any memory-intensive applications,
00:00
we have kernel panics or segmentation faults,
00:00
or we can just have installs that are
00:00
failing for no reason and random file corruption.
00:00
First of all, we should verify
00:00
that the issue is not related
00:00
to the capacity or the amount
00:00
of memory we have in the system.
00:00
For that we could use free or we can use
00:00
vmstat if you've got a lot of swapping occurring.
00:00
If we determined that it's not a capacity issue,
00:00
the next thing we can do is test the memory.
00:00
Now we can reboot and run memtest or memtest86 plus,
00:00
that's usually an option from
00:00
the system boot menu or we
00:00
can install the memtest or application.
00:00
This is going to run memory tests in chunks from
00:00
inside the running OS via the command line or shell.
00:00
Now video hardware issues are a lot
00:00
easier to spot because we're going to see things
00:00
>> like slow display or the audio may lag relative to
00:00
>> the video or we might have
00:00
screen glitches like the one we see on the right there.
00:00
We can start by checking
00:00
the usual places for hardware issues,
00:00
dmesg or journalctl,
00:00
and then we can check video,
00:00
windows manager and compositor logs.
00:00
For example, if we're using x11 on our system,
00:00
we can look at var/log/Xorg start outlawed many of
00:00
those XOR logs or we can look at
00:00
journalctl and systems that are running Wayland.
00:00
Now, we may also have a GPU or
00:00
graphics processing unit and
00:00
graphics card, and that could have issues.
00:00
A lot of times they have driver issues.
00:00
Definitely check this.
00:00
See the GPU vendor website for updated drivers.
00:00
If there are no updates,
00:00
if you can test that graphics card
00:00
another system and see
00:00
if you're still seeing the same issue.
00:00
Now, communications ports are generally
00:00
referring to serial ports or I/O ports.
00:00
A serial port is represented
00:00
by dev/ttyS and then the
00:00
number for the port in the device directory,
00:00
the dev directory, that's the device
00:00
file dev/ttyS1 for the first one, for example.
00:00
Now serial ports are uncommon,
00:00
but you still see them used a lot in retail.
00:00
Retail printers serial.
00:00
Now, I/O port status can be viewed in proc/ioports.
00:00
We talked about that previously
00:00
and we can check the message and
00:00
journalctl for hardware error messages
00:00
about serial or I/O devices.
00:00
If we don't see issues there,
00:00
we should definitely go check the manufacturer's site
00:00
>> or vendor site for any updated drivers
00:00
>> for these devices.
00:00
>> Now when we have USB devices having issues,
00:00
the first step is to ensure that
00:00
the USB module is loaded.
00:00
We could do this by running ls mod
00:00
and then grepping for USB.
00:00
If we see a response, great,
00:00
We know that the modules installed
00:00
>> and we're good to go.
00:00
>> But if we get no response,
00:00
we can use modprobe to load the USB module.
00:00
We could also check and see if it's built-in.
00:00
Maybe check and look at the built-in modules
00:00
like we saw in the previous lesson.
00:00
But if the driver is loaded,
00:00
tried disconnecting the USB device
00:00
and then watching the journal.
00:00
Now we can watch the journal file in
00:00
real time by using journalctl -f.
00:00
>> What we can do is unplug run journalctl data -f,
00:00
>> then plug back in
00:00
the USB device and watch the messages come in in
00:00
real time and make sure that we're seeing
00:00
this USB device successfully connected.
00:00
We're not seeing error messages in the journal.
00:00
We can also check the USB bus itself
00:00
>> by using lsusb -v. If the device
00:00
>> manufactured product information shows for that device,
00:00
that means that Linux is seeing it.
00:00
Finally, we can try
00:00
a different USB port while watching journal.
00:00
We can do that journalctl -f as well and try
00:00
different port because we may have
00:00
a physically defective port on our system.
00:00
Printer devices are really
00:00
generally plug and play for Linux,
00:00
but sometimes issues do occur and
00:00
>> generally they're going to be either
00:00
>> related to outdated or incorrect drivers
00:00
or a bad connection.
00:00
Just as with any other hardware,
00:00
the first step will be to check
00:00
the message or journalctl and
00:00
see if the device is identified there
00:00
>> or having errors in those messages.
00:00
>> Next, we can take a look at printer error log.
00:00
If you go into var/logs/cups/error_log
00:00
or check the printer configuration
00:00
in etc/cups/printers.comf.
00:00
Lastly, we might want to
00:00
check and replace the connection cable.
00:00
We might have a bum USB cable or whatever you're using.
00:00
Then we may also want to check for
00:00
driver updates for that printer.
00:00
The last thing we'll talk about today is
00:00
keyboard mapping and basically,
00:00
if the user presses a key and
00:00
a different letter appears on the one they pressed,
00:00
that's a keyboard mapping issue,
00:00
which generally means they're using
00:00
a different keyboard than
00:00
the one that's specified for the locale that we're in.
00:00
In Red Hat based distributions,
00:00
we can run the localectl command
00:00
to display and correct key mappings.
00:00
Localectl displays locales settings.
00:00
It'll show you what the current key mapping is
00:00
for the system and that you can run
00:00
>> localectl list-keymaps to show
00:00
>> all the available key mappings,
00:00
and then do localesctl set-keymap, and then the keymap
00:00
means to set the correct keymap.
00:00
If somebody comes here and they've got
00:00
a French keyboard and they're on a US system.
00:00
They're going to need a key mapping
00:00
>> for French keyboard.
00:00
>> Now on Debian Based distros,
00:00
you can use dpkg-reconfigure keyboard-configuration
00:00
to correct key mapping.
00:00
With that, in this lesson, we
00:00
covered understanding the types of
00:00
system hardware issues that you may need to
00:00
troubleshoot and we talked about issues of memory,
00:00
video, communication ports,
00:00
USB printers, and keyboard mapping.
00:00
Then we talked about locating files in
00:00
commands to troubleshoot system hardware issues.
00:00
Thanks so much for being here and I look
00:00
forward to seeing you in the next lesson.
Up Next