You are not logged in.
Hey all,
I just installed Arch for the first time this weekend, and I'm trying to get to where I can run X reliably. Here's where I'm at:
When I login as root, and run startx, it works as expected. It launches xterm with three little windows, my mouse works, everything seems fine.
The output is: http://pastie.org/private/0ej2tfss5p0tdjtaqdzhhq
And /var/log/Xorg.0.log: http://pastie.org/private/wrulq3tbf9kmnshtrotsg
When I login as my user and then run it, it doesn't work. The screen flickers, and then X crashes before I see anything. Redirecting the output to a file isn't working, and hoarks my terminal, so here's the only output line that looks interesting:
xf86EnableIOPorts: failed to set IOPL for I/O (Operation not permitted)
And ~/.local/share/xorg/Xorg.0.log: http://pastie.org/private/0aacsqquwojcruobulrsow
It seems like a permissions issue, but I don't want to just start messing around without understanding a bit better. Also, I am able to adjust the backlight manually with calls to setpci. Trying to run xrandr with any parameters just yields 'Can't open display'. (Regardless of user)
/etc/X11/xorg.conf: http://pastie.org/private/bmwjdjsm20hccyp8asixsa
I'm on a Lenovo IdeaPad that I picked up at a garage sale, it was running Windows XP just fine previously. Output of lspci -k: http://pastie.org/private/blqm5eannk0wyie84wyma
I've run pacman -Syu today, everything is up to date. I installed the intel video driver, as recommended in the wiki. I've tried a few different things that I've found in similar posts, but nothing has worked. I haven't been able to find anyone else with the exact same problem.
I tried to do as much as I knew how on my own, and I'm feeling stuck now. Has anyone seen this before?
Last edited by drautb (2014-08-06 03:04:06)
Offline
Have you tried without /etc/X11/xorg.conf ?
Personal website: reboot.li
GitHub: github.com/rebootl
Offline
Welcome to the forums - great first post by the way (logs, and relevant info presented).
I second rebootl's recommendation. Xorg.conf files are generally not needed in arch, and they can as often cause problems as they would solve them. There are some cases where they are helpful or even needed, but always try to start clean and only add what you absolutely need.
As an additional workaround, this is almost certainly not due to the recent change in Xorg being run as a non-root user now, but that change might provide both a workaround and a way of getting another data point given that running startx as root works. If you follow `man Xorg.wrap` it may avoid the issue as the Xserver will run as root (but you'll be logged in as a regular user).
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Thanks, Trilby and rebootl, that's one piece of info that I forgot to mention. Intially, I wasn't using an xorg.conf file. The same error occurred, only it was using acpi0_backlight instead of intel_backlight. I thought that was the problem, and that if it tried to use intel_backlight, it would succeed. I grabbed the example xorg.conf, and then specified the intel_backlight, hoping it would fix it. Obviously, it didn't.
I'll try again without xorg.conf, just to double check. If that doesn't change anything, I'll look into the Xorg.wrap suggestion and report the results. Thanks for the help!
Offline
Ok, removing xorg.conf didn't change anything, so I tried running Xorg.wrap. It still fails, but now the error is this:
xf86OpenConsole: Cannot open /dev/tty0 (No such file or directory)
Full output: http://pastie.org/private/xclmwmr4petbohyfmekmtq#96
I'm still googling that error, trying to understand why that would happen. If you recognize it though, I'll take any pointers. Thanks!
Offline
Are you using a custom kernel? I've had a look online regarding your error and it can be caused by hardening kernel security. Another thing to check is the permissions of xorg to see if setuid is working. Another thing to try is using a DM and seeing if that works as that would also indicate a permission issue. From my look at the forums, running chmod u+s on /usr/bin/xorg seems to do the trick for both errors you've pointed out (which resolves the setuid issue). Before changing the permissions though, run a ls -l on the file to show us the current permissions.
Last edited by basica (2014-08-05 04:43:00)
Offline
You said you tried "running" Xorg.wrap but did you also set up /etc/X11/Xwrapper.config? Look at "man Xorg.wrap".
Personal website: reboot.li
GitHub: github.com/rebootl
Offline
You said you tried "running" Xorg.wrap but did you also set up /etc/X11/Xwrapper.config? Look at "man Xorg.wrap".
The man page said that the wrapper file could be used to override options, but not that it was required, so I didn't set one up initially. When you asked about it, I tried setting one up that just specifies 'anybody' for the 'allowed_users' key. The error remained.
Are you using a custom kernel?
I shouldn't be...I just used the latest .iso and installed the base system, plus the video driver, X, etc.
Another thing to try is using a DM and seeing if that works as that would also indicate a permission issue.
I wasn't planning on installing a DM, but I'll try it and see if it works and then post a report.
From my look at the forums, running chmod u+s on /usr/bin/xorg seems to do the trick for both errors you've pointed out (which resolves the setuid issue). Before changing the permissions though, run a ls -l on the file to show us the current permissions.
Output of ls -l /usr/bin/X*: https://gist.github.com/drautb/7a76081005e49fec91d6
Then I ran chmod u+s /usr/bin/Xorg. New ls output: https://gist.github.com/drautb/22f70334899d93266655
The error remained, so I tried it again after chmod u+s /usr/bin/Xorg.bin too. https://gist.github.com/drautb/190b2ca26b98e8151a19
The screen goes dark. I tried Ctrl+alt+bkspc, and a couple of other shortcuts, but the screen stays dark. I end up just rebooting.
I noticed another distinction that I hadn't mentioned yet: startx works only if I actually login to the system as root. If I login as my user, and then do sudo startx, I get the blank screen too.
Last edited by drautb (2014-08-05 12:13:30)
Offline
The man page said that the wrapper file could be used to override options, but not that it was required, so I didn't set one up initially. When you asked about it, I tried setting one up that just specifies 'anybody' for the 'allowed_users' key. The error remained.
That's only one of the two entries - and not the important one. If you are going to configure Xorg.wrap to run X the old way you need to set needs_root_rights = yes.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Ok, thanks for clarifying that. I added needs_root_rights = yes to the config, but the error remained. I tried repeating the steps I followed to change the permissions on the binaries as well, the results were the same.
Last edited by drautb (2014-08-05 12:38:29)
Offline
As for the chmods you did, I don't think that's how it should be now.
Neither Xorg, nor Xorg.bin should have the suid bit (chmod u+s) set. But instead Xorg.wrap should have it:
# ls -l /usr/bin/Xorg*
-rwxr-xr-x 1 root root 277 Jul 31 13:54 /usr/bin/Xorg
-rwxr-xr-x 1 root root 2245256 Jul 31 13:54 /usr/bin/Xorg.bin
-rwsr-xr-x 1 root root 10504 Jul 31 13:54 /usr/bin/Xorg.wrap
I don't understand why it wasn't set up like this, on your system, in the first place...
Could you try it with these above rights.
Last edited by rebootl (2014-08-05 13:00:52)
Personal website: reboot.li
GitHub: github.com/rebootl
Offline
I had about the same issue.
I solved this issue just by installing xf86-video-modesetting
Offline
I don't understand why it wasn't set up like this, on your system, in the first place...
It may have been, one of the posts I found before posting here was this one, which also suggests changing the permissions on Xorg. I probably changed it when I found that, and then reset all three to 755 when it didn't work.
Setting the rights the way you specified yields a blank screen, it looks like it's still a permissions issue?/var/log/Xorg.0.log
I had about the same issue.
I solved this issue just by installing xf86-video-modesetting
I didn't have this package installed, however installing it doesn't appear to change anything. I still get the dark blank screen when I use Xorg.wrap, and startx still fails with the /dev/tty0 error.
Offline
one of the posts I found before posting here was this one
Oh Jesus ... Good work on searching for previous relevant threads - but always check the date. That was over 6 years ago none of that is relevant now and reading it I suspect that was a foolish idea back then too, but it's hard to say, maybe that was reasonable at the time.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
At the risk of repeating myself, have you tried without /etc/X11/xorg.conf this time ?
Edit: (Not sure if this wording can be taken as, but no offense meant.)
Last edited by rebootl (2014-08-05 14:39:38)
Personal website: reboot.li
GitHub: github.com/rebootl
Offline
At the risk of repeating myself, have you tried without /etc/X11/xorg.conf this time ?
Edit: (Not sure if this wording can be taken as, but no offense meant.)
None perceived, none taken. I hadn't tried it without xorg.conf yet. Just now I tried it, and the result was almost the same. With xorg.conf, the screen goes totally black. It looks like the display turns off, but I can't get it back on. Without xorg.conf, the display stays on, but it's still black, with a single underscore in the upper-left corner. (Not blinking, just static.)
Offline
Please post a log of this try as well.
But I start running out of ideas... btw. thanks to basica for the hint towards permissions.
Personal website: reboot.li
GitHub: github.com/rebootl
Offline
No xorg.conf, chmod u+s on /usr/bin/Xorg.wrap, ran Xorg.wrap on terminal. Black screen with single underscore in upper-left corner.
Thanks for everyone's help so far!
Last edited by drautb (2014-08-05 15:20:45)
Offline
Ok, it's really guessing and I fear it won't help but I think you didn't try this config without the xf86-video-modesetting driver. Or then this config with only the xf86-video-modesetting, without xf86-video-intel. In case you try it i'd use 'pacman -Rns ...' to remove the respective one.
Do you have failed units 'systemctl --failed' ?
Maybe the output of 'loginctl' and 'systemctl status'. I can't really do much with them, exept comparing to mine, but maybe someone can...
Personal website: reboot.li
GitHub: github.com/rebootl
Offline
Ok, I tried again with just xf86-video-modesetting installed, (no xf86-video-intel) and then again with just xf86-video-intel. (No xf86-video-modesetting) It didn't seem to change anything, the critical error is still the same.
systemctl --failed didn't list anything.
Do you think this is the kind of thing that might get fixed by a clean install? Or does it smell more like a driver/hardware issue? (Or something else?)
Offline
Above you said you "ran Xorg.wrap" what does that mean exactly? If you did not try to run 'startx' without arguments.
Other than that the ..ctl outputs look fine to me...
Do you think this is the kind of thing that might get fixed by a clean install?
To me, not necessarily, but it's hard to tell.
Personal website: reboot.li
GitHub: github.com/rebootl
Offline
I did this:
# Xorg.wrap
Since you're asking that question...I'm guessing I'm doing it wrong. *blush*
Should I still be using startx, and the wrap happens implicitly based on my Xwrapper.config?
Offline
Should I still be using startx, and the wrap happens implicitly based on my Xwrapper.config?
Yes. Xorg.wrap will be called automatically by Xorg (which is just a shell script now) which will be called by startx LOL , but I don't know if that solves the problem here.
Please try with 'startx' without arguments.
Edit: Forgot to mention Xorg.wrap will then finally call - Xorg.bin. And of course there's a symlink in between from X to Xorg, so yeah, it's extremely ridiculous .
Last edited by rebootl (2014-08-05 20:25:19)
Personal website: reboot.li
GitHub: github.com/rebootl
Offline
LOL is right, sorry about that. I just tried startx with and without my xorg.conf file. The errors have gone away, but X still terminates prematurely...I'm not sure why.
Here's the shell output when I ran startx with xorg.conf: https://gist.github.com/drautb/d0f736ee259a232f0717
It's pretty much the same without xorg.conf, the config file line disappears. Sorry again for the Xorg.wrap confusion, thanks for being patient with me.
Offline
That looks quite good, I think we're almost there...
Do you have a ~/.xinitrc ? If yes what's in there ?
https://wiki.archlinux.org/index.php/Startx
Personal website: reboot.li
GitHub: github.com/rebootl
Offline