Completely silent (or custom) boot for Linux appliance - linux

I am working on an appliance that runs on Linux (Ubuntu 10.04 for now) and x86-64 Intel based PC. I need to completely customize the boot screens - no BIOS messages, and either (a) no screen output until X is launched or (b) custom screen output via VESA/VBE.
(b) looks hard to achieve because none of the framebuffer drivers (vesafb, uvesafb) seem to support addressing pixels on more than 2 monitors being driven by the same graphics card
So, I'm looking at (a) : no output on screen until X is launched. This should mean no Dell BIOS output, no Ubuntu splash screen, no console output.
Any ideas will be much appreciated.

I don't know much about the framebuffer stuff, but I can tell you for sure that you'll have no control over the BIOS output from Linux.
In the boot process, BIOS comes first, then the boot loader, then Linux. So when Linux appears, the BIOS stuff is done for long.

Related

Virtual Monitor on Arch Linux and NVIDIA Proprietary Driver?

I want to add multiple Virtual Displays to my Linux PC, for VNC Purposes. I have an NVIDIA GeForce GTX 750 Ti and an Ryzen 3 1200 with no On-Board Graphics.
I have already tried:
The Option "ConnectedMonitor" in /etc/X11/xorg.conf (Works, but only allows for one output at the moment, because xrandr only shows 5 outputs. When I try and add the fifth output tho, nvidia-settings throws me some kind of error, that i can only use 4 Monitors, and other programs just straight up crash when they try to change the X Screen Config...)
The EVDI Driver (After the Modprobe the X Screen crashes as expected, but xrandr --listproviders doesn't show the driver and xrandr --setprovideroutputsource doesn't work either...)
Wayland (I am an KDE Plasma user and Wayland support of KDE is Trash with the proprietary NVIDIA Driver)
Adding the Dummy Driver (Doesn't work because of NVIDIA's Proprietary trash Xinerama [I also have multiple Physical Displays])
Is it maybe possible to somehow use the nouveau driver at the same time? Or am i just adding the Dummy Driver wrong? Is it possible to get the EVDI Driver working?
I really hope someone helps me very soon...

Raspberry pi 4 - with custom GUI interface and fast boot speed

I'm trying to achieve this on a Raspberry Pi 4:
Less then 10 seconds boot time
Custom UI ( build with python/Gtk for example )
I already tried editing the /boot/config.txt with
# Disable the rainbow splash screen
disable_splash=1
# Disable bluetooth
dtoverlay=pi3-disable-bt
#Disable Wifi
dtoverlay=pi3-disable-wifi
dtoverlay=sdtweak,overclock_50=100
# Set the bootloader delay to 0 seconds. The default is 1s if not specified.
boot_delay=0
# Overclock the raspberry pi. This voids its warranty. Make sure you have a good power supply.
force_turbo=1
Also I have an A2 class 10 SdCard and I have disabled almost every service that I don't need.
My best results are 14 seconds boot time until my app started, but I need to make it faster....
I would like to achieve something like this in terms of speed, but using GTK, not QT:
https://www.youtube.com/watch?v=TTcP3xeLrEY
I am also currently trying to reach fast boot time with my Raspberry Pi 4, but I cannot breach the wall of 10s without radical solutions such as buildroot or unikernel.
What do you need on your system ? On Raspbian you can use those two commands to verify what is slowing down the boot process :
systemd-analyze critical-chain
and
systemd-analyze blame
Critical chain will show in red the services blocking the boot.
On my setup I could desactivate all those services :
hciuart #GPIOs
nmbd
smbd
wpa_supplicant
systemd-timesyncd
rpi-eeprom-update.service
raspi-config.service
networking
Just use sudo systemctl disable SERVICE , I guess there are others that are not critical for your application.
Also, in the cmdline.txt file in /boot you can add quiet fastboot , it will decrease boot time further
GTK is a toolkit coded in C and callable from C code.
In practice, Python can be 10x slower than equivalent C code.
Did you consider starting Xorg with a minimal window manager and a single client coded in C? Without a single line of Python? Of course, read more about X windows systems protocols and architecture then about EWMH.
So, remove the Python interpreter on your RaspBerryPi (probably /usr/bin/python) and replace every old Python script by an equivalent ELF executable coded in C or in C++ and compiled with optimizations (so gcc -O3 with GCC). See also linuxfromscratch.org for inspiration and guidance.
I would like to achieve something like this in terms of speed, but using GTK
Of course, you want to use a GCC cross-compiler.
If that still does not work (after weeks of effort), replace your hardware by something more powerful.
It would be easier for you to install a Linux distribution such as Debian on your development laptop or desktop. Because most of what you would learn on your development computer (e.g. Advanced Linux Programming) can be applied to the RaspBerrry Pi. And cross-building on a Debian laptop for a Raspbian RaspBerryPi is really easy. Focus on learning low-level things starting from their C code. E.g. code your GUI directly with Xlib (no GTK, no Qt) in C. The same C code is very likely to be easily portable -if you write it carefully- from x86/Debian to your Raspberry Pi.
You could read the From powerup to to bash prompt howto; most of that document is relevant for a RaspBerryPi running RaspBian.
You could even avoid starting any Xorg or other display server (e.g. WayLand) on your RaspBerryPi. That certainly would make it boot faster.
You could replace your /sbin/init program by your own one coded in C entirely. That process starts within less than a second, and forks all other processes. Your custom GUI could be just Xorg with your single X11 client coded in C.
Observe that you could have the source code (millions of source lines) of all the code running on RaspBian. Then download it, study it, and optimize it. Of course this could take decades.
First, this is a poorly formed question. You've provided no details on what your boot process is or what OS/configuration you're running with for people to help.
Regardless, you appear primarily focused on a short boot time. So since your question is generic... here is a generic answer: there is nothing magical about the boot process. There is no config file with a fast_boot=1 option that gets you up in 0 seconds instead of 15. You want to boot faster? Do less.
Throw out slow crap like Python
Remove unnecessary application loading from your init system (sysvinit/systemd/whatever)
Remove unnecessary driver loading from the kernel startup. Start by trimming down your device tree to only the hardware you really need to initialize.
Optimize your bootloader (u-boot?) to only initialize the hardware you really need (obviously turn off any prompt and timer it may implement)
That's how you boot faster.

