You are not logged in.

#1 2019-11-01 17:17:03

tungol
Member
From: Thailand
Registered: 2019-10-04
Posts: 10

Xinit server error after installing linux-hardened kernel

I recently installed Arch Linux, then xmonad.
I was using xinit to run xmonad.
Then I installed the linux-hardened kernel.
But since then, after I enter 'startx', xinit fails.
The last 3 lines of error output are:

xinit: giving up
xinit: unable to connect to X server: connection refused
xinit: server error

Before posting any logs, I'd like to know:  Do I need the linux-hardened kernel in order to run apparmor?
I admit I should have asked this question before installing linux-hardened.  I just got carried away by the adrenalin rush of being able to do things that I could never do in Windows.

If I do need linux-hardened, then I can post the Xorg,0.log

Thanks!


There are many unidentified bands in the spectra of stars.
-- Garik Israelian

Offline

#2 2019-11-01 17:19:42

loqs
Member
Registered: 2014-03-06
Posts: 9,074

Re: Xinit server error after installing linux-hardened kernel

AppArmor#Installation

Last edited by loqs (2019-11-01 17:20:35)

Offline

#3 2019-11-01 18:12:08

tungol
Member
From: Thailand
Registered: 2019-10-04
Posts: 10

Re: Xinit server error after installing linux-hardened kernel

I'm reading the AppArmor installation guide now. It says:

AppArmor is available in all officially supported kernels.

Does this mean that AppArmor will work with the kernel that Arch already has, and I don't need to install another one?


There are many unidentified bands in the spectra of stars.
-- Garik Israelian

Offline

#4 2019-11-01 18:22:15

loqs
Member
Registered: 2014-03-06
Posts: 9,074

Re: Xinit server error after installing linux-hardened kernel

That is not as easy to answer as it may seem.  The officially supported kernels is the list from the link Kernel#Officially_supported_kernels
In your initial post you do not say what the initial kernel you used before switching to xanmod and then to linux-harened was.
If it was one of linux, linux-lts, or linux-zen then they all support AppArmor.
Edit:
I also have no idea what config the xanmod kernel you are using would have.
You could check the running kernel for AppArmor support (provided it has been built with CONFIG_IKCONFIG_PROC) by running:

zgrep APPARMOR /proc/config.gz

Last edited by loqs (2019-11-01 18:47:35)

Offline

#5 2019-11-02 04:23:45

tungol
Member
From: Thailand
Registered: 2019-10-04
Posts: 10

Re: Xinit server error after installing linux-hardened kernel

loqs wrote:

In your initial post you do not say what the initial kernel you used before switching to xanmod and then to linux-harened was.
If it was one of linux, linux-lts, or linux-zen then they all support AppArmor.

I assume it was the plain linux one.

loqs wrote:

You could check the running kernel for AppArmor support (provided it has been built with CONFIG_IKCONFIG_PROC) by running:

zgrep APPARMOR /proc/config.gz

I'll check this when I get back. Thanks.


There are many unidentified bands in the spectra of stars.
-- Garik Israelian

Offline

#6 2019-11-03 06:19:48

tungol
Member
From: Thailand
Registered: 2019-10-04
Posts: 10

Re: Xinit server error after installing linux-hardened kernel

UPDATE:
Here's my output from the zgrep:

 
$ zgrep APPARMOR /proc/config.gz
CONFIG_SECURITY_APPARMOR=y
CONFIG_SECURITY_APPARMOR_HASH=y
CONFIG_SECURITY_APPARMOR_HASH_DEFAULT=y
# CONFIG_SECURITY_APPARMOR_DEBUG is not set
# CONFIG_DEFAULT_SECURITY_APPARMOR is not set

I assume from this that my current kernel supports AppArmor, but I need to set two parameters.
Is that correct?
Also, I checked what the current kernel is:

$ cat /proc/version
Linux version 5.3.6-arch1-1-ARCH (builduser@heftig-3261850) (gcc version 9.2.0 (GCC)) # 1 SMP PREEMPT
Fri Oct 11 18:28:05 UTC 2019

Is this the linux_hardened kernel?

Last edited by tungol (2019-11-03 06:21:07)


There are many unidentified bands in the spectra of stars.
-- Garik Israelian

Offline

#7 2019-11-03 12:41:08

loqs
Member
Registered: 2014-03-06
Posts: 9,074

Re: Xinit server error after installing linux-hardened kernel

tungol wrote:

UPDATE:
Here's my output from the zgrep:

 
$ zgrep APPARMOR /proc/config.gz
CONFIG_SECURITY_APPARMOR=y
CONFIG_SECURITY_APPARMOR_HASH=y
CONFIG_SECURITY_APPARMOR_HASH_DEFAULT=y
# CONFIG_SECURITY_APPARMOR_DEBUG is not set
# CONFIG_DEFAULT_SECURITY_APPARMOR is not set

I assume from this that my current kernel supports AppArmor, but I need to set two parameters.
Is that correct?

Yes

tungol wrote:

Also, I checked what the current kernel is:

$ cat /proc/version
Linux version 5.3.6-arch1-1-ARCH (builduser@heftig-3261850) (gcc version 9.2.0 (GCC)) # 1 SMP PREEMPT
Fri Oct 11 18:28:05 UTC 2019

Is this the linux_hardened kernel?

No that is the linux kernel.

Offline

#8 2019-11-06 05:46:47

tungol
Member
From: Thailand
Registered: 2019-10-04
Posts: 10

Re: Xinit server error after installing linux-hardened kernel

