Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ drm.edid_firmware=DP-1:edid/drmcru_custom_DP-1.bin
On the supported Limine/mkinitcpio path, Install/Update modifies:

- `/lib/firmware/edid/<name>.bin`
- `/etc/mkinitcpio.conf`
- `/etc/mkinitcpio.conf.d/20-drmcru.conf`
- `/boot/limine.conf`
- `/etc/limine-entry-tool.d/drmcru-edid.conf` when `limine-mkinitcpio` is used

Expand All @@ -150,16 +150,27 @@ firmware files. Existing overrides for other connectors are retained in the same
kernel parameter. If an install or rebuild step fails, the script restores all
files changed by that run.

The mkinitcpio drop-in appends EDID paths with `FILES+=(...)`, preserving existing
files and overrides for other monitors. Install/Update migrates this monitor's
legacy entry from `/etc/mkinitcpio.conf` when present. Uninstall removes its entry
and deletes the drmcru drop-in when no overrides remain.

Automatic Apply requires mkinitcpio to read its default configuration and
drop-ins. Presets with explicit `*_config` assignments disable drop-ins and are
rejected when using `mkinitcpio -P`. Custom Limine UKI options must also avoid
`-c`/`--config`. Export includes instructions for configuring those systems
manually.

## Recovery

If a custom mode is unusable but the desktop remains accessible, switch back
to a known-good mode, choose Uninstall in `drmcru`, and reboot.

If the graphical session is unusable, boot once without the
`drm.edid_firmware=...` parameter using the Limine entry editor or another boot
entry. Then run `drmcru`, choose Uninstall, and reboot. Automatic changes to
`mkinitcpio.conf` and `limine.conf` have timestamped backups beside the original
files.
entry. Then run `drmcru`, choose Uninstall, and reboot. Changed configuration
files have timestamped backups beside the originals, including the main
`mkinitcpio.conf` when migrating a legacy installation.

## First-run troubleshooting

Expand Down
5 changes: 3 additions & 2 deletions src/export.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@ pub fn export_instructions(edid_path: &Path, plan: &ExportPlan) -> String {
),
String::new(),
"2. Ensure the EDID is available in the early initramfs.".to_string(),
" With mkinitcpio, add the install target above to FILES in /etc/mkinitcpio.conf."
" With mkinitcpio, append the install target using FILES+=(...) in /etc/mkinitcpio.conf.d/20-drmcru.conf."
.to_string(),
" Explicit -c/--config options or preset *_config assignments disable drop-ins; in that case, add it to FILES in the selected config instead.".to_string(),
String::new(),
"3. Add this kernel parameter to your bootloader:".to_string(),
format!(" {}", plan.drm_kernel_parameter()),
Expand Down Expand Up @@ -214,7 +215,7 @@ mod tests {
let instructions = export_instructions(Path::new("/tmp/drmcru_custom_DP-1.bin"), &plan);

assert!(instructions.contains("sudo install -D -m 0644"));
assert!(instructions.contains("FILES in /etc/mkinitcpio.conf"));
assert!(instructions.contains("FILES+=(...) in /etc/mkinitcpio.conf.d/20-drmcru.conf"));
assert!(instructions.contains("drm.edid_firmware=DP-1:edid/drmcru_custom_DP-1.bin"));
assert!(instructions.contains("monitor=DP-1,1920x1080@"));
assert!(instructions.contains(",auto,1"));
Expand Down
Loading