Add laptop configuration to disable discrete GPU
This commit is contained in:
parent
630f380b25
commit
c025749069
3 changed files with 26 additions and 0 deletions
|
|
@ -49,3 +49,21 @@
|
||||||
systemd:
|
systemd:
|
||||||
name: fstrim.timer
|
name: fstrim.timer
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|
||||||
|
- name: disable nvidia GPU
|
||||||
|
block:
|
||||||
|
- name: create udev rule
|
||||||
|
become: true
|
||||||
|
template:
|
||||||
|
src: 'templates/{{ platform }}/udev.j2'
|
||||||
|
dest: '/etc/udev/rules.d/00-remove-nvidia.rules'
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
- name: blacklist kernel module
|
||||||
|
become: true
|
||||||
|
template:
|
||||||
|
src: 'templates/{{ platform }}/nouveau-blacklist.j2'
|
||||||
|
dest: '/etc/modprobe.d/blacklist-nouveau.conf'
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
when: platform == "laptop"
|
||||||
|
|
|
||||||
4
templates/laptop/nouveau-blacklist.j2
Normal file
4
templates/laptop/nouveau-blacklist.j2
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
|
||||||
|
|
||||||
|
blacklist nouveau
|
||||||
|
options nouveau modeset=0
|
||||||
4
templates/laptop/udev.j2
Normal file
4
templates/laptop/udev.j2
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
|
||||||
|
|
||||||
|
# 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"
|
||||||
Loading…
Add table
Add a link
Reference in a new issue