Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] X doesn't start with new 6.1.12 kernel
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Blind_Sniper
Guru
Guru


Joined: 20 Apr 2018
Posts: 340

PostPosted: Mon Feb 27, 2023 6:15 pm    Post subject: [Solved] X doesn't start with new 6.1.12 kernel Reply with quote

Hi.
Just updated kernel to 6.1.12. And rebuilt nvidia-drivers-390.157 against new kernel too. After reboot X doesn't start with famous error message:
Code:
parse_vt_settings cannot open /dev/tty0 (permission denied)


id shows I'm in video and wheel groups.
elogind and dbus are started and running.

What's wrong with new kernel? Why xorg-server works with old kernel and doesn't work with new one?
How new kernel breaks permissions to /dev/tty0?

Code:
x11-drivers/nvidia-drivers-390.157::gentoo was built with the following:
USE="X driver static-libs tools -dist-kernel -persistenced" ABI_X86="32 (64)"


Code:
x11-base/xorg-server-21.1.7::gentoo was built with the following:
USE="udev xorg -debug -elogind -minimal (-selinux) -suid -systemd -test -unwind -xcsecurity -xephyr -xnest -xvfb" ABI_X86="(64)"
FEATURES="sfperms pid-sandbox config-protect-if-modified usersandbox ebuild-locks unknown-features-warn assume-digests qa-unresolved-soname-deps unmerge-logs distlocks multilib-strict merge-sync binpkg-dostrip news ipc-sandbox unmerge-orphans sandbox preserve-libs binpkg-docompress userpriv protect-owned binpkg-logs network-sandbox parallel-fetch fixlafiles strict xattr buildpkg-live userfetch usersync"


Added: old kernel 5.15.80 still works fine with these nvidia-drivers and xorg-server
_________________
GNU is Not Usable


Last edited by Blind_Sniper on Sat Mar 04, 2023 11:39 am; edited 1 time in total
Back to top
View user's profile Send private message
ukky
Tux's lil' helper
Tux's lil' helper


Joined: 26 Feb 2023
Posts: 109
Location: Montreal, Canada

PostPosted: Mon Feb 27, 2023 7:03 pm    Post subject: Reply with quote

Blind_Sniper,

Which display manager do you use? How do you start X?
Can you test starting X via startx?
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4133
Location: Bavaria

PostPosted: Mon Feb 27, 2023 7:46 pm    Post subject: Reply with quote

Yes, it is a NVIDIA ... :lol: (sorry; no offence; we all love nvidia drivers)

Please try this at first: Disable this
Code:
CONFIG_SYSFB_SIMPLEFB=y

and maybe also
Code:
CONFIG_DRM_SIMPLEDRM=y

(if it was enabled).
Back to top
View user's profile Send private message
Blind_Sniper
Guru
Guru


Joined: 20 Apr 2018
Posts: 340

PostPosted: Mon Feb 27, 2023 11:14 pm    Post subject: Reply with quote

ukky wrote:
Blind_Sniper,

Which display manager do you use? How do you start X?
Can you test starting X via startx?


Using sddm.
startx doesn't work too, with the same error message

@pietinger
They both (CONFIG_SYSFB_SIMPLEFB and CONFIG_DRM_SIMPLEDRM) not set
_________________
GNU is Not Usable
Back to top
View user's profile Send private message
ukky
Tux's lil' helper
Tux's lil' helper


Joined: 26 Feb 2023
Posts: 109
Location: Montreal, Canada

PostPosted: Tue Feb 28, 2023 2:33 am    Post subject: Reply with quote

Blind_Sniper,

Please try the following:
Disable XDDM service and login as a normal user.
Make sure you are the owner of TTY device, group is 'tty', it's a character device and mode is 0600:
Code:
$ ls -l /dev/tty$(tty | sed 's|^.*\([0-9]\+\)$|\1|')

Run this command to start X:
Code:
$ xinit $(which xterm) -geometry =80x65+10+10 -fn 8x13 -j -fg white -bg navy -- :$(tty | sed 's|/dev/tty||') vt$(tty | sed 's|/dev/tty||')

This command will skip your ~/.xinitrc and start new X session with single xterm window.
It will display xterm with blue background.
Type 'exit' in xtrem window to exit this X session.
Please provide ~/.local/share/xorg/Xorg.$(tty | sed 's|/dev/tty||').log
Back to top
View user's profile Send private message
Blind_Sniper
Guru
Guru


Joined: 20 Apr 2018
Posts: 340

PostPosted: Tue Feb 28, 2023 9:16 am    Post subject: Reply with quote

ukky wrote:

Make sure you are the owner of TTY device, group is 'tty', it's a character device and mode is 0600:


With 5.15.80 kernel:
Code:
ls -l /dev/tty$(tty | sed 's|^.*\([0-9]\+\)$|\1|')
crw--w---- 1 root tty 4, 0 Feb 28  2023 /dev/tty0