Multiple screen view on laptop display

First I dont know wheather this is right place to ask such question.
My laptop displays multiple screen on booting. I googled about this but I am unable to find the solution. came across this type of dysfunction on many laptops screen.
I cant figure out whether it is a screen problem/ hardware problem/ graphic card problem or its a bios problem.
I would really appreciate if anyone can direct me towards correct solution.
Following steps will help zero down
Enter Safe mode ( F8 in most ) and then see if its there. If it's gone then there's a problem likely with the graphics driver
Try to download the latest Chipset drivers from Intel or AMD Site depending on your Graphics card. Intel has a chipset detect utility that will pull up the latest drivers for all intel h/w on the pc
If you see this just on the desktop ( and not other apps like browser ) - it because the desktop background image is tiled vs Centered / stretched. In that case change it to centered.
Uninstall graphics driver and see if the multiple images disappear. You will not see high res image without driver but it will rule out card failure vs improper driver

Put graphics on the screen without /dev/fb0

I am trying to draw things on the screen without an X11 server. (I want my program to be in initrd, so I don't want to bloat it with X11.)
It's easy when I have /dev/fb0, but when I use Xen, I don't have it (also I am not sure how that works - the passing of vesafb to the kernel by grub and such).
I've tried SDL but it won't work without /dev/fb0 or X11. How does X11 work without /dev/fb0? It seems like no matter what I do X11 will always work... yet all libraries (like directfb, SDL, etc.) will fail.
the /dev/fb0 handeling with kernel. you must enable:
CONFIG_FRAMEBUFFER_CONSOLE if you want to enable 'df' for console
CONFIG_DRM and VGA card driver in this.
FB and your VGA card driver in this.

Is kernel or userspace responsible for rotating framebuffer to match screen

I'm working on embedded device with screen rotated 90 degrees clockwise: screen controller reports 800x600 screen, while device's screen is 600x800 portrait.
What do you think, whose responsibility it is to compensate for this: should kernel rotate framebuffer to provide 800x600 screen as expected by upper-level software or applications (X server, bootsplash) should adapt and draw to rotated screen?
Every part of stack is free software, so there are no non-technical problems for modification, the question is more about logical soundness.
It makes most sense for the screen driver to do it - the kernel after all is supposed to provide an abstraction of the device for the userspace applications to work with. If the screen is a 600x800 portrait oriented device, then that's what applications should see from the kernel.
yes,I agree, The display driver should update the display accordingly and keep the control
Not sure exactly how standard your embedded device is, if it is running a regular linux kernel, you might check in the kernel configurator (make xconfig, when compiling a new kernel) , one of the options for kernel 2.6.37.6 in the device, video card section, is to enable rotation of the kernel messages display so it scrolls 90 degrees left or right while booting up.
I think it also makes your consoles be rotated correctly after login too.
This was not available in kernels even 6-8 months ago, at least not available in kernel that slackware64 13.37 came with about that time.
Note that the bios messages are still rotated on a PC motherboard,
but that is hard-coded in the bios, which may not apply to the embedded system you are working with.
If this kernel feature is not useful to you for whatever reason, how they did it in the linux kernel might be good example of where and how to go about it. Once you get the exact name of the option from "make xconfig", it should be pretty easy to search where ever they log the kernel traffic for that name and dig up some info about it.
Hmmm. I just recompiled my kernel today, and I may have been wrong about how new this option is. Looks like it was available with some kernel versions before the included-with-Slackware64 versions that I referenced. Sorry!

Resources