Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

DRM Debugging

Simon Ser edited this page Jul 28, 2021 · 7 revisions

The DRM subsystem has a module parameter affecting the amount of debug output it prints. For several kinds of DRM errors, this is the only way we can find out why something failed, especially if it's Invalid Argument. If this appears as a DRM error in the wlroots log, please include this debug log in any issues.

echo 0xFE | sudo tee /sys/module/drm/parameters/debug # Enable verbose DRM logging
sudo dmesg -C # Clear kernel logs
dmesg -w >dmesg.log & # Continuously write DRM logs to a file, in the background
sway -d >sway.log 2>&1 # Reproduce the bug, then exit sway
fg # Kill dmesg with Ctrl+C
echo 0x00 | sudo tee /sys/module/drm/parameters/debug # Disable DRM logging

Replace sway with whatever program/compositor you're testing.
Please note that the DRM debugging log is EXTREMELY verbose. Reproduce your issue as quickly as you can, so we don't have to sift through potentially hundreds of thousands of log messages.

The interesting part of the log will often be right before a line which looks like:

[ 2079.295837] [drm:drm_atomic_check_only [drm]] atomic driver check for 000000001dac41bb failed: -28
Clone this wiki locally