and X works, nothing wrong with permissions. I think it should be the same permissions for 6.1.12 kernel and X should be happy with it too, why should I change permissions?

Code:
~/.local/share/xorg/Xorg.$(tty | sed 's|/dev/tty||').log

no such file
_________________
GNU is Not Usable
Back to top
View user's profile Send private message
ukky
Tux's lil' helper
Tux's lil' helper


Joined: 26 Feb 2023
Posts: 109
Location: Montreal, Canada

PostPosted: Tue Feb 28, 2023 2:35 pm    Post subject: Reply with quote

Blind_Sniper wrote:
why should I change permissions?

You are not supposed to change permissions of your TTY device manually.
Blind_Sniper wrote:
no such file

That Xorg.log file is created when you run 'xinit' from text console as a non-root user and server option ':$(tty | sed 's|/dev/tty||')' is specified.

With kernel 6.1.12, could you try this sequence?:
1) Disable XDDM service.
2) Login as restricted (non-root) user into text-mode shell (bash for example).
3) Verify TTY permissions, using 'ls' command from previous post. Please provide output.
4) Start X session via 'xinit' command from previous post.
5) Locate and share Xorg.log. Make sure timestamp matches the time you started 'xinit'. Location of Xorg.log is either here:
Code:
~/.local/share/xorg/

or here:
Code:
/var/log/
Back to top
View user's profile Send private message
Blind_Sniper
Guru
Guru


Joined: 20 Apr 2018
Posts: 340

PostPosted: Tue Feb 28, 2023 4:48 pm    Post subject: Reply with quote

Code:
ls -l /dev/tty$(tty | sed 's|^.*\([0-9]\+\)$|\1|')
crw------- 1 user tty 4, 1 Feb 28 19:34 /dev/tty1


xdm stopped. When running xinit

Code:
xinit $(which xterm) -geometry =80x65+10+10 -fn 8x13 -j -fg white -bg navy -- :$(tty | sed 's|/dev/tty||') vt$(tty | sed 's|/dev/tty||')


screen goes blank for few seconds then reports that no screen found and server terminated successfully

~/.local/share/xorg/Xorg.1.log: https://pastebin.com/H8HntHd1
_________________
GNU is Not Usable
Back to top
View user's profile Send private message
ukky
Tux's lil' helper
Tux's lil' helper


Joined: 26 Feb 2023
Posts: 109
Location: Montreal, Canada

PostPosted: Tue Feb 28, 2023 5:30 pm    Post subject: Reply with quote

Blind_Sniper,

Thanks for the Xorg.log.
Please post the output of this command (replace your user name with asterisks if needed):
Code:
$ id

and this:
Code:
$ ls -Rl /dev/input/
Back to top
View user's profile Send private message
Blind_Sniper
Guru
Guru


Joined: 20 Apr 2018
Posts: 340

PostPosted: Tue Feb 28, 2023 8:45 pm    Post subject: Reply with quote

Code:
id
uid=1000(user) gid=1000(user) groups=1000(user),10(wheel),18(audio),27(video),100(users),103(vboxusers)



Code:
ls -Rl /dev/input/
/dev/input/:
total 0
drwxr-xr-x 2 root root     120 Feb 28 23:40 by-id
drwxr-xr-x 2 root root     120 Feb 28 23:40 by-path
crw-rw---- 1 root input 13, 64 Mar  1  2023 event0
crw-rw---- 1 root input 13, 65 Mar  1  2023 event1
crw-rw---- 1 root input 13, 74 Feb 28 23:40 event10
crw-rw---- 1 root input 13, 75 Feb 28 23:40 event11
crw-rw---- 1 root input 13, 76 Feb 28 23:40 event12
crw-rw---- 1 root input 13, 77 Feb 28 23:40 event13
crw-rw---- 1 root input 13, 78 Feb 28 23:40 event14
crw-rw---- 1 root input 13, 79 Feb 28 23:40 event15
crw-rw---- 1 root input 13, 80 Feb 28 23:40 event16
crw-rw---- 1 root input 13, 81 Feb 28 23:40 event17
crw-rw---- 1 root input 13, 66 Mar  1  2023 event2
crw-rw---- 1 root input 13, 67 Mar  1  2023 event3
crw-rw---- 1 root input 13, 68 Mar  1  2023 event4
crw-rw---- 1 root input 13, 69 Mar  1  2023 event5
crw-rw---- 1 root input 13, 70 Feb 28 23:40 event6
crw-rw---- 1 root input 13, 71 Feb 28 23:40 event7
crw-rw---- 1 root input 13, 72 Feb 28 23:40 event8
crw-rw---- 1 root input 13, 73 Mar  1  2023 event9
crw-rw---- 1 root input 13, 63 Feb 28 23:40 mice
crw-rw---- 1 root input 13, 32 Feb 28 23:40 mouse0

