7

I use my old computer as an NAS, so I remove the monitor after I installed linux on it (disconnect vga cable). I use ssh to control the machine and it works fine. Until some day, after kernel/softare upgrade or messing up some configs, I cannot connect to it through ssh, then I have to plug the monitor back, but the monitor says "No input signal". So I have to restart the computer WITH the monitor connected, and the monitor's back!

I think the computer/linux kernel doesn't detect the monitor plug-in event. So how can I start my linux box without a monitor, but when it goes wrong I can still plug my monitor (vga) back and use the console.

Edit: just one pci-e video card, has dvi, vga, tv/out (s-video)

Edit2: Xorg is not running. I just need the console (CTRL+ALT+F1). The problem is, if the machine booted without a monitor connected, it won't give me a pseudo terminal after I attach the vga cable while it's running. Clearly the monitor is not auto detected as usb device. I'm wondering how to let the monitor auto detected.

yaroot
  • 96

4 Answers4

1

adam3141's answer is great! I still don't have enough reputation to up-vote it but it's definitly the best answer for this problem I've been looking for days!

The solution works both if a monitor is connected or not, and in both cases you can remote connect with x11vnc. It also allows to connect a monitor AFTER the X server has been started if needed.

By default, with this configuration, the X server will use a 1024x768 resolution because it cannot read the supported resolutions from the monitor. To fix this you can change the configuration of the default monitor in /etc/X11/xorg.conf (create the file if it does not exist) and add the modelines to support the resolutions you want. For example:

Section "Monitor"
    Identifier "<default monitor>"
    Modeline "1680x1050" 146.25 1680 1784 1960 2240 1050 1053 1059 1089
EndSection

By the way, you can find more info on the "video" kernel parameter here: http://distro.ibiblio.org/fatdog/web/faqs/boot-options.html

Zlika
  • 11
1

This maybe years too late however I was coming across the same issue when I ran into this question but no suitable answer has been given, and I imagine other people having the same problem have came across this question as well.

My fix that seems to work brilliantly is to trick the kernel into thinking a VGA is already connected by adding a kernel parameter (this might be specified in the grub configuration file) which is

video=VGA-1:e

the video parameter could be specified more than once for the kernel so if you already have a video= parameter then just add a new video= parameter (unless of course the existing parameter you believe would conflict with the above fix)

0

Do you have an xorg.conf file, or do you let X auto-detect the configuration? Recent Linux distributions use a version of X that auto-detects your configuration so an xorg.conf file is not necessary. But if X is auto-detecting, it probably doesn't see a monitor so it can't start. Try creating an xorg.conf file manually, or use this to have Xorg generate one for you:

Xorg :1 -configure
cp /root/xorg.conf.new /etc/X11/xorg.conf

I haven't tried this without a monitor present so I'm not sure it will work. You might also need to restart X after plugging in the monitor, by pressing CTRL+ALT+Backspace on the keyboard.

juggler
  • 1,568
  • 8
  • 15
0

If you are talking about the X server running then this is normal behaviour.

X tries to load but since you do not have the screen connected it fails...usually there is a maximum number of tries for that from which on it fails and stops.

However, the system is left at with a blank screen. So when you connect you are probably getting at best case a blinking cursor.

The pseudo terminals should be visible though. Try CTRL+ALT+F2 , F3 ... should give something.

If this does not work then it seems that for some reason the pseudo-terminals have failed. I cannot know the reason for that. You should post more details, i.e. /var/log/messages.

Normally you should start your system at runlevel 3 .

g24l
  • 959