Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Turn on a monitor when X starts and turn it off when X exits
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
fhaddad78
n00b
n00b


Joined: 21 May 2012
Posts: 68

PostPosted: Fri Aug 31, 2012 7:59 am    Post subject: Turn on a monitor when X starts and turn it off when X exits Reply with quote

I have an NVIDA GeForce GTX 560 Ti video card (running off the Nouveau driver) with two monitors connected to the DVI ports. When the computer boots up, I boot into a shell, and by default both monitors would turn on and show the same thing on each. So in my grub.conf file, I added the following code to the kernel line:

Code:
... video=DVI-I-1:1024x768@60 video=DVI-I-2:d drm_kms_helper.poll=0 ...


The above change resolved the issue of the right monitor turning on and mirroring the left monitor.

However, when I run X using startx, I was hoping the right monitor would turn on, but it does not. It stays off. At first I did not use any type of X configuration file as the installation how said not to. Then, in hopes of enabling the DVI-I-2 port on the video card, I tried to edit/create /usr/share/X11/xorg.conf.d/20monitors.conf. Under the section Monitor, I added:

Code:
Section "Monitor"
  Identifier      "DVI-I-2"
  Option          "Enable" "True"  <-- I tried combinations of this line
  Option          "Ignore" "False" <-- and this line based on xrandr howto sites.
EndSection


But the right monitor is not turning on.. Any ideas on what I need to do?

The goal is to have the right monitor turn on when I start X and turn off when I close it.

Thanks!
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1404
Location: Montréal

PostPosted: Fri Aug 31, 2012 2:53 pm    Post subject: Reply with quote

You have disabled the second monitor on the kernel side, so this device will not exist has framebuffer or for X until you remove the video kernel parameter who have disabled it.

If you want to only enable this monitor when X is in use, you can try the consoleblank kernel parameter and/or the setterm command.
_________________
Paul
Back to top
View user's profile Send private message
fhaddad78
n00b
n00b


Joined: 21 May 2012
Posts: 68

PostPosted: Fri Aug 31, 2012 4:05 pm    Post subject: Reply with quote

Thanks.. That thought actually entered my mind with the kernel command to disable the port. I wasn't aware of consoleblank and setterm. According to what I've read on consoleblank, it doesn't seem to have individual monitor settings at first glance. I'll search around some more. I'll also read up on setterm.
Back to top
View user's profile Send private message
fhaddad78
n00b
n00b


Joined: 21 May 2012
Posts: 68

PostPosted: Fri Aug 31, 2012 7:33 pm    Post subject: Reply with quote

Seems so difficult to do something which should be so trivial. (:

Anyway, I just enabled both monitors on the kernel line and went back to xorg.conf to set up the monitors. When I'm in the console though, both monitors are on and show the same thing. It's kind of annoying, but whatever. I'll just turn off the monitor. If anyone knows how I can have my second monitor turn off in console and turn on when I start X, that would be great.

Regards,
Freddie
Back to top
View user's profile Send private message
billium
Apprentice
Apprentice


Joined: 22 Mar 2003
Posts: 185

PostPosted: Sat Sep 01, 2012 11:03 am    Post subject: Reply with quote

Which framebuffer do you use in the kernel?

In my previous set up, I used vesa and it gives the effect you want. With the nVidia fb support I get both monitors showing the same thing.
My previous setup used the nvidia driver for X, and my new setup uses nouveau for X.
Back to top
View user's profile Send private message
fhaddad78
n00b
n00b


Joined: 21 May 2012
Posts: 68

PostPosted: Sat Sep 01, 2012 2:11 pm    Post subject: Reply with quote

@billiam I am using the nouveau driver exclusively.. All other frame buffers have been disabled as per the nouveau / X installation guides.
Back to top
View user's profile Send private message
chithanh
Developer
Developer


Joined: 05 Aug 2006
Posts: 2152
Location: Berlin, Germany

PostPosted: Sat Sep 01, 2012 4:32 pm    Post subject: Reply with quote

You could try a hackish solution: Set the video=... resolution/refresh outside the monitor sync range, so it will go into sleep when on console. In X you could then use working values so the monitor turns on again.

Be careful when doing this with VGA monitors though, some older hardware might sync frequencies that are not good for it.
Back to top
View user's profile Send private message
fhaddad78
n00b
n00b


Joined: 21 May 2012
Posts: 68

PostPosted: Sat Sep 01, 2012 6:53 pm    Post subject: Reply with quote

chithanh wrote:
You could try a hackish solution: Set the video=... resolution/refresh outside the monitor sync range, so it will go into sleep when on console. In X you could then use working values so the monitor turns on again.

Be careful when doing this with VGA monitors though, some older hardware might sync frequencies that are not good for it.


I thought you nailed it with this suggestion! So, at the Grub screen, I changed the second monitor's video= setting to 2560x1600@75 and it attempted to set the resolution instead of going to sleep. It looks like my two monitors, Dell 2007FP 21" (max res 1600x1200@60hz) will still operate with unsupported frequencies. :(

Thank you for the suggestion though.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum