LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-17-2017, 04:41 PM   #1
travis82
Member
 
Registered: Feb 2014
Distribution: Slackware
Posts: 393

Rep: Reputation: 171Reputation: 171
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.
 
Old 03-17-2017, 05:56 PM   #2
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 3,672

Rep: Reputation: 977Reputation: 977Reputation: 977Reputation: 977Reputation: 977Reputation: 977Reputation: 977Reputation: 977
You can use bbswitch to switch off your NVidia GPU.
 
Old 03-18-2017, 01:32 AM   #3
travis82
Member
 
Registered: Feb 2014
Distribution: Slackware
Posts: 393

Original Poster
Rep: Reputation: 171Reputation: 171
Quote:
Originally Posted by willysr View Post
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/
 
Old 03-18-2017, 02:23 AM   #4
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 3,672

Rep: Reputation: 977Reputation: 977Reputation: 977Reputation: 977Reputation: 977Reputation: 977Reputation: 977Reputation: 977
you can place it on /etc/rc.d/rc.local
 
Old 03-18-2017, 01:13 PM   #5
travis82
Member
 
Registered: Feb 2014
Distribution: Slackware
Posts: 393

Original Poster
Rep: Reputation: 171Reputation: 171
Quote:
Originally Posted by willysr View Post
you can place it on /etc/rc.d/rc.local
xrandr is an X extension. It's not possible to start is before X.
 
Old 03-18-2017, 03:03 PM   #6
travis82
Member
 
Registered: Feb 2014
Distribution: Slackware
Posts: 393

Original Poster
Rep: Reputation: 171Reputation: 171
Solved. I added it to ~/.xprofile and it's working.
 
Old 03-18-2017, 03:44 PM   #7
bassmadrigal
Senior Member
 
Registered: Nov 2003
Location: Newport News, VA
Distribution: Slackware
Posts: 4,403

Rep: Reputation: 2348Reputation: 2348Reputation: 2348Reputation: 2348Reputation: 2348Reputation: 2348Reputation: 2348Reputation: 2348Reputation: 2348Reputation: 2348Reputation: 2348
Quote:
Originally Posted by travis82 View Post
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
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Xorg.conf vs. xrandr treemouse Debian 1 01-15-2017 11:35 PM
X starts without xorg.conf, however with aticonfig, resultant xorg.conf hangs linuxbird Linux - Desktop 3 08-23-2012 06:28 AM
[SOLVED] port xrandr configuration to /etc/X11/xorg.conf? gorgabal Linux - Newbie 2 02-15-2012 08:58 AM
xrandr options in xorg.conf Twilight in Zero Linux - Software 5 06-27-2010 11:20 AM
xrandr, xorg.conf icecubeflower Linux - Newbie 3 02-28-2009 08:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration