Last active
August 8, 2019 13:51
-
-
Save Broceliande/cdcf4182afdfb81fd4ba943f1b7e009d to your computer and use it in GitHub Desktop.
hybrid-nvidia-patch.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## implements poke-1,0 's patch for hybrid Intel/NVidia | |
## see poke topic about it @ https://batocera-linux.xorhub.com/forum/d/1851-batocera-linux-5-22-with-nvidia-legacy-drivers-390-xx/9 | |
# tested on batocera 5.22 5.23 Acer Aspire vx15 with Nvidia GTX 1050TI gpu OPENGL String: 4.6.0 NVIDIA 418.74/4.6.0 NVIDIA 430.40 | |
# tested on batocera 5.22 Acer NC-VN7-791G-70M4 (Acer V Nitro Series) OPENGL String: 4.6.0 NVIDIA 418.74 | |
echo "Stopping ES..." | |
/etc/init.d/S31emulationstation stop | |
echo "Making boot writable." | |
mount -o remount,rw /boot | |
echo "Activating Nvidia driver" | |
sed -i -e "s/#nvidia-driver=true/nvidia-driver=true/g" /boot/batocera-boot.conf | |
echo "Writing NVidia Xconf..." | |
echo "Section \"Module\" | |
Load \"modesetting\" | |
EndSection | |
Section \"Device\" | |
Identifier \"nvidia\" | |
Driver \"nvidia\" | |
BusID \"1:0:0\" | |
Option \"AllowEmptyInitialConfiguration\" | |
EndSection" > /etc/X11/xorg.conf.d/99-nvidia.conf | |
echo "Configuring xinit overlay..." | |
cp /etc/X11/xinit/xinitrc /userdata/system/.xinitrc | |
sed -i -e "s/## CUSTOMISATIONS ###/## CUSTOMISATIONS ###\n## FORCE NVIDIA - HYBRID PATCH ###\nxrandr --setprovideroutputsource modesetting NVIDIA-0\nxrandr --auto/g" /userdata/system/.xinitrc | |
echo "Saving FS Overlay..." | |
/recalbox/scripts/recalbox-save-overlay.sh | |
echo "Reboot now" | |
reboot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi gameski,
Thank you for your report.
Unfortunately this page was not up to date and stayed at a wip state...
I din't think the link would be published, my bad!
I just updated it.
The actual version works for both 5.22 / 5.23
That would be great if you can test it on your hw so that we can add your GT740m of Dell Vostro 5470 to the tested list
With enough feedback we may can add it in next batocera's version