Well, it's good to know that my current kernel supports AppArmor and that the Xinit problem wasn't caused by the linux_hardened kernel as I don't have it.  Xinit was working fine with Xmonad, and I've no idea why it stopped working. So I'll post the Xorg,0.log this evening.


There are many unidentified bands in the spectra of stars.
-- Garik Israelian

Offline

#9 2019-11-08 12:40:22

tungol
Member
From: Thailand
Registered: 2019-10-04
Posts: 10

Re: Xinit server error after installing linux-hardened kernel

Here's my Xorg.0.log. I can see various errors, but not sure what they mean. Any help appreciated.

http://ix.io/21aa

Last edited by tungol (2019-11-08 12:41:41)


There are many unidentified bands in the spectra of stars.
-- Garik Israelian

Offline

#10 2019-11-08 13:16:01

loqs
Member
Registered: 2014-03-06
Posts: 9,074

Re: Xinit server error after installing linux-hardened kernel

Before trying some workarounds please see if a related fix also fixes this issue.
Requires base-devel group plus git and devtools packages installed.

git clone git://git.archlinux.org/svntogit/packages.git --single-branch --branch "packages/systemd"
cd packages/trunk
curl -o logind.patch http://ix.io/21as
git apply -v logind.patch
extra-x86_64-build
# pacman -U systemd-243.78-2-x86_64.pkg.tar.xz systemd-libs-243.78-2-x86_64.pkg.tar.xz systemd-sysvcompat-243.78-2-x86_64.pkg.tar.xz

If that does not work to restore the official package version

pacman -S systemd systemd-libs systemd-sysvcompat

Workarounds for the issue use early KMS if that fails run Xorg as root.
Edit:
The related fix is from https://github.com/systemd/systemd/pull/13811
Edit2:
Upstream bug report for the issue https://github.com/systemd/systemd/issues/13943

Last edited by loqs (2019-11-08 16:36:07)

Offline

#11 2019-11-13 17:18:54

tungol
Member
From: Thailand
Registered: 2019-10-04
Posts: 10

Re: Xinit server error after installing linux-hardened kernel

I have tried the fix and workaround, but xinit still fails. The only difference is that after the startx command, I now arrive at a black screen with a cursor but no response to any keys.
When I restored the official package version, I got a warning at the end:

WARNING: errors were encountered during the build. The image may not be complete.

Then I followed the instructions for early KMS and regenerated the intramfs by

mkinitcpio -p linux

but at the end got the same warning about errors encountered during the build. What I'd like to know is the reason why xinit is failing. From the Xorg log which i posted, it appears to be when logind takes control.  Anything in the ArchWiki that would help me understand exactly what logind is doing?


There are many unidentified bands in the spectra of stars.
-- Garik Israelian

Offline

#12 2019-11-13 18:01:42

loqs
Member
Registered: 2014-03-06
Posts: 9,074

Re: Xinit server error after installing linux-hardened kernel

https://github.com/systemd/systemd/issu … -551436318 explains what the believed cause of the issue is.

WARNING: errors were encountered during the build. The image may not be complete.

What was the output before that?  It should be stored in /var/log/pacman.log also the contents of /etc/mkinitcpio.conf

Offline

#13 Yesterday 16:59:10

tungol
Member
From: Thailand
Registered: 2019-10-04
Posts: 10

Re: Xinit server error after installing linux-hardened kernel

loqs wrote:

https://github.com/systemd/systemd/issu … -551436318 explains what the believed cause of the issue is.

WARNING: errors were encountered during the build. The image may not be complete.

What was the output before that?  It should be stored in /var/log/pacman.log also the contents of /etc/mkinitcpio.conf

Thanks, here's the output and contents:
pacman.log
http://ix.io/21C2
mkinitcpio.conf
http://ix.io/21C6


There are many unidentified bands in the spectra of stars.
-- Garik Israelian

Offline

#14 Yesterday 17:02:47

loqs
Member
Registered: 2014-03-06
Posts: 9,074

Re: Xinit server error after installing linux-hardened kernel

MODULES=(... radeon ...)

mkinitcpio is searching for and failing to find a module named ...

Offline

#15 Yesterday 17:43:37

tungol
Member
From: Thailand
Registered: 2019-10-04
Posts: 10

Re: Xinit server error after installing linux-hardened kernel

I was following the ArchWiki instructions for Early KMS:

For example to enable early KMS for the Intel graphics driver:
etc/mkinitcpio.conf
MODULES=(... i915 ...)

In my system, I substituted radeon for i915m:
If I type the following command (NOTE the ~ should be the pipe character which I suddenly can't find on this machine)_

$lspci ~ grep -e VGA -e 3D

I get a long string of output including "[Radeon R5/R6/R7 Graphics]"
If not radeon, whch module is required for my video driver?

Last edited by tungol (Yesterday 17:45:18)


There are many unidentified bands in the spectra of stars.
-- Garik Israelian

Offline

#16 Yesterday 17:46:43

loqs
Member
Registered: 2014-03-06
Posts: 9,074

Re: Xinit server error after installing linux-hardened kernel

MODULES=(... radeon ...)

lists three modules radeon and two named ... which do not exist.
The wiki was trying to convey add radeon to the list of modules,  if your original list was empty then it would become

MODULES=(radeon)

Edit:
You could also try https://bbs.archlinux.org/viewtopic.php … 8#p1873148

Last edited by loqs (Yesterday 17:51:58)

Offline

Board footer

Powered by FluxBB