/dev/input/by-id:
total 0
lrwxrwxrwx 1 root root 10 Feb 28 23:40 usb-BTC_USB_Keyboard-event-if01 -> ../event16
lrwxrwxrwx 1 root root 10 Feb 28 23:40 usb-BTC_USB_Keyboard-event-kbd -> ../event14
lrwxrwxrwx 1 root root 10 Feb 28 23:40 usb-KYE_SYSTEMS_CORP._Wired_Mouse-event-mouse -> ../event17
lrwxrwxrwx 1 root root  9 Feb 28 23:40 usb-KYE_SYSTEMS_CORP._Wired_Mouse-mouse -> ../mouse0

/dev/input/by-path:
total 0
lrwxrwxrwx 1 root root 10 Feb 28 23:40 pci-0000:00:1a.0-usb-0:1.5:1.0-event-kbd -> ../event14
lrwxrwxrwx 1 root root 10 Feb 28 23:40 pci-0000:00:1a.0-usb-0:1.5:1.1-event -> ../event16
lrwxrwxrwx 1 root root 10 Feb 28 23:40 pci-0000:00:1a.0-usb-0:1.6:1.0-event-mouse -> ../event17
lrwxrwxrwx 1 root root  9 Feb 28 23:40 pci-0000:00:1a.0-usb-0:1.6:1.0-mouse -> ../mouse0

_________________
GNU is Not Usable
Back to top
View user's profile Send private message
ukky
Tux's lil' helper
Tux's lil' helper


Joined: 26 Feb 2023
Posts: 109
Location: Montreal, Canada

PostPosted: Tue Feb 28, 2023 9:05 pm    Post subject: Reply with quote

Blind_Sniper,

You have to add user with uid=1000 to 'input' group:
Code:
$ sudo usermod --append --groups input user

Replace 'user' with actual user login name.
Then logout, re-login, run 'xinit' as before, then post Xorg.log, please.
Back to top
View user's profile Send private message
Blind_Sniper
Guru
Guru


Joined: 20 Apr 2018
Posts: 340

PostPosted: Tue Feb 28, 2023 9:34 pm    Post subject: Reply with quote

Added user to input group, new Xorg.1.log:

https://pastebin.com/uEz16hUN
_________________
GNU is Not Usable
Back to top
View user's profile Send private message
ukky
Tux's lil' helper
Tux's lil' helper


Joined: 26 Feb 2023
Posts: 109
Location: Montreal, Canada

PostPosted: Tue Feb 28, 2023 9:45 pm    Post subject: Reply with quote

Blind_Sniper, thanks for the new log.
Please provide the output of:
Code:
$ ls -l /usr/lib64/xorg/modules/extensions/
Back to top
View user's profile Send private message
Blind_Sniper
Guru
Guru


Joined: 20 Apr 2018
Posts: 340

PostPosted: Tue Feb 28, 2023 9:50 pm    Post subject: Reply with quote

Code:
ls -l /usr/lib64/xorg/modules/extensions/
total 14916
-rwxr-xr-x 1 root root   293800 Feb 27 21:03 libglx.so
-rwxr-xr-x 1 root root 14976296 Feb 27 20:38 libglx.so.390.157

_________________
GNU is Not Usable
Back to top
View user's profile Send private message
ukky
Tux's lil' helper
Tux's lil' helper


Joined: 26 Feb 2023
Posts: 109
Location: Montreal, Canada

PostPosted: Tue Feb 28, 2023 9:57 pm    Post subject: Reply with quote

Try this (Xorg server should not be running when you do this):
Code:
$ sudo mv -iv /usr/lib64/xorg/modules/extensions/libglx.so /usr/lib64/xorg/modules/extensions/libglx.so.orig
$ sudo cp -aiv /usr/lib64/xorg/modules/extensions/libglx.so.390.157 /usr/lib64/xorg/modules/extensions/libglx.so.390.157.orig
$ sudo mv -iv /usr/lib64/xorg/modules/extensions/libglx.so.390.157 /usr/lib64/xorg/modules/extensions/libglx.so

Then run 'xinit' as before and provide new Xorg.log, please.
Back to top
View user's profile Send private message
Blind_Sniper
Guru
Guru


Joined: 20 Apr 2018
Posts: 340

PostPosted: Sat Mar 04, 2023 11:38 am    Post subject: Reply with quote

@ukky
thanks for your effort

The problem occured due to kernel. New version requeres some config options changing : CONFIG_FB_SIMPLE should be disabled and FB_VESA should be activated (CONFIG_FB_VESA=y). And there should be CONFIG_DRM_KMS_HELPER enabled as module (if not set).

After rebuildig kernel the problem has gone.
_________________
GNU is Not Usable
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum