LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   xrandr and xorg.conf (https://www.linuxquestions.org/questions/slackware-14/xrandr-and-xorg-conf-4175602020/)

travis82 03-17-2017 03:41 PM

xrandr and xorg.conf
 
After long time searching I ended up with xrandr to manage nvidia-optimus technology and to reduce my laptop temperature according to https://nouveau.freedesktop.org/wiki/Optimus/

however, Since there is no vgaswitcheroo folder in /sys/kernel/debug directory I can't power off nvidia GPU permanently. Hence, I'm going to use X configuration files to achieve a persistent configuration for that purpose. But, I am not sure about location, name and content of the file. Is it suffice to make a file with xrandr.conf name in /etc/X11/xorg.conf.d/ with this line?
Code:

xrandr --setprovideroffloadsink nouveau Intel
PS: based on aforementioned article, using xrandr is more suitable than bumblebee for those who want to use open source nouveau driver (kernel 3.13 and above). Perhaps it's time to modify slackdoc document about nvidia-optimus.

willysr 03-17-2017 04:56 PM

You can use bbswitch to switch off your NVidia GPU.

travis82 03-18-2017 12:32 AM

Quote:

Originally Posted by willysr (Post 5684902)
You can use bbswitch to switch off your NVidia GPU.

Sorry, my bad mistake. I don't want to turn of nvidia card. I want to use xrandr and DRI_PRIME to switch between GPUs instead using bumblebee and optirun. But, runing xrandr at every system reboot is tedious, so I have to create a .conf file for xorg so that it automatically offload Intel GPU. Where is the right place for such file? /etc/X11/xorg.conf.d/ or /usr/share/X11/xorg.conf.d/

willysr 03-18-2017 01:23 AM

you can place it on /etc/rc.d/rc.local

travis82 03-18-2017 12:13 PM

Quote:

Originally Posted by willysr (Post 5685027)
you can place it on /etc/rc.d/rc.local

xrandr is an X extension. It's not possible to start is before X.

travis82 03-18-2017 02:03 PM

Solved. I added it to ~/.xprofile and it's working.

bassmadrigal 03-18-2017 02:44 PM

Quote:

Originally Posted by travis82 (Post 5685022)
Where is the right place for such file? /etc/X11/xorg.conf.d/ or /usr/share/X11/xorg.conf.d/

Just as a general point of knowledge, if you see these two types of directories (not necessarily just X11, but matching directories in /etc/ and /usr/share/, /etc/ is typically for the user to override the distro-provided /usr/share/ conf files. Keep in mind, if you edit something in /usr/share/, if you upgrade or reinstall that package, it will replace that custom file without any hesitation or prompting.

TL;DNR

/usr/share/X11/xorg.conf.d/ - system defaults - user shouldn't normally edit
/etc/X11/xorg.conf.d/ - used by user to override system defaults


All times are GMT -5. The time now is 07:15 PM.