LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 05-25-2020, 11:58 PM   #1
slac
Member
 
Registered: May 2019
Posts: 265

Rep: Reputation: Disabled
Question How to run xorg with different configuration files?


My computer has integrated graphics and a GPU. Using the integrated graphics since it just works out of the box. I had some problems configuring the GPU in the past but now, that is a job done.

The thing is that, I use PRIME to use the NVIDIA GPU, and I have to install the NVIDIA driver every time I upgrade the kernel (I do both of those actions, manually) and after installing the NVIDIA driver, I run the command:

Code:
nvidia-xconfig --prime
That command generates a file called: /etc/X11/xorg.conf

... And now, I only have to use some xrandr to set some configurations and that is it.

Let's say that I forgot to install the NVIDIA-driver after upgrading the kernel or I just want to use the integrated graphics for one xorg session so I can save battery; I can easily avoid using the xrandr configurations that I set when using the GPU (because they are in an script that startx/xinit runs) but I still need to delete the /etc/X11/xorg.conf in order to be able to use the integrated graphics. So, I wanted to know if there is a way to run xorg ignoring the xorg.conf file for one session? Or something like that.

P.S: I know of Bumblebee to switch graphics, but it does not work with my computer, I tried many times. Also, it is not important to me to switch graphics inside of the session.
 
Old 05-26-2020, 01:17 PM   #2
TheRealGrogan
Member
 
Registered: Oct 2010
Location: Ontario, Canada
Distribution: Slackware, LFS, Manjaro (for gaming)
Posts: 570

Rep: Reputation: 413Reputation: 413Reputation: 413Reputation: 413Reputation: 413
The startx command takes a -- -config parameter, with the location of the file relative to /etc/X11

So let's say I have /etc/X11/xorg2.conf

Code:
startx -- -config xorg2.conf
P.S. If what you're trying to do is have no config file, you can use a blank one. The things you put in an xorg.conf are just overrides now.

Last edited by TheRealGrogan; 05-26-2020 at 01:29 PM.
 
1 members found this post helpful.
Old 05-26-2020, 02:04 PM   #3
TheRealGrogan
Member
 
Registered: Oct 2010
Location: Ontario, Canada
Distribution: Slackware, LFS, Manjaro (for gaming)
Posts: 570

Rep: Reputation: 413Reputation: 413Reputation: 413Reputation: 413Reputation: 413
If you're using no config file for your onboard video session, probably a better thing to do would be to put your nvidia xorg.conf in a subdirectory (again, relative to /etc/X11) rather than have two. It may look in all locations for configuration. I say that because it still parses files in /etc/X11/xorg.conf.d so it stands to reason.

Code:
startx -- -config somedir/xorg.conf
Where somedir is /etc/X11/somedir
 
1 members found this post helpful.
Old 05-26-2020, 02:38 PM   #4
slac
Member
 
Registered: May 2019
Posts: 265

Original Poster
Rep: Reputation: Disabled
Yes, both of them work as I wanted. Thank you, very much.
 
  


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
Ubuntu 10.10 Grub 2 different profiles, different Xorg drivers xbaez Ubuntu 0 11-23-2010 07:48 AM
Dual Monitor Xorg Configuration with different resolutions terry84 Linux - Software 6 11-02-2010 12:39 AM
[SOLVED] How to make Xorg recognise different mice as different input devices automatically? 10110111 Linux - Software 2 11-28-2009 10:35 AM
Is there any way to configure different video cards to different settings in Xorg? 10110111 Linux - Hardware 1 11-01-2009 02:04 PM
xorg.conf to run X in two different Slack Kernels BobNutfield Slackware 15 05-15-2006 07:59 PM

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

All times are GMT -5. The time now is 05:54 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
Open Source Consulting | Domain Registration