You are not logged in.
Pages: 1
When I execute startx in a tty, my system freezes.
This is how it looks like.
Running Xorg using xinit works, but "loginctl show-session $XDG_SESSION_ID" returns Active=no and there are permission issues with systemd.
"sh -x startx" shows that startx freezes on
xinit /home/moritz/.xinitrc -- /etc/X11/xinit/xserverrc :0 vt2 -keeptty -auth /tmp/serverauth.fr61p0m1GO
So I tried running (I am on tty2)
xinit /home/moritz/.xinitrc -- /etc/X11/xinit/xserverrc vt2
but the result is the same - the system freezes.
If I run
xinit /home/moritz/.xinitrc -- /etc/X11/xinit/xserverrc -keeptty
, dwm starts, but it doesn't respond to my mouse and keyboard at all.
This is my .xinitrc:
#!/bin/sh
if [ -d /etc/X11/xinit/xinitrc.d ]; then
for f in /etc/X11/xinit/xinitrc.d/?*.sh; do
[ -x "$f" ] && . "$f"
done
unset f
fiexec dwm
I have the same issue on my laptop, so there must be a configuration error somewhere.
The xorg.conf is generated by nvidia-settings on my desktop and by "X -configure" on my laptop.
Last edited by Birdy14 (2020-07-21 15:52:49)
Offline
Generating an Xorg config that you likely don't need will just lead to brokeness.
Last edited by jasonwryan (2020-07-20 15:47:21)
Offline
Generating an Xorg config that you likely don't need will just lead to brokeness.
I just renamed my xorg.conf, but the problem stays the same
Offline
Please post the contents of Xorg.log and the output of `lspci | grep -e VGA -e 3D`
Offline
Please post the contents of Xorg.log and the output of `lspci | grep -e VGA -e 3D`
Output of `lspci | grep -e VGA -e 3D`:
27:00.0 VGA compatible controller: NVIDIA Corporation GP106 [GeForce GTX 1060 6GB] (rev a1)
/var/log/Xorg.0.log: https://gist.github.com/Birdy2014/af17a … xorg-0-log
Last edited by Birdy14 (2020-07-20 20:11:30)
Offline
What is the output of:
dmesg
ps -ly -C XorgLast edited by loqs (2020-07-20 18:40:44)
Offline
What is the output of:
dmesg ps -ly -C Xorg
Output of "dmesg" (while Xorg is not running): https://gist.github.com/Birdy2014/af17a … file-dmesg
Output of "ps -ly -C Xorg" (while Xorg is running using "xinit"): https://gist.github.com/Birdy2014/af17a … -ly-c-xorg
Last edited by Birdy14 (2020-07-20 18:55:27)
Offline
By stuck the system is unresponsive and you have to perform a hard reboot? What is the end of the journal from a stuck boot?
Offline
By stuck the system is unresponsive and you have to perform a hard reboot? What is the end of the journal from a stuck boot?
Yes, the system is unresponsive after running startx and I have to perform a hard reboot.
This should be the journal from the boot running startx: https://gist.github.com/Birdy2014/af17a … le-journal
Offline
The posted Xorg log is actually a dmesg?
Wild guess, try passing "nvidia-drm.modeset=1" to the kernel.
Offline
The posted Xorg log is actually a dmesg?
Wild guess, try passing "nvidia-drm.modeset=1" to the kernel.
I corrected the link to the Xorg log and will try the nvidia-drm.modeset=1 now.
Offline
Seems to happen when the vesa driver is loaded.
Why is xf86-video-vesa installed itfp?
Offline
Seems to happen when the vesa driver is loaded.
Why is xf86-video-vesa installed itfp?
I think xf86-video-vesa was still installed from when I (unsuccessfully) tried vga passthrough. Uninstalling it didn't change anything.
Adding "nvidia-drm.modeset=1" to the kernel command line caused the screen to go blank for a second after running startx.
Offline
Updated xorg log?
Offline
Updated xorg log?
I just deleted all Xorg logs under /var/log/Xorg* and .local/share/xorg/ and ran startx.
After the hard reboot, there was only an empty file under /var/log/Xorg.0.log.
So apparently xorg doesn't generate any log file when startx fails and the original Xorg.0.log that I posted was from a successful start using "xinit".
This is the new Xorg.0.log from "xinit".
Offline
If xinit works but startx doesn't it's not a problem w/ the server (despite you re-added the nvidia-xconfig generated config file… and w/o "nvidia-drm.modeset=1")
For completeness: do you use the same VT?
https://wiki.archlinux.org/index.php/Xinit#xserverrc
Also: do you just run "xinit" resp. "startx" or do you pass some arguments?
stat /bin/sh
type startx
type xinitOffline
If xinit works but startx doesn't it's not a problem w/ the server (despite you re-added the nvidia-xconfig generated config file… and w/o "nvidia-drm.modeset=1")
For completeness: do you use the same VT?
https://wiki.archlinux.org/index.php/Xinit#xserverrcAlso: do you just run "xinit" resp. "startx" or do you pass some arguments?
stat /bin/sh type startx type xinit
I use the default xserverrc, which doesn't specify any vt. When I run startx (without arguments), it tries to use the same vt, which fails.
Running xinit (also without arguments) uses the next free vt, which works.
When I start the X server on any different vt than the current one, everything works fine.
But this is not a permanent solution, because systemd has permission problems when the X server is started on another vt.
Last edited by Birdy14 (2020-07-21 07:29:52)
Offline
I just managed to log into my computer using ssh while it was stuck (I executed "startx" without any arguments).
After I killed the Xorg process, the system worked again normally and I got an Xorg log!
Here it is: https://gist.github.com/Birdy2014/af17a … xorg-1-log
It says that is disabled the keyboard and mouse and it just stops after loading the nvidia driver, do you have any idea why?
Offline
I used ssh to attach gdb to the frozen Xorg process and it says:
Program received signal SIGTTOU, Stopped (tty output).
0x00007fb976f71f48 in tcsetattr () from /usr/lib/libc.so.6
I have no idea what that means, but it didn't occur on a successful start of Xorg using xinit.
Apparently this signal can be ignored using "stty tostop", which suppressed any output of Xorg. Instead, it said
waiting for X server to begin accepting connections .
Then it printed a lot of dots until it finally gave up:
xinit: giving up
xinit: unable to connect to X server: Connection refusedwaiting for X server to shut down ..........
xinit: X server slow to shut down, sending KILL signalwaiting for X server to die ...
xinit: X server refuses to die
Offline
Please don't bump - if noone has responded, just edit your previous post.
keybpard and mouse are diabled, because nvidia-xconfig writes a config full of cruft (and the kbd and mouse drivers aren't available or even maintained anymore) - that's insignificant.
If you attach gdb to a process, the latter will stop. You'll have to tell gdb to "continue" to … well, guess what ;-) - so this is normal as well (unless the process is actually stopped *before* you attach gdb)
The interesting aspect is that you cannot re-use the VT and the log stops when loading the nvidia driver.
1. remove the xorg.conf
2. add "nvidia-drm.modeset=1" to the kernel (if you think it should be there: it's not. You likely have to recreate grub-mkconfig or add it at the command line)
3. https://wiki.archlinux.org/index.php/GR … ramebuffer (nvidia doesn't officially support framebuffer consoles)
Offline
Please don't bump - if noone has responded, just edit your previous post.
keybpard and mouse are diabled, because nvidia-xconfig writes a config full of cruft (and the kbd and mouse drivers aren't available or even maintained anymore) - that's insignificant.
If you attach gdb to a process, the latter will stop. You'll have to tell gdb to "continue" to … well, guess what ;-) - so this is normal as well (unless the process is actually stopped *before* you attach gdb)The interesting aspect is that you cannot re-use the VT and the log stops when loading the nvidia driver.
1. remove the xorg.conf
2. add "nvidia-drm.modeset=1" to the kernel (if you think it should be there: it's not. You likely have to recreate grub-mkconfig or add it at the command line)
3. https://wiki.archlinux.org/index.php/GR … ramebuffer (nvidia doesn't officially support framebuffer consoles)
Sorry for bumping, I won't do it again.
When debugging with gdb, it stopped with the mentioned message before attaching and after I tried to continue. That's why I mentioned that it worked fine on a working Xorg (started with xinit).
I followed your suggestions (and yes, I did recreate the grub config and edited the grub boot entry when trying 2. previously), but the result was the same as when I tried 2 before:
The screen went blank for a second, the message from Xorg returned and any input from keyboard and mouse is ignored.
"GRUB_TERMINAL_OUTPUT=console" was uncommented in my /etc/default/grub anyway.
I also tried reinstalling xorg-server, xorg-xinit and nvidia, but that didn't change anything.
Edit: When "nvidia-drm.modeset=1" is set, I can't even start Xorg using xinit:
parse_vt_settings: Cannot open /dev/tty0 (Permission denied)
Maybe I should just reinstall Arch...
Last edited by Birdy14 (2020-07-21 14:11:30)
Offline
'key so Xorg gets a SIGTTOU and stops.
Let's play w/ xinit:
Use the xserverrc to re-use the terminal. See what happens.
Also try the "-keeptty" and "-quiet" parameters (before the -nolisten… switch) to see whether they've any impact.
(Obviously start X11 w/ xinit, not startx)
Edit: the error is because you're running Xorg rootless but don't re-use the VT.
Re-installing is unlikely to cause a difference. This isn't windows.
Last edited by seth (2020-07-21 14:22:36)
Offline
'key so Xorg gets a SIGTTOU and stops.
Let's play w/ xinit:
Use the xserverrc to re-use the terminal. See what happens.
Also try the "-keeptty" and "-quiet" parameters (before the -nolisten… switch) to see whether they've any impact.(Obviously start X11 w/ xinit, not startx)
Edit: the error is because you're running Xorg rootless but don't re-use the VT.
Re-installing is unlikely to cause a difference. This isn't windows.
I just re-installed Arch on my desktop and that solved the issue.
The reason was probably because I broke something when I tried vga passthrough.
Anyway, thank you very much!
Edit: I found the real reason: I had symlinked /usr/bin/sh to zsh, because I thought that any bash compatible shell could be used and I used zsh. Apparently this breaks startx.
Last edited by Birdy14 (2020-07-21 17:43:42)
Offline
Pages: 1