How to enable DRM driver debug logging in Linux ?

If you are facing some issues with graphics or DRM , display etc.. sometime your may want to enable the DRM drivers all debugging messages so you can narrow down the problems. In Linux the drm kernel drivers source code can be found in drivers/gpu/drm.

Enabling verbose debug messages is done through the drm.debug parameter, each category being enabled by a bit:

  • drm.debug=0x1 will enable CORE messages
  • drm.debug=0x2 will enable DRIVER messages
  • drm.debug=0x3 will enable CORE and DRIVER messages
  • drm.debug=0x1ff will enable all messages

So, to enable the DRM logs, you simply need to echo following value to sysfs file from console,

$ echo 0xf > /sys/module/drm/parameters/debug

By default permission to access this sysfs file is blocked as,

$ cat /sys/module/drm/parameters/debug
cat: /sys/module/drm/parameters/debug: Permission denied

Hence you need to change the permissions as,

Subscribe with Valid Email Id to receive updates in Inbox. ( Secured by Google FeedBurner )


$ sudo chmod 777 /sys/module/drm/parameters/debug

If you read this debug file, by default its set to 0,

$ cat /sys/module/drm/parameters/debug

Now, you can enable the debug logs as mentioned earlier,

$ echo 0xf > /sys/module/drm/parameters/debug

Now, once you are able to set the 0xf to debug parameter, you can see the kernel logs enabled by using “dmesg”

[ 1576.503157] [drm:drm_vblank_enable [drm]] enabling vblank on crtc 0, ret: 0
[ 1576.503198] [drm:drm_ioctl [drm]] pid=1600, dev=0xe200, auth=1, DRM_IOCTL_MODE_ADDFB2
[ 1576.503239] [drm:drm_mode_addfb2 [drm]] [FB:102]
[ 1576.503256] [drm:drm_ioctl [drm]] pid=1600, dev=0xe200, auth=1, DRM_IOCTL_MODE_PAGE_FLIP
[ 1576.503292] [drm:drm_mode_object_get [drm]] OBJ ID: 105 (1)

Reference :


Leave a Comment

Android Android Build system Android Commands Android Java Applications Application Libraries Application Stack / User Interface Bash / Shell Scripts Bluetooth driver Cloud Technologies Commands and Packages Compilation Content Management System Core Kernel C Programs Development & Build Development, Debugging and Performance Tools Development Environment Setup Django & REST Api Errors & Failures Git Hardware Platforms HTML JAVA Programs Linux, OS Concepts and Networking Linux Device Drivers Linux Host, Ubuntu, SysAdmin Linux Kernel Linux Networking Middleware Libraries, HAL Multimedia Audio, Video, Images NDK / Middleware / HAL OS Concepts PHP Programming Languages Scripting and Automation Search Engine Optimisation ( SEO ) Social Media Source Code Management ( SCM ) System Administration, Security Testing and Debugging Uncategorized Web design and development Website Hosting Wordpress Yocto / Bitbake / Openembedded