LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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, 03:41 PM   #1
travis82
Member
 
Registered: Feb 2014
Distribution: Bedrock
Posts: 437

Rep: Reputation: 231Reputation: 231Reputation: 231
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, 04:56 PM   #2
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 4,661

Rep: Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784
You can use bbswitch to switch off your NVidia GPU.
 
Old 03-18-2017, 12:32 AM   #3
travis82
Member
 
Registered: Feb 2014
Distribution: Bedrock
Posts: 437

Original Poster
Rep: Reputation: 231Reputation: 231Reputation: 231
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, 01:23 AM   #4
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 4,661

Rep: Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784
you can place it on /etc/rc.d/rc.local
 
Old 03-18-2017, 12:13 PM   #5
travis82
Member
 
Registered: Feb 2014
Distribution: Bedrock
Posts: 437

Original Poster
Rep: Reputation: 231Reputation: 231Reputation: 231
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, 02:03 PM   #6
travis82
Member
 
Registered: Feb 2014
Distribution: Bedrock
Posts: 437

Original Poster
Rep: Reputation: 231Reputation: 231Reputation: 231
Solved. I added it to ~/.xprofile and it's working.
 
Old 03-18-2017, 02:44 PM   #7
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
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



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 10:35 PM
X starts without xorg.conf, however with aticonfig, resultant xorg.conf hangs linuxbird Linux - Desktop 3 08-23-2012 05:28 AM
[SOLVED] port xrandr configuration to /etc/X11/xorg.conf? gorgabal Linux - Newbie 2 02-15-2012 07:58 AM
xrandr options in xorg.conf Twilight in Zero Linux - Software 5 06-27-2010 10:20 AM
xrandr, xorg.conf icecubeflower Linux - Newbie 3 02-28-2009 07:00 PM

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

All times are GMT -5. The time now is 03:10 AM.

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
Open Source Consulting | Domain Registration