Who is responsible for creating the "/sys/class/drm" directory structure, more specifically the "/sys/class/drm/card0-LVDS-1" directory?

I am using kernel-2.6.38 and an nVidia card.


The DRM module is responsible for that subtree in SysFS. You can browse the source code for that in drivers/gpu/drm/drm_sysfs.c.

The subdirectories are per-connector, with a name of the form card%d-%s with %d replaced by an index (that I know nothing about) and %s replaced with the connector name.

Five files per device should show up:

  • Connection status
  • Enabled (or not)
  • DPMS state
  • Mode list
  • EDID

For some devices, you'll get extra information for sub-connectors too.

  • I inserted the "drm" module, but I get the blank directory. – SHW Mar 30 '12 at 13:29
  • Yes, and? If you're using the proprietary nVidia driver, I don't believe it uses/supports (whatever the right term is) DRM. Not sure if the nouveau driver does. – Mat Mar 30 '12 at 13:31
  • I need this directory structure for another purpose. but to use it, I had to make it's presence on system. – SHW Mar 30 '12 at 13:34
  • If your driver doesn't use/support DRM, you won't get it. – Mat Mar 30 '12 at 13:35
  • 2
    That doesn't change the fact that if your card's driver doesn't talk to the Linux DRM subsystem, you won't get that directory. – Mat Mar 30 '12 at 13:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.