Created
August 28, 2017 20:07
-
-
Save rogerzanoni/9db83aaba40e3c3c99fd4519d0db874e to your computer and use it in GitHub Desktop.
dedicated-nvidia-config
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/sh | |
# | |
# ~/.xinitrc | |
# | |
# Executed by startx (run your window manager from here) | |
if [ -d /etc/X11/xinit/xinitrc.d ]; then | |
for f in /etc/X11/xinit/xinitrc.d/*; do | |
[ -x "$f" ] && . "$f" | |
done | |
unset f | |
fi | |
xrandr --setprovideroutputsource modesetting NVIDIA-0 | |
xrandr --auto | |
exec i3 | |
eval `ssh-agent -s` | |
xmodmap ~/.Xmodmap | |
xrdb -load ~/.Xresources |
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
Section "ServerLayout" | |
Identifier "layout" | |
Screen 0 "nvidia" | |
Inactive "intel" | |
EndSection | |
Section "Device" | |
Identifier "nvidia" | |
Driver "nvidia" | |
BusID "PCI:2:0:0" | |
EndSection | |
Section "Screen" | |
Identifier "nvidia" | |
Device "nvidia" | |
Option "AllowEmptyInitialConfiguration" | |
EndSection | |
Section "Device" | |
Identifier "intel" | |
Driver "modesetting" | |
EndSection | |
Section "Screen" | |
Identifier "intel" | |
Device "intel" | |
EndSection |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment