启动时执行 setpci

启动时执行 setpci

我在 MBA 上启动 Arch 时使用 grub 执行两个 setpci 命令。这些命令为我解决了“startx 黑屏”问题:

setpci -s "00:17.0" 3e.b=8
setpci -s "02:00.0" 04.b=7

现在我想摆脱 grub 并切换到 rEFInd。如何在不使用 grub 的情况下执行这些命令?我已经尝试过 /etc/rc.local + systemctl,但它似乎不起作用,启动 X 时出现黑屏:

$ cat /etc/grub.d/01_enable_vga.conf
setpci -s "00:17.0" 3e.b=8
setpci -s "02:00.0" 04.b=7

$ cat /etc/rc.local
#!/bin/sh
setpci -s "00:17.0" 3e.b=8
setpci -s "02:00.0" 04.b=7
exit 0

$ sudo systemctl status rc-local.service
● rc-local.service - /etc/rc.local Compatibility
   Loaded: loaded (/etc/systemd/system/rc-local.service; enabled; vendor preset: disabled)
   Active: active (exited) since Mon 2015-08-10 14:37:01 MSK; 13min ago
  Process: 214 ExecStart=/etc/rc.local start (code=exited, status=0/SUCCESS)

Aug 10 14:37:01 air systemd[1]: Starting /etc/rc.local Compatibility...
Aug 10 14:37:01 air systemd[1]: Started /etc/rc.local Compatibility.

相关内容