How do I get Mint to start whether a monitor is attached or not — with no use of the keyboard?

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
jcollum
Level 1
Level 1
Posts: 29
Joined: Mon Jul 16, 2018 11:25 pm

How do I get Mint to start whether a monitor is attached or not — with no use of the keyboard?

Post by jcollum »

https://unix.stackexchange.com/question ... 418_456375


I have a media PC (Kodi) attached to a TV. Sometimes I need to reboot it to deal with a process that has died or a power outage etc. But when I reboot it with the TV off it won't boot. This is very annoying.

I want the machine to boot up whether a monitor is attached or not. There are processes that need to start up whether the TV is there or not. Is this possible?

Since this is a media player it doesn't have a keyboard so running console commands to get the GUI up and running is obnoxious. It's set up to boot into Kodi (a media player). It's running Mint.

Tried this fix:

Code: Select all

$ cat /boot/config.txt
hdmi_force_hotplug=1
But it didn't work.

I see this in the boot config:

Code: Select all

 
 $ cat /boot/config-4.4.0-21-generic | grep HDMI
CONFIG_HDMI=y
Will setting that to 'n' work or will it hose my boot?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
jcollum
Level 1
Level 1
Posts: 29
Joined: Mon Jul 16, 2018 11:25 pm

Re: How do I get Mint to start whether a monitor is attached or not — with no use of the keyboard?

Post by jcollum »

Bump... still haven't solved this
User avatar
lsemmens
Level 11
Level 11
Posts: 3951
Joined: Wed Sep 10, 2014 9:07 pm
Location: Rural South Australia

Re: How do I get Mint to start whether a monitor is attached or not — with no use of the keyboard?

Post by lsemmens »

I am unsure of how you have a problem, I've been running mint 18.5 and now mint 19 on my wife's video machine for months. I've just set it to auto logon. It is only connected to her TV and a mouse. If power goes off the machine is often re-started without the TV being on with no issues. Far less often than ever happened in Windows.
Fully mint Household
Out of my mind - please leave a message
gm10

Re: How do I get Mint to start whether a monitor is attached or not — with no use of the keyboard?

Post by gm10 »

Yeah, same, never had a problem booting up Linux without a screen attached. Servers do it all the time. Maybe it's some weird setting in your UEFI/BIOS?

The other possibility is that we have a different definition of what "booting" actually means. It's conceivable that your media player won't start without an output, but that's about the player then, not Mint.
jcollum
Level 1
Level 1
Posts: 29
Joined: Mon Jul 16, 2018 11:25 pm

Re: How do I get Mint to start whether a monitor is attached or not — with no use of the keyboard?

Post by jcollum »

No if it reboots when the TV is off it won't boot at all. When I turn the screen on I see a white cursor and nothing else.

I've seen posts on ubuntu forums about ubuntu not starting if no monitor is attached. https://ubuntuforums.org/showthread.php?t=2331323 -- but that would require me to start the GUI with a keyboard, which defeats the purpose.

I'll look around in the BIOS. it's an MSI Cubi if you are curious.
gm10

Re: How do I get Mint to start whether a monitor is attached or not — with no use of the keyboard?

Post by gm10 »

jcollum wrote: Fri Jul 27, 2018 10:34 pm No if it reboots when the TV is off it won't boot at all. When I turn the screen on I see a white cursor and nothing else.
Something needs to provide that cursor though, so unless your TV shows a cursor by default that means your Mint did boot, no? Press Ctrl+Alt+F1 to confirm.
jcollum
Level 1
Level 1
Posts: 29
Joined: Mon Jul 16, 2018 11:25 pm

Re: How do I get Mint to start whether a monitor is attached or not — with no use of the keyboard?

Post by jcollum »

Steps:

1. turn off receiver (PC -> Recv -> TV, both connections HDMI)
1. turn off PC
1. wait
1. turn on PC
1. wait
1. turn on receiver

