You are not logged in.

#1 2014-09-12 18:06:08

basdi
Member
Registered: 2012-09-14
Posts: 22

[SOLVED] startx: no keyboard/mouse after upgrade

Hello,

After an upgrade during which X was upgraded to 1.16 the keyboard and mouse stopped working after using startx. When I start X with startx as root the keyboard and mouse work.
After the upgrade I made a .xinitrc like in the wiki article about xinitrc and I copied /etc/X/xinit/xserverrc to ~/.xserverrc

Any help would be appreciated.

Thanks!

Last edited by basdi (2014-09-15 17:13:45)

Offline

#2 2014-09-12 19:53:01

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] startx: no keyboard/mouse after upgrade

What were you using before - no .xinitrc?
Tell us more about your setup, how do you start X? Does it work when you run it rootless?
Which wiki page told you to create ~/.xserverrc? AFAIK the file should be named ~/.xinitrc. If you're running it as root, you should put it in root's home.
Anything interesting in the logs or systemd's journal?

Offline

#3 2014-09-12 20:34:32

basdi
Member
Registered: 2012-09-14
Posts: 22

Re: [SOLVED] startx: no keyboard/mouse after upgrade

Hey,

Thanks for your answer.

I start X using startx and this .xinitrc in my home directory:

#!/bin/sh
#
#~/.xinitrc
#
# Executed by startx (run your windows manager from here

if [ -d /etc/X11/xinit/xinitrc.d ]; then
    for f in /etc/X11/xinit/xinitrc.d/*; do
        [ -x "$f" ] && . "$f"
    done
    unset f
fi

xrdb /merge ~/.Xresources
setxkbmap de


# Here awesome is kept as default
# no va: session=${1: -awesome}

case $session in
    awesome) exec awesome;;
    fluxbox) exec startfluxbox;;
    # No known session, try to run it as command
# no va     *) exec $1;;
    *) exec awesome;;
esac

I created the .xinitrc after this wiki article
https://wiki.archlinux.org/index.php/Xinitrc

I tried it without the .xserverrc in the home directory and  it is the same. I read that in a forum. But probably it is not necessary because the behaviour is the same...

Before the upgrade,  I started X using xinit, but now using xinit I get the error :

(EE) xf86OpenConsole: Cannot open /dev/tty0 (No such file or directory)

And I read on a forum that I should use startx.

I'm not running as root. I try to run X as a normal user. When I run it as root it works.

In the boot messages from systemd journal I see these messages:

systemd-logind[642]: Failed to connect to system bus: No such file or directory
systemd-logind[642]: Failed to fully start up daemon: No such file or directory
systemd-logind[675]Failed to connect to system bus: No such file or directory
systemd-logind[675]: Failed to fully start up daemon: No such file or directory
...

Sorry I don't really know what to look for in the logs...

I have a nvidia card and I use the proprietary drivers and Bumblebee.

Offline

#4 2014-09-12 21:46:49

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] startx: no keyboard/mouse after upgrade

Have you configured Xorg.wrap? IIRC nvidia  proprietary drivers need this as they don't support rootles X.

Offline

#5 2014-09-12 21:50:31

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] startx: no keyboard/mouse after upgrade

xrdb /merge ~/.Xresources

Unrelated to your issue, but you might want to fix that typo...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#6 2014-09-12 23:50:51

basdi
Member
Registered: 2012-09-14
Posts: 22

Re: [SOLVED] startx: no keyboard/mouse after upgrade

ok, so that's the issue..

I don't really get how to configure Xorg.wrap.. If I understand it right the default behaviour should work, shouldn't it? So i don't  need to create the /etc/X11/Xwrapper.config file, right?
The Xorg.wrap file is in /usr/bin..

@jasonwryan: Thanks for pointing that typo out!

Offline

#7 2014-09-13 21:11:46

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] startx: no keyboard/mouse after upgrade

Create that config file that tells X to run as root i.e. the old way. If this doesn't help, you can always remove it.
See 'man Xwrapper.config':

cat /etc/X11/Xwrapper.config
allowed_users=anybody
needs_root_rights=yes

I think the default behavior works for opensource drivers.

Offline

#8 2014-09-14 09:24:30

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,304

Re: [SOLVED] startx: no keyboard/mouse after upgrade

karol wrote:

I think the default behavior works for opensource drivers.

It works also with the nvidia driver, but the xorg server is not rootless in this case. The Xorg.wrap binary is intended to detect if the graphical card is kms compatible, and if not, it doesn't drop its setuid bit before launching the Xorg.bin server.
I use the proprietary nvidia driver without a Xwrapper.config file; so in normal case it should not be necessary.

Offline

#9 2014-09-15 17:13:07

basdi
Member
Registered: 2012-09-14
Posts: 22

Re: [SOLVED] startx: no keyboard/mouse after upgrade

Hey!

It worked with the Xwrapper.config file! Thank you very much! I had read the manual of Xwrapper config and thought the default config would be the correct one as I log in as a user in a physical console first if I understand that right... Or maybe the autodetect doesn't work  because of the two graphic cards.

@barbae: Maybe it is because of Bumblebee then...

Marking as solved...

Thanks as again!

Offline

Board footer

Powered by FluxBB