Topic: Xorg only starts as root.

Hello. I'm having a problem with xorg only starting with sudo or as root. I've seen that others have had this problem with other distros but none of their fixes have helped me. I'm not all that new to gnu/linux or arch in general, as I've been using both since april this year. However I have yet to have this problem before. Xorg starts and runs just fine if I'm logged in as root or use the sudo command, but fails to start if I'm logged in as a regular user. I have done some troubleshooting but none of my fixes or those I've found from other fourms have helped me. I did just install Hyperbola for the first time last night and that all went well. I've never used a non-systemd distro before so all of my experience is based on Arch.

This is my xorg error log file:
[   690.415]
X.Org X Server 1.19.3
Release Date: 2017-03-15
[   690.417] X Protocol Version 11, Revision 0
[   690.417] Build Operating System: Linux 4.9.77-gnu-1-lts x86_64
[   690.418] Current Operating System: Linux tobacco 4.9.124-gnu-1-lts #1 SMP Mon Aug 27 23:22:06 UTC 2018 x86_64
[   690.418] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-linux-libre-lts root=UUID=e1150db0-2f75-4a7a-ac4c-5de8a49026eb rw quiet
[   690.420] Build Date: 30 January 2018  09:32:50PM
[   690.421] 
[   690.423] Current version of pixman: 0.34.0
[   690.425]     Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
[   690.425] Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[   690.432] (==) Log file: "/home/toby/.local/share/xorg/Xorg.0.log", Time: Mon Sep  3 12:15:46 2018
[   690.434] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[   690.434] (==) No Layout section.  Using the first Screen section.
[   690.434] (==) No screen section available. Using defaults.
[   690.434] (**) |-->Screen "Default Screen Section" (0)
[   690.435] (**) |   |-->Monitor "<default monitor>"
[   690.435] (==) No monitor specified for screen "Default Screen Section".
    Using a default monitor configuration.
[   690.435] (==) Automatically adding devices
[   690.435] (==) Automatically enabling devices
[   690.435] (==) Automatically adding GPU devices
[   690.435] (==) Automatically binding GPU devices
[   690.435] (==) Max clients allowed: 256, resource mask: 0x1fffff
[   690.435] (WW) The directory "/usr/share/fonts/Type1/" does not exist.
[   690.435]     Entry deleted from font path.
[   690.435] (==) FontPath set to:
    /usr/share/fonts/misc/,
    /usr/share/fonts/TTF/,
    /usr/share/fonts/OTF/,
    /usr/share/fonts/100dpi/,
    /usr/share/fonts/75dpi/
[   690.435] (==) ModulePath set to "/usr/lib/xorg/modules"
[   690.435] (II) The server relies on udev to provide the list of input devices.
    If no devices become available, reconfigure udev or disable AutoAddDevices.
[   690.435] (II) Loader magic: 0x823d60
[   690.435] (II) Module ABI versions:
[   690.435]     X.Org ANSI C Emulation: 0.4
[   690.435]     X.Org Video Driver: 23.0
[   690.435]     X.Org XInput driver : 24.1
[   690.435]     X.Org Server Extension : 10.0
[   690.436] (EE) dbus-core: error connecting to system bus: org.freedesktop.DBus.Error.Failed (Failed to connect to socket /run/dbus/system_bus_socket: Too many levels of symbolic links)
[   690.436] (++) using VT number 1

