We report two results complementing the second law of thermodynamics for Markovian open quantum systems coupled to multiple reservoirs with different temperatures and chemical potentials. First, we derive a nonequilibrium free energy inequality providing an upper bound for a maximum power output, which for systems with inhomogeneous temperature is not equivalent to the Clausius inequality. Secondly, we derive local Clausius and free energy inequalities for subsystems of a composite system. These inequalities differ from the total system one by the presence of an information-related contribution and build the ground for thermodynamics of quantum information processing. Our theory is used to study an autonomous Maxwell demon.The second law of thermodynamics is one of the main principles of physics. Within equilibrium thermodynamics there exist two equivalent formulations of this law. The first, referred to as the Clausius inequality, states that the sum of the entropy change of the system ∆S and the entropy exchanged with the environment ∆S env during the transition between two equilibrium states is nonnegative: ∆S + ∆S env ≥ 0. The exchanged entropy can be further expressed as ∆S env = −Q/T , where Q is the heat delivered to the system. An alternative formulation, referred to as the free energy inequality, states that during the transition between two equilibrium states W − ∆F ≥ 0, where W is the work performed on the system and F = E − T S is the free energy (here E denotes the internal energy). The latter formulation can be obtained from the former by using the first law of thermodynamics ∆E = W + Q.Whereas these standard definitions of the second law apply when considering transitions between equilibrium states, the last few decades have brought significant progress towards generalizing them to both classical [1][2][3][4][5][6][7] and quantum [8][9][10] systems far from equilibrium. The most common formulation generalizes the Clausius inequality by stating that the average entropy production σ is nonnegative. For a large class of systems [4][5][6] 9] the entropy production can be defined as σ ≡ ∆S − α Q α β α , where ∆S is the change of the Shannon or the von Neumann entropy of the system (which is well defined also out of equilibrium) and Q α is the heat delivered to the system from the reservoir α with the inverse temperature β α ; additionally, in Markovian systems the entropy production rateσ is always nonnegative [7, 10]. Formulations generalizing the free energy inequality [11][12][13][14] are much less common and have been so far confined mainly to systems coupled to an environment with a homogeneous temperature; for an exception, see Ref. [14].These developments have also brought a deeper understanding of the relation between thermodynamics and the information theory [12,15]. One of the most important achievements is related to the field of thermodynamics of feedback-controlled systems [16]. Following the groundbreaking ideas of Maxwell demon [17] and Szilard engine [18], it was verified both theoretic...