Summary: | tmpfiles fails to write to /sys/kernel/debug/vgaswitcheroo/switch on boot | ||
---|---|---|---|
Product: | systemd | Reporter: | Daniel Oertwig <Daniel.Oertwig> |
Component: | general | Assignee: | systemd-bugs |
Status: | RESOLVED NOTABUG | QA Contact: | systemd-bugs |
Severity: | normal | ||
Priority: | medium | ||
Version: | unspecified | ||
Hardware: | x86-64 (AMD64) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | Boot with w parameter |
Description
Daniel Oertwig
2012-10-12 08:31:37 UTC
Created attachment 68483 [details]
Boot with w parameter
Booted with
w ... OFF
in /etc/tmpfiles.d/vgaswitcheroo.conf
I assume the real problem is that the radeon module is loaded some time AFTER tmpfiles is doing its job.
Of course, the quick fix would be to create a unit to do the job.
Is there any other way to get this working?
This is a general race between loading modules and applying the /sys change. Basically, "tmpfiles" is simply not the tool to make the change you are attempting. Instead, please use a udev rule that writes the file in question as the hw shows up. That's the only way how to properly serialize the actions. Which reminds me that I actually have had on my TODO list for a while to post a blog story about how to properly apply /sys and /proc/sys settings to a device without these races. Hi, so writing an udev rule is the proper way to solve this? I haven't thought of this yet, thank you! :) Other ideas I came up with was adding the module to the initramfs (which is what I had done previously) or using a unit as others on the web have done (with varying quality) But both seems more like a hack to me, so I'll write a udev rule. Closing, since an udev rule is the right solution here. And writing the blog story about this is in the systemd TODO file anyway, so we don't need this bug anymore. |
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.