refactor(arch): disable Nvidia dgpu with udev rules
This commit is contained in:
parent
2fd483026b
commit
f6e6429789
@ -1,19 +1,4 @@
|
|||||||
- name: Install Bumblebee and bbswitch
|
- name: Disable Nvidia GPU
|
||||||
become: true
|
|
||||||
community.general.pacman:
|
|
||||||
name:
|
|
||||||
- bumblebee
|
|
||||||
- bbswitch
|
|
||||||
state: present
|
|
||||||
|
|
||||||
- name: Enable and Start Bumblebeed
|
|
||||||
become: true
|
|
||||||
ansible.builtin.systemd:
|
|
||||||
name: bumblebeed.service
|
|
||||||
state: started
|
|
||||||
enabled: true
|
|
||||||
|
|
||||||
- name: Write bbswitch.conf to modprobe.d & modules-load.d
|
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
content: "{{ item.content }}"
|
content: "{{ item.content }}"
|
||||||
@ -22,7 +7,20 @@
|
|||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
loop:
|
loop:
|
||||||
- content: "options bbswitch load_state=0"
|
- content: |
|
||||||
dest: "/etc/modprobe.d/bbswitch.conf"
|
blacklist nouveau
|
||||||
- content: "bbswitch"
|
options nouveau modeset=0
|
||||||
dest: "/etc/modules-load.d/bbswitch.conf"
|
dest: "/etc/modprobe.d/blacklist-nouveau.conf"
|
||||||
|
- content: |
|
||||||
|
# Remove NVIDIA USB xHCI Host Controller devices, if present
|
||||||
|
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c0330", ATTR{power/control}="auto", ATTR{remove}="1"
|
||||||
|
|
||||||
|
# Remove NVIDIA USB Type-C UCSI devices, if present
|
||||||
|
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c8000", ATTR{power/control}="auto", ATTR{remove}="1"
|
||||||
|
|
||||||
|
# Remove NVIDIA Audio devices, if present
|
||||||
|
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x040300", ATTR{power/control}="auto", ATTR{remove}="1"
|
||||||
|
|
||||||
|
# Remove NVIDIA VGA/3D controller devices
|
||||||
|
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x03[0-9]*", ATTR{power/control}="auto", ATTR{remove}="1"
|
||||||
|
dest: "/etc/udev/rules.d/00-remove-nvidia.rules"
|
||||||
|
Loading…
Reference in New Issue
Block a user