1

I want to follow this tutorial. But I can't write to /sys/kernel/debug/dynamic_debug/control- or [debugfs]/dynamic_debug/control-file as suggested by the guide, even tough I am root, the special filesystem is mounted rw and the control-file has rw-mode for root.

How can I make the control-file writable?

I also have another side question. I will ask it, if I may:

All lines in the control-file look like this:

# filename:lineno [module]function flags format
init/main.c:782 [main]initcall_blacklisted =p "initcall %s blacklisted\012"

The guide asks me to add the following line:

echo 'module xhci_hcd +p' > <debugfs>/dynamic_debug/control

So is this the way to go? Or is there something terribly wrong with writing the above line to the control-file, that may break my system or anything?

1

So this does not solve the problem on how to write to /sys/kernel/debug/dynamic_debug/control, but solves my problem on how to follow the tutorial/guide above.

In the guide it says you can enable xhci_hcd-debugging by adding this line:

xhci_hcd.dyndbg=+p

as a kernel parameter when booting.

For doing this only once, press e, when you are in the grub-menu (after starting the computer) : Then you need to find the (correct) line after the keyword menuentry, which starts with linux. Add the above line behind something like quiet or quiet splash.

This can also be made permanent in grub(2):

  1. Open /etc/default/grub with (root) write permission.
  2. Add the string above to either GRUB_CMDLINE_LINUX or GRUB_CMDLINE_LINUX_DEFAULT (the former affects both regular and recovery modes, while the latter affects only regular boots). For example: GRUB_CMDLINE_LINUX="xhci_hcd.dyndbg=+p [other stuff]".
  3. Save the file.
  4. Run sudo update-grub.
  • Pressing 'e' on the grub console to edit the command directly is a simple way to enable it for a single session. – ricab Sep 24 '18 at 17:58
  • @ricab Yeah, I was aware of this, I added it to the answer. – Arch Linux Tux Sep 25 '18 at 6:57
  • I don't think editing /boot/grub/grub.cfg directly is advised. The file to edit is /etc/default/grub. An update-grub command is required afterwards. That cmd takes configuration input from multiple sources to generate /boot/grub/grub.cfg. Grub is updated automatically in some occasions (e.g. when updating the kernel), so manual changes in the boot file would be overwritten. – ricab Oct 17 '18 at 15:30
  • 1
    I was referring to grub2. – ricab Oct 17 '18 at 19:38
  • 1
    Sure, I just did that (currently awaiting review). Cheers – ricab Oct 17 '18 at 20:27

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.