[   690.436] (II) xfree86: Adding drm device (/dev/dri/card0)
[   690.442] (--) PCI:*(0:0:2:0) 8086:2992:103c:2808 rev 2, Mem @ 0xf0400000/1048576, 0xe0000000/268435456, I/O @ 0x00001100/8, BIOS @ 0x????????/131072
[   690.442] (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
[   690.442] (II) LoadModule: "glx"
[   690.442] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[   690.446] (II) Module glx: vendor="X.Org Foundation"
[   690.446]     compiled for 1.19.3, module version = 1.0.0
[   690.446]     ABI class: X.Org Server Extension, version 10.0
[   690.446] (==) Matched modesetting as autoconfigured driver 0
[   690.446] (==) Matched fbdev as autoconfigured driver 1
[   690.446] (==) Matched vesa as autoconfigured driver 2
[   690.446] (==) Assigned the driver to the xf86ConfigLayout
[   690.446] (II) LoadModule: "modesetting"
[   690.447] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[   690.447] (II) Module modesetting: vendor="X.Org Foundation"
[   690.447]     compiled for 1.19.3, module version = 1.19.3
[   690.447]     Module class: X.Org Video Driver
[   690.447]     ABI class: X.Org Video Driver, version 23.0
[   690.447] (II) LoadModule: "fbdev"
[   690.447] (WW) Warning, couldn't open module fbdev
[   690.448] (II) UnloadModule: "fbdev"
[   690.448] (II) Unloading fbdev
[   690.448] (EE) Failed to load module "fbdev" (module does not exist, 0)
[   690.448] (II) LoadModule: "vesa"
[   690.448] (II) Loading /usr/lib/xorg/modules/drivers/vesa_drv.so
[   690.448] (II) Module vesa: vendor="X.Org Foundation"
[   690.448]     compiled for 1.19.0, module version = 2.3.4
[   690.448]     Module class: X.Org Video Driver
[   690.448]     ABI class: X.Org Video Driver, version 23.0
[   690.448] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[   690.448] (II) VESA: driver for VESA chipsets: vesa
[   690.448] xf86EnableIOPorts: failed to set IOPL for I/O (Operation not permitted)
[   690.448] (EE) open /dev/dri/card0: Permission denied
[   690.449] (WW) Falling back to old probe method for modesetting
[   690.449] (EE) open /dev/dri/card0: Permission denied
[   690.449] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[   690.449] (EE) Screen 0 deleted because of no matching config section.
[   690.449] (II) UnloadModule: "modesetting"
[   690.449] (II) Loading sub module "vbe"
[   690.449] (II) LoadModule: "vbe"
[   690.449] (II) Loading /usr/lib/xorg/modules/libvbe.so
[   690.449] (II) Module vbe: vendor="X.Org Foundation"
[   690.449]     compiled for 1.19.3, module version = 1.1.0
[   690.449]     ABI class: X.Org Video Driver, version 23.0
[   690.449] (II) Loading sub module "int10"
[   690.449] (II) LoadModule: "int10"
[   690.449] (II) Loading /usr/lib/xorg/modules/libint10.so
[   690.449] (II) Module int10: vendor="X.Org Foundation"
[   690.449]     compiled for 1.19.3, module version = 1.0.0
[   690.449]     ABI class: X.Org Video Driver, version 23.0
[   690.450] (II) VESA(0): initializing int10
[   690.450] (EE) VESA(0): Cannot read int vect
[   690.450] (II) UnloadModule: "vesa"
[   690.450] (II) UnloadSubModule: "int10"
[   690.450] (II) Unloading int10
[   690.450] (II) UnloadSubModule: "vbe"
[   690.450] (II) Unloading vbe
[   690.451] (EE) Screen(s) found, but none have a usable configuration.
[   690.451] (EE)
Fatal server error:
[   690.451] (EE) no screens found(EE)
[   690.451] (EE)
Please consult the The X.Org Foundation support
     at http://wiki.x.org
for help.
[   690.451] (EE) Please also check the log file at "/home/toby/.local/share/xorg/Xorg.0.log" for additional information.
[   690.451] (EE)
[   690.498] (EE) Server terminated with error (1). Closing log file.

Now I've done some chown'ing and created symbolic links to several X related things and none of that has helped. I've deleted xauthority files for both root and user and restarted, to no noticable difference. I cant seem to be able to find a fix for this. Has anyone else run into this problem before? Should I re-install hyperbola and see if that changes anything?

Thanks, toby.

2 (edited by zapper 2018-09-04 00:49:31)

Re: Xorg only starts as root.

You should reinstall, but also, there are ways to make sudo work.  It involves using root and going into /etc/sudoers
Did you install xfce4 or some other desktop environment?

https://wiki.parabola.nu/Sudo

This should be helpful to Hyperbola too, it worked for me. 

Try this:

%wheel      ALL=(ALL) ALL

it does need to be uncommented I think though.

if its a libreboot device and your using Full Disk Encryption, you may need a bit more help from this thread:

https://forums.hyperbola.info/viewtopic.php?id=25

Assuming you correctly followed the hyperbola guide that is...

If not libreboot though, then forget I mentioned libreboot for your case. smile

Hyperbola:

The Stable Secure Libre Arch!

3 (edited by toby-t 2018-09-04 02:09:47)

Re: Xorg only starts as root.

zapper wrote:

You should reinstall

I have, still to no avail.

I have tried it both with window maker and twm, both still make me use sudo to startx.
I would be okay with using sudo for this if it didn't just log me in as root and cd to my home dir, which effectively defeats the purpose of having a regular user account.
My user is in the group wheel so that line is uncommented. And no I'm not using libreboot, or coreboot for that matter, just OEM bios (unfortunately).

edit:
After removing everything except for the base group (I only had xorg, xinit, twm, windowmaker, sudo, and network manager installed) with "pacman -R $(comm -23 <(pacman -Qq | sort) <((for i in $(pacman -Qqg base); do pactree -ul "$i"; done) | sort -u))". And re-installing xorg, I can run it without sudo. Everything is fine now and my problem is solved.

Re: Xorg only starts as root.

toby-t wrote:
zapper wrote:

You should reinstall

I have, still to no avail.

I have tried it both with window maker and twm, both still make me use sudo to startx.
I would be okay with using sudo for this if it didn't just log me in as root and cd to my home dir, which effectively defeats the purpose of having a regular user account.
My user is in the group wheel so that line is uncommented. And no I'm not using libreboot, or coreboot for that matter, just OEM bios (unfortunately).

edit:
After removing everything except for the base group (I only had xorg, xinit, twm, windowmaker, sudo, and network manager installed) with "pacman -R $(comm -23 <(pacman -Qq | sort) <((for i in $(pacman -Qqg base); do pactree -ul "$i"; done) | sort -u))". And re-installing xorg, I can run it without sudo. Everything is fine now and my problem is solved.

That's good, so your windowmaker works/sudo? Excellent.  In the future I do hope you go completely libre though. smile

Hyperbola:

The Stable Secure Libre Arch!

Re: Xorg only starts as root.

zapper wrote:

That's good, so your windowmaker works/sudo? Excellent.  In the future I do hope you go completely libre though. smile

Is windowmaker not libre? I mostly use it for aesthetic purposes but GNUstep, the objective C language dev environment, recommends it because its very compatible with the apps that package comes with. Other than that I either use xorg-twm or i3 for window managers. I think they are libre.

Re: Xorg only starts as root.

toby-t wrote:
zapper wrote:

That's good, so your windowmaker works/sudo? Excellent.  In the future I do hope you go completely libre though. smile

Is windowmaker not libre? I mostly use it for aesthetic purposes but GNUstep, the objective C language dev environment, recommends it because its very compatible with the apps that package comes with. Other than that I either use xorg-twm or i3 for window managers. I think they are libre.

Window managers can be libre, No I meant your hardware, ditching intel me and amd equivelant.

Hyperbola:

The Stable Secure Libre Arch!