why isn't monitor listed under /dev in linux?
Device files on Unix systems in general are just one way for user programs to access device drivers; there isn't a one-to-one mapping from devices files to physical hardware, and not all hardware has a device file (or even a device driver). The kernel itself doesn't use device files to interact with hardware.
As pointed out by lcd047, network cards don't have device files at all. Programs interact with the network using APIs, e.g. the BSD socket API; even ethtool
uses a socket and ioctl()
to manipulate the network interface.
So when determining whether your monitor has a device file, it's useful to think of the ways programs interact with it. There aren't many tools which interact directly with a monitor... Programs display information on a monitor via a graphics card, and that does have device files: /dev/dri/*
, /dev/fb*
etc. But that's not the monitor. The only programs I know of which interact with a monitor directly are backlight control programs and ddccontrol
; the former generally use ACPI or laptop-specific devices (so the monitor's backlight is just a part of the system's power-usage model), and ddccontrol
uses the I²C bus whose devices appear as /dev/i2c-*
once the i2c-dev
module is loaded.
Related videos on Youtube
Jeril CJ
I like the outdoors. Hiking, camping, kayaking, scuba diving, biking, cross country skiing and photography. Basically the outdoors. and engineering and technology.
Updated on September 18, 2022Comments
-
Jeril CJ over 1 year
If /dev is suppose to list all the devices that is connected, like usb, hdd, webcam, how come on my ubuntu 15 VM I don't see a monitor? I am running the desktop edition so there should be a monitor.
Or maybe it is named something different?
-
Admin almost 9 yearsMay be the OS does not communicate with the monitor?
-
Admin almost 9 yearsSome physical devices need an interface in the filesystem, others don't. Network cards don't have corresponding entries in
/dev
either. -
Admin almost 9 yearshow could the OS not communicate with the monitor? how else does it display anything?
-
Admin almost 9 yearsMostly, the OS communicates with the graphics card, and the graphics card communicates with the monitor.
-