Skip to content

Commit

Permalink
fix: nvidia fixes (#292)
Browse files Browse the repository at this point in the history
* fix: chromium browser use of hw accel on hybrid laptops

Fixes: #285

* fix: use default nvidia driver power management

This fixes power management on optimus laptops, specifically for Ampere+
where the specified config was preventing D3cold state.

Upstream negativo17 should be notified of this change, too.

Fix: #290
  • Loading branch information
bsherman authored Oct 29, 2024
1 parent f12e5ed commit 3a56e7a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions nvidia-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,13 @@ semodule --verbose --install /usr/share/selinux/packages/nvidia-container.pp
# Universal Blue specific Initramfs fixes
echo "options nvidia NVreg_TemporaryFilePath=/var/tmp" >> /usr/lib/modprobe.d/nvidia-atomic.conf
cp /etc/modprobe.d/nvidia-modeset.conf /usr/lib/modprobe.d/nvidia-modeset.conf
# we must force driver load to fix black screen on boot for nvidia desktops
sed -i 's@omit_drivers@force_drivers@g' /usr/lib/dracut/dracut.conf.d/99-nvidia.conf
# as we need forced load, also mustpre-load intel/amd iGPU else chromium web browsers fail to use hardware acceleration
sed -i 's@ nvidia @ i915 amdgpu nvidia @g' /usr/lib/dracut/dracut.conf.d/99-nvidia.conf

# delete forced power managemant to instead allow driver default (fixes ampere+ optimus D3cold state)
sed '/^.*NVreg_DynamicPowerManagement.*/d' /usr/lib/modprobe.d/nvidia.conf

if [[ "${IMAGE_NAME}" == "sericea" ]]; then
mv /etc/sway/environment{,.orig}
Expand Down

0 comments on commit 3a56e7a

Please sign in to comment.