Underfull \vbox (badness 10000) warnings in Book with no floats or math, just simple headings (Part and Chapter) and text

document-classesspacingtitlesecvertical alignmentwarnings

So I have this relatively simple-coded book document.
When I try to compile it, I get a lot of Underfull \vbox (badness 10000) has occurred while \output is active warnings (though there's only one in provided MWE). The structure of the book is simple: just headings and text.
For instance, the page starts with Part Number, Chapter Number and text (yes I also have an images both between Part Number and Chapter Number, and Chapter Number and text added with \includegraphics command). But even if I delete those images, the warnings still pop up with even more warnings!
I had a problem with the bottom line of the text being hung above the frame before, but that was solved with adding heightrounded to the geometry of the book.
I understand that book class uses \flushbottom by default to literally flush the text to the bottom of the frame. So I tried to use \raggedbottom as many had suggested but that, while having solved the warning occurrence, introduced another problem: now on some pages the bottom line's baseline is getting hung above the frame, sometimes as high as almost a full line (unfortunately it's not that noticeable in MWE but you can still see it on Page 1)!
So I am puzzled with what causes those warnings to pop up, since my document is fairly simple-coded?!
I noticed though that it's somehow connected to the way my headings (Part Number and Chapter Number, and probably images too) are spaced. Because when I remove all the \part and \chapter commands and leave only bare text, the warnings disappear. Has it got anything to do with titlesec package?
I left all the packages used in my document intact, so you could easily spot if one of them is the issue.
P.S: Don't mind those Overfull \hbox warnings, I don't have them in my text. They only appear when \lipsum is used.

% !TEX TS-program = LuaLaTeX
\documentclass[11pt,twoside,openany]{book}
\pagestyle{plain}
\usepackage[english, russian]{babel}
\usepackage{fontspec}
\setmainfont{EB Garamond}[
]
\usepackage{microtype}
\usepackage[shortcuts]{extdash}
\usepackage[pagewise]{lineno} 
\usepackage[
  paperwidth=6in,
  paperheight=9in,
  inner=13mm,
  top=15mm,
  outer=20mm,
  bottom=24mm, showframe,
  heightrounded,
]{geometry} 

\usepackage{lettrine}
\setcounter{DefaultLines}{3}
\renewcommand{\DefaultLoversize}{0.1} 
\renewcommand{\DefaultLraise}{0} 
\renewcommand{\LettrineTextFont}{}
\setlength{\DefaultFindent}{\fontdimen2\font}

\usepackage{lipsum}
\setlength{\parskip}{0pt} 
\usepackage{graphicx}
\usepackage[dvipsnames]{xcolor}
\usepackage[pages=some]{background}

\usepackage{fancyhdr}
\fancyhf{} 
\renewcommand{\headrulewidth}{0ex} 
\fancyfoot[LE,RO]{\thepage} 
\pagestyle{fancy}
\fancypagestyle{plain}{%
  \fancyhf{}%
  \renewcommand{\headrulewidth}{0ex}%
  \fancyhf[lef,rof]{\thepage}%
}
 
\usepackage{etoolbox}
\makeatletter
\patchcmd{\chapter}{\if@openright\cleardoublepage\else\clearpage\fi}{\par}{}{}
\makeatother

%\raggedbottom % If used, it messes up the bottom line the way that its baseline hangs above the frame on some pages

\usepackage{titlesec}
\titleclass{\part}{top}
\titleformat{\part}{\centering\normalfont\large}{\thepart.}{4ex}{\LARGE\centering}
\titlespacing*{\part}{0ex}{2ex}{0ex} 
\titleclass{\chapter}{straight}
\titleformat{\chapter}{\centering\normalfont\large}{\thechapter.}{4ex}{\large\centering}
\titlespacing*{\chapter} {0ex}{6ex}{02ex} 

\setcounter{secnumdepth}{0}
\usepackage{tocloft}

\begin{document} 
\pagestyle{plain}
\pagenumbering{gobble}
\addtocounter{page}{0}

\begin{titlepage}
    \centering
    {\large TITLE\par}
    \vfill
    \title{SOME TITLE}
    \author{SOME AUTHOR}
    \date{}
\end{titlepage}
\clearpage
\frontmatter

\mainmatter

\pagenumbering{arabic}

\part{PART ONE}
\begin{center}
    \includegraphics[height=15ex,keepaspectratio]{example-image-a}
  \end{center} 
\chapter{CHAPTER ONE}
\begin{center}
    \includegraphics[height=35ex,keepaspectratio]{example-image-b}
  \end{center} 
\lipsum[1-12]
\chapter{CHAPTER TWO}
\begin{center}
    \includegraphics[height=35ex,keepaspectratio]{example-image-b}
  \end{center} 
\lipsum[1-12]
\chapter{CHAPTER THREE}
\begin{center}
    \includegraphics[height=35ex,keepaspectratio]{example-image-b}
  \end{center} 
\lipsum[1-12]  
\end{document}

Best Answer

You need some flexibility around headings so that flushbottom may be achieved

perhaps

\titlespacing*{\chapter} {0ex}{6ex plus 4ex minus 1ex}{2ex} 

But the underfull warning from the page before chapter 3 is because you removed the normal \clearpage but the heading and image do not fit and there is no glue to fill the page, you could perhaps add \filbreak like this to allow pages before chapters to be short.

\titleformat{\chapter}{\filbreak\centering\normalfont\large}{\thechapter.}{4ex}{\large\centering}
Related Question