Linux Device Manager

0 views
Skip to first unread message

Graciano Goudreau

unread,
Aug 5, 2024, 11:41:30 AM8/5/24
to navirenthe
Theplug and play" manager of Linux is usually udev. udev is responsible for recognizing hardware changes, (possibly) autoloading modules, and creating nodes in /dev if needed. If you wish to do something such as simulate a USB device removal under Linux (something that devcon can do), commands that interact with the running udevd should be used, I believe. I haven't done this under Linux but you can start by learning more about udev.

lsmod will display all currently loaded kernel modules. Device drivers are one function of a kernel module. insmod will load and start a module if possible, and most of the time cause the device to appear in /dev. rmmod does the reverse. If you execute an lsmod you'll notice some modules are dependent on others, rmmod won't let you remove a module if something depends on it. modprobe with its options handles dependencies.


Under Linux, modules can also be "built-in" to the kernel, and they won't appear in any module list. They are immediately and always available the moment the kernel is loaded by the bootloader. Another option is to place modules in a directory within an "initial ramdisk" (initrd) which is also loaded by the bootloader and immediately accessible to the kernel on boot. "Installing" or "updating" device drivers may involve creating a new or updated kernel with the module built-in, or adding/updating it in the initrd if it is not there. Most distributions provide tools and utilties to do this.


You usually would not have to worry about installing or obtaining a third-party driver unless it is not included in the "official" kernel from kernel.org - since kernel modules (including drivers) are part of the kernel, drivers for every supported device are also included, and usually provided with your distribution. So needing to install a "manufacturer-provided driver" under Linux isn't terribly common except possibly for video drivers and some wireless chipsets which still have a lot of legal encumbrances with regard to technical information needed by driver developers.


lshw can give you most of this information in a tree-like format. lspci, lsusb, lsscsi, and lscpu are also very helpful. Most busses such as PCI, SCSI, USB, have a lot of userland utilities available in most Linux distributions that you can use to configure and get information of specific classes of devices (example: hdparm). And almost all mentioned in this paragraph, and more, are just frontends to various files and directories in /proc and /sys; you'll want to use the utilities though in most cases.


As the successor of devfsd and hotplug,udev primarily manages device nodes in the /dev directory. At the same time, udev also handles all user space events raisedwhen hardware devices are added into the system or removed from it,including firmware loading as required by certain devices.


It's a piece of software that automatically enable or disable device drivers. The "automatic" part is usually doneby detecting that a new device has been attached to the machine. In addition to activating device drivers,it also automatically configures the device(for example, it automatically mounts a USB drive when it detects it,instead of you needing to open a disk manager or run a command to mount the drive).


Udev handles the setup of all newly detected devices (including both "hot-plugged" devices after the system has booted as well as permanently connected "cold-plugged" devices while the system is booting):


It will process custom rules, which may e.g. run helper programs to initialize the device (such as remapping keyboard scancodes, or uploading firmware into a printer, or just poking at /sys knobs), or which may augment the device's metadata for userspace programs (e.g. touchpad dimensions for libinput; see also systemd-hwdb).


Most programs deliberately ignore the initial kernel event but wait for the augmented event from udev; that way they'll only start using the device after its rules have finished doing what they need to do.


The device mapper is a framework provided by the Linux kernel for mapping physical block devices onto higher-level virtual block devices. It forms the foundation of the logical volume manager (LVM), software RAIDs and dm-crypt disk encryption, and offers additional features such as file system snapshots.[1]


Device mapper works by passing data from a virtual block device, which is provided by the device mapper itself, to another block device. Data can be also modified in transition, which is performed, for example, in the case of device mapper providing disk encryption or simulation of unreliable hardware behavior.


Functions provided by the device mapper include linear, striped and error mappings, as well as crypt and multipath targets. For example, two disks may be concatenated into one logical volume with a pair of linear mappings, one for each disk. As another example, crypt target encrypts the data passing through the specified device, by using the Linux kernel's Crypto API.[1]


So tell me. How do you know if your drivers for your GFX are ok? Whether you have installed your sound drivers correctly and if there are any other outstanding drivers that you need to install that havent yet been installed. Please do tell me.


But one thing to know about Linux is it is different from Windows. If you are looking for a similar way of grouping or structuring things in Linux, that you knew and liked very much in another operating system, there is IMHO a strong possibility that you will be disappointed. In such a case, if the disappointment is insurmountable, then simply stay with the Operating System you like. If that OS happens to be MS-Windows, then all he better, as most people in the world use and like that OS. Most of my friends (who are smart people) like and use MS-Windows, and I would not dream of talking them out it.


One can see what storage devices are present by typing (with root permissions):fdisk -lNow is that the same as MS-Windows way? No. If you want the Windows way, then Windows is the place to be.


Loading, configuring, and updating hardware drivers was one of the biggest hurdles I had to take from moving between Windows and Linux. The only reason was b/c I was looking for a windows-like solution of the device manager, which Linux lacks.


In the case of video cards, the manufacturers usually provide a driver that can be downloaded and installed which is similar to how Windows drivers are installed. As an alternative, you can add the respective repository under YaST and install the kernel module like you do any other piece of software.


My TV tuner is a hauppauge hvr-1250. This has actually been supported by the kernel since version 2.6.24, and on opensuse the kernel module loads without any trouble; my problems with getting the device to work are problems with the software I use to access it. Only recently have I been able to use the device, but that has been because the software I would like to use has finally added support for it.


I have followed the instructions on running the first boot, which I performed with the display.

Then, I wanted to try working with the jetson nano in headless mode, but I could not find it over USB connection.


If the SD card content is the wrong version for the QSPI content, then you either have to flash the Nano to the version compatible with the SD card, or flash the SD card to a version compatible with the QSPI content. The Nano models using the SD card do not put the boot content on the SD card. Earlier releases put differing amounts of content into QSPI memory (which is on the Nano module) during flash, and the earlier QSPI content is not compatible with newer SD card images.


Your best bet is to flash the Nano itself with the release version which produced the SD card image. This is how you are guaranteed that the two match. Flashing is the only way one would update QSPI content.


There is a method to reflash the whole jetson nano board. And this method is different from sdcard image. The reason why such re-flash is needed is mentioned by @linuxdev 's comment.

Most easiest way to do such full reflash is using the sdkmanager tool. But this re-flash is not able to work well on VM. So when I said VM is not able to work, what I am talking about is for this tool.


I am setting up an DHCP in linux for one of our offsite office that use wyse terminals and I cannot get code 186 to set the ip address for the wyse device manager. I am looking at the MAN page and I am not getting any headway.


I recently had trouble with this, and regardless of what I did(restart adb, edit adb_usb.ini, restart computer+device+swap usb port, reinstall studio etc. etc.) I just couldnt get it to work, and could not even detect my device using 'adb devices'. Finally after about 2 hours of googling and testing, someone suggested switching to PTP instead of MTP on my device. When I did this I got a popup on my device asking me to allow my mac access and suddenly everything worked(had to restart studio for it to show up there as well though).


Note: On Android 4.2 and newer, Developer options is hidden by default. To make it available, go to Settings > About phone and tap Build number seven times. Return to the previous screen to find Developer options.


That seems to be where you toggle what the project builds to. If you're importing a project it actually defaults to Emulator, not sure why. You can also select "Open Select Deployment Target Dialog" to list both connected as well as emulated devices.

3a8082e126
Reply all
Reply to author
Forward
0 new messages