You are not logged in.

#1 2021-10-24 02:54:50

john12345678
Member
Registered: 2021-10-24
Posts: 7

[SOLVED] Keyboard and mouse not woking after startx only in tty1

My keyboard and mouse stop working after I execute startx but only in tty1.
I am still able to use for example Ctrl+Alt+F3 to go to tty3 and if I execute startx there it works as expected.
I think the problem appeared after I installed some packages for this https://github.com/TheWaveWarden/SwitchProConLinuxUSB

sudo pacman -S xorg-util-macros
sudo pacman -S lib32-libgudev lib32-libudev0-shim libudev0-shim fox

Probably those packages weren't even the ones needed, I wasn't sure and installed them anyway...

This is my .local/share/xorg/Xorg.0.log: https://pastebin.com/qHppxcQW

Thank you

Last edited by john12345678 (2021-10-24 20:51:25)

Offline

#2 2021-10-24 07:44:46

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,244

Re: [SOLVED] Keyboard and mouse not woking after startx only in tty1

This looks fishy:

[     8.065] (**) |-->Screen "Screen0" (0)
[     8.065] (**) |   |-->Monitor "Monitor0"
[     8.065] (**) |   |-->Device "Device0"
[     8.065] (**) |-->Input Device "Keyboard0"
[     8.065] (**) |-->Input Device "Mouse0"
grep -ri Mouse0 /{etc,usr/share}/X11/xorg.conf*

Online

#3 2021-10-24 19:48:28

john12345678
Member
Registered: 2021-10-24
Posts: 7

Re: [SOLVED] Keyboard and mouse not woking after startx only in tty1

seth wrote:

This looks fishy:

[     8.065] (**) |-->Screen "Screen0" (0)
[     8.065] (**) |   |-->Monitor "Monitor0"
[     8.065] (**) |   |-->Device "Device0"
[     8.065] (**) |-->Input Device "Keyboard0"
[     8.065] (**) |-->Input Device "Mouse0"
grep -ri Mouse0 /{etc,usr/share}/X11/xorg.conf*
$ grep -ri Mouse0 /{etc,usr/share}/X11/xorg.conf*
/etc/X11/xorg.conf:    InputDevice    "Mouse0" "CorePointer"
/etc/X11/xorg.conf:    Identifier     "Mouse0"

Offline

#4 2021-10-24 19:51:42

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,244

Re: [SOLVED] Keyboard and mouse not woking after startx only in tty1

Please post /etc/X11/xorg.conf - though it's likely the nvidia-settings configuration.
Not sure how this could cause the described effects, but the log also lists the input devices present.

Move the file out of /etc and test the result.

Online

#5 2021-10-24 20:01:34

john12345678
Member
Registered: 2021-10-24
Posts: 7

Re: [SOLVED] Keyboard and mouse not woking after startx only in tty1

seth wrote:

Please post /etc/X11/xorg.conf - though it's likely the nvidia-settings configuration.
Not sure how this could cause the described effects, but the log also lists the input devices present.

/etc/X11/xorg.conf: https://pastebin.com/RH9t5L2T

Move the file out of /etc and test the result.

Still same problem

Offline

#6 2021-10-24 20:09:20

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,244

Re: [SOLVED] Keyboard and mouse not woking after startx only in tty1

Thought as much (it's a completely pointless static server config generated by the nvidia tools, please don't restore it)
If any of the packages in #1 could impact this it would be libudev0-shim, but are you maybe running the procon_driver (while this happens)?

Please also post your xinitrc and xserverrc…

Online

#7 2021-10-24 20:24:22

john12345678
Member
Registered: 2021-10-24
Posts: 7

Re: [SOLVED] Keyboard and mouse not woking after startx only in tty1

~/.xinitrc: https://pastebin.com/vCBqDDT6
(displayselect is just a script I wrote in .local/bin that calls xrandr but if you want to see it https://pastebin.com/K947kXk7 )
I don't have a ~/.xserverrc
/etc/X11/xinit/xsserverrc: https://pastebin.com/d60rpSrP

If any of the packages in #1 could impact this it would be libudev0-shim, but are you maybe running the procon_driver (while this happens)?

I executed

bash install.sh

and

sudo ./build/procon_driver

once but it isnt currently running, I dont have it autostart

Offline

#8 2021-10-24 20:28:15

john12345678
Member
Registered: 2021-10-24
Posts: 7

Re: [SOLVED] Keyboard and mouse not woking after startx only in tty1

Replaced the xinitrc with this:

#!/bin/sh

exec xmonad

I can now use the keyboard and mouse after startx in tty1 as expected. I am still not sure what the problem is. (I use xmonad as the window manager in lxqt)

Offline

#9 2021-10-24 20:28:46

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,244

Re: [SOLVED] Keyboard and mouse not woking after startx only in tty1

Don't fork xrandr calls (in this case through a script, but that doesn't matter)
Try to preserve the VT, https://wiki.archlinux.org/title/Xinit#xserverrc

Still not sure how any of this would screw input (only)

Online

#10 2021-10-24 20:34:27

john12345678
Member
Registered: 2021-10-24
Posts: 7

Re: [SOLVED] Keyboard and mouse not woking after startx only in tty1

seth wrote:

Don't fork xrandr calls (in this case through a script, but that doesn't matter)
Try to preserve the VT, https://wiki.archlinux.org/title/Xinit#xserverrc

Still not sure how any of this would screw input (only)

What do you mean by fork xrandr calls?

I found the problem, it was caffeine (https://aur.archlinux.org/packages/caffeine-ng/) Removing it from the xinitrc fixes the problem. Thank you very much! I thought that because it worked in tty3, the xinitrc wouldnt matter.

Last edited by john12345678 (2021-10-24 20:34:44)

Offline

#11 2021-10-24 20:37:16

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,244

Re: [SOLVED] Keyboard and mouse not woking after startx only in tty1

What do you mean by fork xrandr calls?

The trailing ampersand, "&"

Would you actually have to fork caffeine?

Online

#12 2021-10-24 20:47:31

john12345678
Member
Registered: 2021-10-24
Posts: 7

Re: [SOLVED] Keyboard and mouse not woking after startx only in tty1

seth wrote:

What do you mean by fork xrandr calls?

The trailing ampersand, "&"

Would you actually have to fork caffeine?

Ok so caffeine itself isn't the problem. The problem is I forgot to add the & at the end of caffeine...
Now with the same xinitrc I posted, just replacing caffeine with caffeine & it works as expected. Why would this work in other tty but not in tty1? Thanks again, it was my dumb mistake

Offline

#13 2021-10-25 06:39:17

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,244

Re: [SOLVED] Keyboard and mouse not woking after startx only in tty1

"other" or "second" tty?
caffeine's behavior might depend on whether there's a running instance.

Online

Board footer

Powered by FluxBB