Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote 3 down vote accepted

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.

share|improve this answer
    
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
1  
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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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