Running any test on Fedora causes a failed assertion during gem_quiescent_gpu() which is used in drm_open_driver* family of functions. IGT-Version: 1.21-g94bd67c5 (x86_64) (Linux: 4.15.3-300.fc27.x86_64 x86_64) (kms_pipe_crc_basic:4042) igt_debugfs-CRITICAL: Test assertion failure function igt_drop_caches_set, file ../lib/igt_debugfs.c:970: (kms_pipe_crc_basic:4042) igt_debugfs-CRITICAL: Failed assertion: igt_sysfs_printf(dir, "i915_gem_drop_caches", "0x%" PRIx64, val) > 0 (kms_pipe_crc_basic:4042) igt_debugfs-CRITICAL: Last errno: 1, Operation not permitted Stack trace: #0 [__igt_fail_assert+0x16e] #1 [igt_drop_caches_set+0x75] #2 [gem_quiescent_gpu+0x1f] #3 [drm_open_driver+0xae] #4 [drm_open_driver_master+0x15] #5 [__real_main181+0x1e] #6 [main+0x44] #7 [__libc_start_main+0xea] #8 [_start+0x2a] Test kms_pipe_crc_basic failed. **** DEBUG **** (kms_pipe_crc_basic:4042) igt_core-INFO: IGT-Version: 1.21-g94bd67c5 (x86_64) (Linux: 4.15.3-300.fc27.x86_64 x86_64) (kms_pipe_crc_basic:4042) drmtest-DEBUG: Test requirement passed: !(fd<0) (kms_pipe_crc_basic:4042) igt_debugfs-DEBUG: Opening debugfs directory '/sys/kernel/debug/dri/0' (kms_pipe_crc_basic:4042) igt_debugfs-CRITICAL: Test assertion failure function igt_drop_caches_set, file ../lib/igt_debugfs.c:970: (kms_pipe_crc_basic:4042) igt_debugfs-CRITICAL: Failed assertion: igt_sysfs_printf(dir, "i915_gem_drop_caches", "0x%" PRIx64, val) > 0 (kms_pipe_crc_basic:4042) igt_debugfs-CRITICAL: Last errno: 1, Operation not permitted (kms_pipe_crc_basic:4042) igt_core-INFO: Stack trace: (kms_pipe_crc_basic:4042) igt_core-INFO: #0 [__igt_fail_assert+0x16e] (kms_pipe_crc_basic:4042) igt_core-INFO: #1 [igt_drop_caches_set+0x75] (kms_pipe_crc_basic:4042) igt_core-INFO: #2 [gem_quiescent_gpu+0x1f] (kms_pipe_crc_basic:4042) igt_core-INFO: #3 [drm_open_driver+0xae] (kms_pipe_crc_basic:4042) igt_core-INFO: #4 [drm_open_driver_master+0x15] (kms_pipe_crc_basic:4042) igt_core-INFO: #5 [__real_main181+0x1e] (kms_pipe_crc_basic:4042) igt_core-INFO: #6 [main+0x44] (kms_pipe_crc_basic:4042) igt_core-INFO: #7 [__libc_start_main+0xea] (kms_pipe_crc_basic:4042) igt_core-INFO: #8 [_start+0x2a] **** END **** Subtest bad-pipe: FAIL Subtest bad-source: FAIL Subtest bad-nb-words-1: FAIL Subtest bad-nb-words-3: FAIL Subtest read-crc-pipe-A: FAIL Subtest read-crc-pipe-A-frame-sequence: FAIL Subtest nonblocking-crc-pipe-A: FAIL Subtest nonblocking-crc-pipe-A-frame-sequence: FAIL Subtest suspend-read-crc-pipe-A: FAIL Subtest hang-read-crc-pipe-A: FAIL Subtest read-crc-pipe-B: FAIL Subtest read-crc-pipe-B-frame-sequence: FAIL Subtest nonblocking-crc-pipe-B: FAIL Subtest nonblocking-crc-pipe-B-frame-sequence: FAIL Subtest suspend-read-crc-pipe-B: FAIL Subtest hang-read-crc-pipe-B: FAIL Subtest read-crc-pipe-C: FAIL Subtest read-crc-pipe-C-frame-sequence: FAIL Subtest nonblocking-crc-pipe-C: FAIL Subtest nonblocking-crc-pipe-C-frame-sequence: FAIL Subtest suspend-read-crc-pipe-C: FAIL Subtest hang-read-crc-pipe-C: FAIL
EPERM is not from us. strace just to check where that is being raised?
# getenforce Permissive # strace ./kms_pipe_crc_basic 2>&1 | grep EPERM openat(4, "i915_gem_drop_caches", O_WRONLY) = -1 EPERM (Operation not permitted)
ls -l /sys/kernel/debug/dri/0/i915_gem_drop_caches ?
# ls -l /sys/kernel/debug/dri/0/i915_gem_drop_caches -rw-r--r--. 1 root root 0 Feb 21 14:05 /sys/kernel/debug/dri/0/i915_gem_drop_caches
And whoami? You are running as root, right?
obviously # whoami root
Then I have no idea what your distro has done :)
Looks like it's caused by Fedora's customization. They picked up kernel lockdown series https://lwn.net/Articles/723653/ If the system is booted using secure boot it puts the kernel in lockdown mode, which includes disabling all the DebugFSes. To enable it you have to lift the lockdown: # sysctl kernel.sysrq=1 <Alt-PrtSc-x> on a physical keyboard; writing to /proc/sysrq-trigger does not work [ 137.276888] sysrq: SysRq : Disabling Secure Boot restrictions [ 137.276963] Lifting lockdown
Closed as NOTABUG.
Alternatively, it's possible to use a vanilla kernel: https://fedoraproject.org/wiki/Kernel_Vanilla_Repositories
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.