Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Restarting x11 from script does not work
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
sakaa1019
n00b
n00b


Joined: 21 Sep 2022
Posts: 5

PostPosted: Thu Oct 27, 2022 5:47 pm    Post subject: Restarting x11 from script does not work Reply with quote

When i try to start x11 kde from a script it does not start how do i fix this?

Script i run:
Code:

set -x
killall startplasma-x11
sleep 2 #Make sure x11 is fully down
startx


Nohup log(I added getfacl for testing normal output user is owner):
Code:
+ killall startplasma-x11
+ getfacl dev/tty1
# file: dev/tty1
# owner: root
# group: tty
user::rw-
group::-w-
other::---

+ startx
hostname: Unknown host


X.Org X Server 1.21.1.4
X Protocol Version 11, Revision 0
CENSORED
CENSORED
 
Current version of pixman: 0.40.0
   Before reporting problems, check http://wiki.x.org
   to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
   (++) from command line, (!!) notice, (II) informational,
   (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/home/user/.local/share/xorg/Xorg.0.log", Time: Thu Oct 27 19:24:45 2022
(==) Using config file: "/etc/X11/xorg.conf"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
(EE)
Fatal server error:
(EE) xf86OpenConsole: Switching VT failed
(EE)
(EE)
Please consult the The X.Org Foundation support
    at http://wiki.x.org
 for help.
(EE) Please also check the log file at "/home/user/.local/share/xorg/Xorg.0.log" for additional information.
(EE)
(EE) Server terminated with error (1). Closing log file.
X connection to :0 broken (explicit kill or server shutdown).
Couldn't get a file descriptor referring to the console.


Xorg log:
Code:
[  1740.851]
X.Org X Server 1.21.1.4
X Protocol Version 11, Revision 0
CENSORED
CENSORED
[  1740.851] 
[  1740.851] Current version of pixman: 0.40.0
[  1740.851]    Before reporting problems, check http://wiki.x.org
   to make sure that you have the latest version.
[  1740.851] Markers: (--) probed, (**) from config file, (==) default setting,
   (++) from command line, (!!) notice, (II) informational,
   (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[  1740.851] (==) Log file: "/home/user/.local/share/xorg/Xorg.0.log", Time: Thu Oct 27 20:00:00 2022
[  1740.851] (==) Using config file: "/etc/X11/xorg.conf"
[  1740.851] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[  1740.852] (==) ServerLayout "Layout0"
[  1740.852] (**) |-->Screen "Screen0" (0)
[  1740.852] (**) |   |-->Monitor "Monitor0"
[  1740.852] (**) |   |-->Device "Device0"
[  1740.852] (**) |-->Input Device "Keyboard0"
[  1740.852] (**) |-->Input Device "Mouse0"
[  1740.852] (**) Option "Xinerama" "0"
[  1740.852] (==) Automatically adding devices
[  1740.852] (==) Automatically enabling devices
[  1740.852] (==) Automatically adding GPU devices
[  1740.852] (==) Automatically binding GPU devices
[  1740.852] (==) Max clients allowed: 256, resource mask: 0x1fffff
[  1740.852] (WW) The directory "/usr/share/fonts/misc" does not exist.
[  1740.852]    Entry deleted from font path.
[  1740.852] (WW) The directory "/usr/share/fonts/TTF" does not exist.
[  1740.852]    Entry deleted from font path.
[  1740.852] (WW) The directory "/usr/share/fonts/OTF" does not exist.
[  1740.852]    Entry deleted from font path.
[  1740.852] (WW) The directory "/usr/share/fonts/Type1" does not exist.
[  1740.852]    Entry deleted from font path.
[  1740.852] (WW) The directory "/usr/share/fonts/100dpi" does not exist.
[  1740.852]    Entry deleted from font path.
[  1740.852] (WW) The directory "/usr/share/fonts/75dpi" does not exist.
[  1740.852]    Entry deleted from font path.
[  1740.852] (==) FontPath set to:
   
[  1740.852] (==) ModulePath set to "/usr/lib64/xorg/modules"
[  1740.852] (WW) Hotplugging is on, devices using drivers 'kbd', 'mouse' or 'vmmouse' will be disabled.
[  1740.852] (WW) Disabling Keyboard0
[  1740.852] (WW) Disabling Mouse0
[  1740.852] (II) Module ABI versions:
[  1740.852]    X.Org ANSI C Emulation: 0.4
[  1740.852]    X.Org Video Driver: 25.2
[  1740.852]    X.Org XInput driver : 24.4
[  1740.852]    X.Org Server Extension : 10.0
[  1740.853] (++) using VT number 1

[  1740.854] (II) systemd-logind: took control of session /org/freedesktop/login1/session/c1
CENSORED
[  1740.860] (II) LoadModule: "glx"
[  1740.860] (II) Loading /usr/lib64/xorg/modules/extensions/libglx.so
[  1740.862] (II) Module glx: vendor="X.Org Foundation"
[  1740.862]    compiled for 1.21.1.4, module version = 1.0.0
[  1740.862]    ABI class: X.Org Server Extension, version 10.0
[  1740.862] (II) LoadModule: "nvidia"
[  1740.862] (II) Loading /usr/lib64/xorg/modules/drivers/nvidia_drv.so
[  1740.862] (II) Module nvidia: vendor="NVIDIA Corporation"
[  1740.862]    compiled for 1.6.99.901, module version = 1.0.0
[  1740.862]    Module class: X.Org Video Driver
[  1740.862] (II) NVIDIA dlloader X Driver  515.65.01  Wed Jul 20 13:50:46 UTC 2022
[  1740.862] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[  1740.862] (WW) xf86OpenConsole: VT_ACTIVATE failed: Operation not permitted
[  1740.862] (EE)
Fatal server error:
[  1740.862] (EE) xf86OpenConsole: Switching VT failed
[  1740.862] (EE)
[  1740.862] (EE)
Please consult the The X.Org Foundation support
    at http://wiki.x.org
 for help.
[  1740.863] (EE) Please also check the log file at "/home/user/.local/share/xorg/Xorg.0.log" for additional information.
[  1740.863] (EE)
[  1740.863] (WW) xf86CloseConsole: KDSETMODE failed: Operation not permitted
[  1740.863] (WW) xf86CloseConsole: VT_SETMODE failed: Operation not permitted
[  1740.863] (WW) xf86CloseConsole: VT_ACTIVATE failed: Operation not permitted
[  1740.864] (EE) Server terminated with error (1). Closing log file.


Please let me know if any more info is needed


Last edited by sakaa1019 on Thu Oct 27, 2022 6:58 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54308
Location: 56N 3W

PostPosted: Thu Oct 27, 2022 6:44 pm    Post subject: Reply with quote

sakaa1019,

You are starting Xorg as user as the log says
Code:
(==) Log file: "/home/user/.local/share/xorg/Xorg.0.log", Time: Thu Oct 27 19:24:45 2022


The error
Code:
[  1740.862] (WW) xf86OpenConsole: VT_ACTIVATE failed: Operation not permitted
implies that you do not have systemd or elogind runnnig and that Xorg is built with USE=-suid.
Xorg requires some of its startup to be performed as root, so it needs to run as root or have something else, running as root, to perform those operations.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
sakaa1019
n00b
n00b


Joined: 21 Sep 2022
Posts: 5

PostPosted: Thu Oct 27, 2022 6:56 pm    Post subject: Reply with quote

Hi, elogind is running and Xorg is not built with -suid

Here is the output of loginctl

Code:
+ killall startplasma-x11
+ sleep 1
+ loginctl
SESSION  UID USER  SEAT  TTY
     c1 1000 user seat0 tty1

1 sessions listed.
+ startx
hostname: Unknown host


X.Org X Server 1.21.1.4
X Protocol Version 11, Revision 0
CENSORED
CENSORED
 
Current version of pixman: 0.40.0
   Before reporting problems, check http://wiki.x.org
   to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
   (++) from command line, (!!) notice, (II) informational,
   (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/home/user/.local/share/xorg/Xorg.0.log", Time: Thu Oct 27 20:52:24 2022
(==) Using config file: "/etc/X11/xorg.conf"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
(EE)
Fatal server error:
(EE) xf86OpenConsole: Switching VT failed
(EE)
(EE)
Please consult the The X.Org Foundation support
    at http://wiki.x.org
 for help.
(EE) Please also check the log file at "/home/user/.local/share/xorg/Xorg.0.log" for additional information.
(EE)
(EE) Server terminated with error (1). Closing log file.
X connection to :0 broken (explicit kill or server shutdown).
Couldn't get a file descriptor referring to the console.
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