Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Live USB enhancement: Indicate start up progress, otherwise user confused that system hung #268

Closed
rsriniva opened this issue Aug 11, 2021 · 32 comments

Comments

@rsriniva
Copy link

Is your feature request related to a problem? Please describe.
Booted the 0.5 Live USB on an old Thinkpad X230. On first attempt, system seemed to hang at the FreeBSD logo. Checked documentation and did the unset boot flag to turn on verbose logging and found out that the delay was due to the compressed filesystem being copied to memory. Without some sort of indication about what is happenning, user gets confused and assumes system hung.

USB ultimately booted to desktop after a few mins.

Describe the solution you'd like
Add some sort of minimal logging messages to show progress. Tell them briefly what is happenning with a Please wait message. Newcomers may not know about reading the docs and turning on verbose flags. Make it easy for newcomers to test the Live USB.

Describe alternatives you've considered
Add some text or a keyboard shortcut if user wants to see verbose logging during boot up

Additional context
This is an old Thinkpad X230 with coreboot/SeaBIOS, 16G RAM, 1 TB SSD, Gig ethernet and Atheros AR9462 Wi-Fi. Hardware - HW detection was flawless - detected everything and everything in the Live Session worked as indicated.

Brilliant job @probonopd and team! I am very excited by this system. I am next going to natively install the system and do more testing as a daily driver.

@probonopd
Copy link
Member

probonopd commented Aug 11, 2021

Hello @rsriniva.
We hope to speed up the Live ISO boot process as outlined in #4.
(The installed system boots much faster.)

Agree it would be nice to have a progress animation (also known as a "spinner").
Unfortunately I am not aware that this is currently possible in FreeBSD. Probably someone would need to code one.

spinner

We do not want any text in the boot process. Non-technical users tend to find boot messages confusing.

@probonopd
Copy link
Member

Ideally, we could combine #226 with a spinner.

@kettle-7
Copy link
Contributor

I'm working on a PyQt-based Plymouth alternative for FreeBSD

@probonopd
Copy link
Member

Well... isn't PyQt available only once Xorg is up and running, which is way too late?

@TargetGalaxy
Copy link
Contributor

PyQt does rely on Xorg. Plymouth relies on linux libraries too (and systemd). I am currently in the process of making my FreeBSD look good and it does not seem possible at the moment sadly

@kettle-7
Copy link
Contributor

PyQt doesn't rely on X specifically. It just relies on a QPA platform plugin. There's one called bsdfb that can bypass X and write straight to the framebuffer.

@TargetGalaxy
Copy link
Contributor

I'm pretty sure stuff in /etc/rc.conf like mouse_enable="YES" doesn't start during the boot process which would mean your plymouth like thing wouldn't work.

@kettle-7
Copy link
Contributor

It does work.

@kettle-7
Copy link
Contributor

I got it running in boot, and showing an animated splash screen. I just have to refine the animations a little.

@grahamperrin
Copy link
Contributor

Non-technical users tend to find boot messages confusing.

It's debatably more confusing to be given absolutely nothing (blackness without explanation) for an extended period.

From #43 (comment):

… silence as a default can make it more difficult to get feedback from testers …

I suggest showing startup progress. You can improve upon it in due course, but blackness and silence are not good – show something, anything.

Related: #187

@probonopd
Copy link
Member

@linuxkettle this is exciting, please let me know how to test it

@kettle-7
Copy link
Contributor

Well you'll be delighted to here I forgot where I put it, but I should find it easy enough.

@kettle-7
Copy link
Contributor

I know not how well it'll work without the display manager which is also in progress...

Maybe we might get a new login screen.

@probonopd
Copy link
Member

I know not how well it'll work without the display manager which is also in progress...

Display manager? The boot splash should appear way before the display manager. When Xorg is started, the boot splash should go away.

@kettle-7
Copy link
Contributor

Exactly, and the display manager I'm using (and making) uses no X server.

@kettle-7
Copy link
Contributor

So it might not go away

@probonopd
Copy link
Member

Can you please upload your solution so that we can try it out?

@kettle-7
Copy link
Contributor

kettle-7 commented Sep 1, 2021

Okay! I just have to find it... I should be able to do so today.

@probonopd
Copy link
Member

probonopd commented Sep 4, 2021

FreeBSD% find /usr/local/lib/qt5 | grep qbsdfb
/usr/local/lib/qt5/plugins/platforms/libqbsdfb.so

We do have libqbsdfb, but how do we make a Qt application use it?

Can it be specified by exporting env QT_QPA_PLATFORM bsdfb or by using the -platform bsdfb command-line argument and where is this documented?

Apparently yes, running any Qt application with -platform bsdfb from the command line should make it use the framebuffer.
But this is what happens on my system: bsdfb: Failed to initialize screen.

Error reading framebuffer information (Inappropriate ioctl for device)
bsdfb: Failed to initialize screen
no screens available, assuming 24-bit color
Cannot create window: no screens available

When changing /boot/loader.conf to contain kern.vty=sc then I get a diferent error message:

kf.windowsystem: Could not find any platform plugin
QPainter::begin: Paint device returned engine == 0, type: 3

@kettle-7
Copy link
Contributor

kettle-7 commented Sep 6, 2021

Error reading framebuffer information (Inappropriate ioctl for device)
bsdfb: Failed to initialize screen
no screens available, assuming 24-bit color
Cannot create window: no screens available

I originally got this error too. You need to run it like this:

some_program -platform bsdfb &> /dev/console < /dev/console

@probonopd
Copy link
Member

probonopd commented Sep 6, 2021

Getting "Invalid null command" when trying to run this from csh, and getting "/dev/console: Device not configured" when trying to run this from bash.

This is on a machine with a Nvidia GPU.

@kettle-7
Copy link
Contributor

kettle-7 commented Sep 6, 2021

Weird...

I'll take a look at it this afternoon.

@kettle-7
Copy link
Contributor

kettle-7 commented Sep 6, 2021

Wait...
Are you using FreeBSD 12.x, maybe its because of that...

@kettle-7
Copy link
Contributor

kettle-7 commented Sep 7, 2021

Okay, I got it running again, but sadly only from the command-line. I put the script in /usr/local/bin/splash and can run it with /usr/local/bin/splash -platform bsdfb from the shell. So, the logical next step was to make an rc.d file. Which I did. And it runs the exact same command, giving the error you saw above...

@kettle-7
Copy link
Contributor

kettle-7 commented Sep 7, 2021

Okay, it works without the ampersand at the end but then it doesn't run in the background, so you have to push Ctrl+C to resume the boot process...

@kettle-7

This comment has been minimized.

@kettle-7
Copy link
Contributor

kettle-7 commented Sep 7, 2021

Argh, where's systemd when ya need it?

@grahamperrin

This comment has been minimized.

@probonopd

This comment has been minimized.

@grahamperrin

This comment has been minimized.

@probonopd

This comment has been minimized.

@probonopd
Copy link
Member

probonopd commented Nov 16, 2021

Maybe fbv could be used, it supports animated gif.

If we can get it to build:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=200901

Related:
https://forums.raspberrypi.com/viewtopic.php?t=251746&start=50

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants