You are not logged in.

#1 2014-01-22 23:07:20

Slabity
Member
Registered: 2013-12-29
Posts: 40

[SLiM] Execute xrandr commands on startup

Okay, so here's the issue. I've got Nvidia optimus drivers to work. I can successfully get into my session with startx.

But to make it work, I need to put two xrandr commands in my .xinitrc file. Therefore, it doesn't do anything for my login manager.

How can I make this work with my login manager? This is my .xinitrc file:

#!/bin/bash

xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto

Without these lines, I just get a black screen. I can't find any solution yet.

Offline

#2 2014-01-22 23:35:27

GloW_on_dub
Member
Registered: 2013-03-13
Posts: 388

Re: [SLiM] Execute xrandr commands on startup

Can you post you're whole .xinitrc?

Last edited by GloW_on_dub (2014-01-22 23:38:42)

Offline

#3 2014-01-23 02:30:59

Slabity
Member
Registered: 2013-12-29
Posts: 40

Re: [SLiM] Execute xrandr commands on startup

GloW_on_dub wrote:

Can you post you're whole .xinitrc?

#!/bin/bash

xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto

exec awesome

That's my whole .xinitrc file.

I'm not trying to figure out how to run this when I log in. I'm trying to figure out how to run the xrandr commands when SLiM starts up X to display the log in manager.

Last edited by Slabity (2014-01-23 02:31:33)

Offline

#4 2014-01-23 03:53:07

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [SLiM] Execute xrandr commands on startup

It sounds like this needs to be set globally and is not something that is intended just for your user.  If that is the case, then you should set these things in either xorg.conf or a file in xorg.conf.d.  That way it will be applied to any X server that may start.

Offline

#5 2014-01-23 04:29:24

Slabity
Member
Registered: 2013-12-29
Posts: 40

Re: [SLiM] Execute xrandr commands on startup

WonderWoofy wrote:

It sounds like this needs to be set globally and is not something that is intended just for your user.  If that is the case, then you should set these things in either xorg.conf or a file in xorg.conf.d.  That way it will be applied to any X server that may start.

That is the case. But how can I tell xorg.conf to run generic xrandr commands?

Offline

#6 2014-01-23 04:44:54

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [SLiM] Execute xrandr commands on startup

You don't.  xrandr is just a front end to the randr functionality.  It is what is meant to be used from the command line by the user at run time.  You need to figure out how to properly configure what you want to do with the xorg configuration files.

Offline

#7 2014-01-24 13:25:36

Slabity
Member
Registered: 2013-12-29
Posts: 40

Re: [SLiM] Execute xrandr commands on startup

Well I can't seem to find a working solution.

Has anyone else gotten Optimus to work with SLiM? Or any other display manager?

Offline

#8 2014-01-27 15:31:16

mohlerm
Member
From: Switzerland
Registered: 2013-11-15
Posts: 13

Re: [SLiM] Execute xrandr commands on startup

Any news on this? Got the same problem on one of my machines.

Last edited by mohlerm (2014-01-27 15:31:36)

Offline

#9 2014-01-27 15:51:52

GloW_on_dub
Member
Registered: 2013-03-13
Posts: 388

Re: [SLiM] Execute xrandr commands on startup

Slim is suposed to execute .xinitrc at startup, so xrandr command should have been executed.

Offline

#10 2014-01-27 15:57:36

mohlerm
Member
From: Switzerland
Registered: 2013-11-15
Posts: 13

Re: [SLiM] Execute xrandr commands on startup

Everything works fine when starting the session with "startx".

The problem is that I can not get Slim to load, it always ends in a black screen.
This describes the same problem on different login managers: http://forums.gentoo.org/viewtopic-t-95 … rt-50.html

Offline

Board footer

Powered by FluxBB