Result: white block cursor on TV (https://i.imgur.com/U9uSEyC.jpg). Ctrl Alt F1 does nothing. Only way to get PC to respond is to turn it off. USB keyboard has power (num lock light)

There are no settings in the BIOS related to monitor being attached on power up. BIOS is Aptio 2.17.1246.

It sure looks like something is saying "don't boot if there's no display attached and -- based on the thread link above -- it seems like it's linux.

Also no one has addressed my question about `CONFIG_HDMI=y` up above.
gm10

Re: How do I get Mint to start whether a monitor is attached or not — with no use of the keyboard?

Post by gm10 »

jcollum wrote: Sat Jul 28, 2018 4:16 pm Also no one has addressed my question about `CONFIG_HDMI=y` up above.
Because that's not a boot parameter, that file just tells you the flags that were used in compiling the kernel. You can re-compile your kernel without HDMI support if you don't need it, but I don't what that has got to do with anything?

Seeing that cursor am wondering if you configured a specific video output in the GRUB configuration - which, when missing, might prevent a successful boot (I never tried).
jcollum
Level 1
Level 1
Posts: 29
Joined: Mon Jul 16, 2018 11:25 pm

Re: How do I get Mint to start whether a monitor is attached or not — with no use of the keyboard?

Post by jcollum »

> Seeing that cursor am wondering if you configured a specific video output in the GRUB configuration

Well if that's something I'd have to do after install the answer is no. It's a very vanilla Mint install.
gm10

Re: How do I get Mint to start whether a monitor is attached or not — with no use of the keyboard?

Post by gm10 »

jcollum wrote: Sat Jul 28, 2018 8:56 pm > Seeing that cursor am wondering if you configured a specific video output in the GRUB configuration

Well if that's something I'd have to do after install the answer is no. It's a very vanilla Mint install.
Ok, wasn't that then, but I still think it's grub related. Try this:

Code: Select all

sudo sed -i s/quiet splash/nomodeset/ /etc/default/grub
sudo sed -i /console/s/#// /etc/default/grub
sudo update-grub
User avatar
lsemmens
Level 11
Level 11
Posts: 3951
Joined: Wed Sep 10, 2014 9:07 pm
Location: Rural South Australia

Re: How do I get Mint to start whether a monitor is attached or not — with no use of the keyboard?

Post by lsemmens »

That picture looks like you are only half way through the boot process where just the "progress bar" is showing. How long after you boot is this occurring? It might be worth looking at the boot logs to tell us how far through the process you get before it hangs.
Fully mint Household
Out of my mind - please leave a message
jcollum
Level 1
Level 1
Posts: 29
Joined: Mon Jul 16, 2018 11:25 pm

Re: How do I get Mint to start whether a monitor is attached or not — with no use of the keyboard?

Post by jcollum »

@gm10:

Code: Select all

media@mediaCube ~ $ sudo sed -i s/quiet splash/nomodeset/ /etc/default/grub
sed: -e expression #1, char 7: unterminated `s' command
media@mediaCube ~ $ sudo sed -i /console/s/#// /etc/default/grub
media@mediaCube ~ $ sudo update-grub
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.4.0-21-generic
Found initrd image: /boot/initrd.img-4.4.0-21-generic
Adding boot menu entry for EFI firmware configuration
done
media@mediaCube ~ $ 
Concerned about this:

Code: Select all

unterminated `s' command
I tried this and the result was: no change, same white cursor.
jcollum
Level 1
Level 1
Posts: 29
Joined: Mon Jul 16, 2018 11:25 pm

Re: How do I get Mint to start whether a monitor is attached or not — with no use of the keyboard?

Post by jcollum »

@lsemmens

The machine is not available for ssh when the boot fails and the boot logs appear to be cleaned up next time it boots, so I don't know how I can get this information.

This is what I have (trimmed for space):

Code: Select all

$ cat /var/log/boot.log |more 
Scanning for Btrfs filesystems
/dev/sda2: clean, 329461/3115056 files, 5177129/12455936 blocks
         Stopping LSB: Start NTP daemon...
[  OK  ] Stopped LSB: Start NTP daemon.
[  OK  ] Stopped LSB: Start NTP daemon.
         Starting LSB: Start NTP daemon...
[  OK  ] Started LSB: Start NTP daemon.
[  OK  ] Started Network Manager Wait Online.
[  OK  ] Reached target Network is Online.
...
[  OK  ] Started LSB: VirtualBox Linux Additions.
[  OK  ] Started LSB: daemon to balance interrupts for SMP systems.
[  OK  ] Started LSB: Speech Dispatcher.
[  OK  ] Started LSB: Load kernel modules needed to enable cpufreq scaling.
[  OK  ] Started LSB: Start xrdp and sesman daemons.
[  OK  ] Started LSB: Set the CPU Frequency Scaling governor to "ondemand".
         Starting LSB: set CPUFreq kernel parameters...
         Starting Hold until boot process finishes up...
         Starting Terminate Plymouth Boot Screen...
         
gm10

Re: How do I get Mint to start whether a monitor is attached or not — with no use of the keyboard?

Post by gm10 »

jcollum wrote: Sun Jul 29, 2018 2:46 pm [ OK ] Started LSB: VirtualBox Linux Additions.
From what I understood you are not running in a virtual machine, so please remove these, those can definitely cause display issues. Run:

Code: Select all

sudo apt-get remove --purge virtualbox-guest*
jcollum wrote: Sun Jul 29, 2018 2:39 pm Concerned about this:

Code: Select all

unterminated `s' command
And you should be. I forgot a backslash, sorry:

Code: Select all

sudo sed -i s/quiet\ splash/nomodeset/ /etc/default/grub
sudo update-grub
Try a reboot again after that.
jcollum
Level 1
Level 1
Posts: 29
Joined: Mon Jul 16, 2018 11:25 pm

Re: How do I get Mint to start whether a monitor is attached or not — with no use of the keyboard?

Post by jcollum »

Code: Select all

media@mediaCube ~ $ sudo sed -i s/quiet\ splash/nomodeset/ /etc/default/grub
media@mediaCube ~ $ sudo update-grub
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.4.0-21-generic
Found initrd image: /boot/initrd.img-4.4.0-21-generic
Adding boot menu entry for EFI firmware configuration
done
Same result. White block cursor. Thanks for all the effort you are putting in here.
jcollum
Level 1
Level 1
Posts: 29
Joined: Mon Jul 16, 2018 11:25 pm

Re: How do I get Mint to start whether a monitor is attached or not — with no use of the keyboard?

Post by jcollum »

Even worse than that, now it says

Code: Select all

Invalid video mode specification `text'.
Booting in blind mode
And won't output to the TV at all. I can ssh in though.
gm10

Re: How do I get Mint to start whether a monitor is attached or not — with no use of the keyboard?

Post by gm10 »

jcollum wrote: Sun Jul 29, 2018 10:20 pm Even worse than that, now it says

Code: Select all

Invalid video mode specification `text'.
Booting in blind mode
Are you running an old grub version? This is was a bug that was supposed to have been fixed in 2.02-2ubuntu7. apt list grub2 to check your version.
jcollum wrote: Sun Jul 29, 2018 10:20 pm And won't output to the TV at all. I can ssh in though.
But does it boot in successfully without the TV attached now though? Whether it outputs to it or not. Finding that out was the main point of the exercise.

You can revert the changes we made like this:

Code: Select all

sudo sed -i s/nomodeset/quiet\ splash/ /etc/default/grub
sudo sed  /console/s/^/#/ /etc/default/grub
sudo update-grub
jcollum
Level 1
Level 1
Posts: 29
Joined: Mon Jul 16, 2018 11:25 pm

Re: How do I get Mint to start whether a monitor is attached or not — with no use of the keyboard?

Post by jcollum »

Code: Select all

$ apt list grub2
Listing... Done
grub2/xenial-updates 2.02~beta2-36ubuntu3.18 amd64
Right, it does boot.

I powered it down then booted it up with the monitor on. No changes to config. It booted to the GUI but for some reason Kodi doesn't have focus so it's not very useful as a media player. Kodi is running. I can alt tab to it but that means getting out the keyboard.

I'll revert the grub changes.
gm10

Re: How do I get Mint to start whether a monitor is attached or not — with no use of the keyboard?

Post by gm10 »

So much for LTS support, I hadn't realized xenial/Mint 18 wasn't getting the same bug fixes to grub as bionic.

Anyway, we've identified the problem to be with the kernel mode video driver that's causing this issue, maybe that helps you come up with a solution. Try a newer kernel, for example, or maybe the driver you are using has some boot options that can be set in this situation.in

You could also try a Mint 19 liveUSB where at least that GRUB2 text mode bug has been fixed and maybe something else that's contributing to the problem here.
jcollum
Level 1
Level 1
Posts: 29
Joined: Mon Jul 16, 2018 11:25 pm

Re: How do I get Mint to start whether a monitor is attached or not — with no use of the keyboard?

Post by jcollum »

OK cool. Maybe I'll upgrade. Thanks a ton for the help.
Locked

Return to “Installation & Boot”