Xorg works fine with startx, but only when ran the first time.
SlackwareThis Forum is for the discussion of Slackware Linux.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Xorg works fine with startx, but only when ran the first time.
I did a full install of Slackware 11 with kernel 2.4*. Startx does what it's supposed to, but if I go back to tty1 (ctrl+alt+F1), tty7 -- where X should be -- stays black. I have to reboot the computer to have X functional again. If I use startx and close X by exiting Fluxbox, I have to reboot to get X working again. Aside from rebooting, I've tried logging out and logging in again, changing users, etc. Only thing that works is rebooting.
I can reply back with more details about my system if you need, but right now I'm glad if anyone understands this, has experienced this or at leasts reads this. Thanks for any help you provide.
Sorry for my long delay in responding. Thanks for all the replies. I'm excited about figuring this out. To answer your questions:
I'm not using Kdm, but I will if you think it will help. And also I can successfully switch between the screens (tty$), but adding Control to the mix is what I need to do to get to any other tty while in X with fluxbox. Thank you for the suggestion about the modules. I haven't noticed much of a difference in lsmod before, during or after running X. The only difference is this line:
snd-pcm-oss 28928 0
lsmod lists snd-pcm-oss like that during and after running X, but directly after rebooting the line is:
snd-pcm-oss 28928 0 (unused)
I cannot tell if that is a big deal or not. After running X, killing it and not being able to start it again, I tried rmmod -f snd-pcm-oss as root, but X still won't start.
I checked lsmod, but I don't see drm or i810. These modules are what I might need added based on my info from lspci -v ? I ask because the output wasn't very clear for me. I'm going to try loading drm and i810 when I can after I close X and see if it allows me to start it again w/o rebooting. This kernel is stock, though. These modules are best with a newer, custom kernel? I might go that route, as it might help with my dvd burner only burning at 1x.
When you are in console only, you can switch between tty's by using "ALT+F?". WHen X is running you should CTL+ALT+F?.
When you starx from the main tty your X session gets started on the 7th tty (F7), but it is being executed by the first tty. This is why if you go to F1 you get a screen that seems locked. If you want to login to anothe terminal without killing your X session you need to exit the X session using CTL+ALT+F6. This terminal on tty6 is alway alvailable even when X is running (this gets set up in /etc/inittab). From F6 you can login as the same or another user. You can even run another X session from there by using 'startx -- :1'
And you can also exit from there with another CTL+ALT+F6 and login more times the same way.
If you use runlevel 4 the arrangement changes somewhat and depends also on the display manager being used.
To clarify: if you are running X, exiting to tty1 may cause you to get stuck and not be able to get back to your X session. If you exit using F6 then you may be able to safely shift between any tty, including tty1, without any problems.
I'll pass one more tip for using runlevel 4:
If you want to exit from or kill your display manager from an Xsession so that you can get back to runlevel 3 it can be quite difficult. Switching directly from runlevel 4 to 3 may cause your box to hang up. Easy fix -from your X session just run a terminal or whatever and give the command 'init 5' to change to runlevel 5. This will do an orderly exit from runlevel 3 to a console login on runlevel 5, which has the same 'qualities' as runlevel 3 in Slackware. If you really want runlevel 3, do 'init 3' after logging in on runlevel 5.
Thanks. When I am in console only mode I can switch between the tty screens normally, but when I decide to do startx on one of those ttys, I have to stay in tty7 or else I won't be able to go back to tty7. I can go to tty7 and stare at the black screen and I can go back to tty1 (if that's where I ran startx) and look at the X output. To kill X at that point I can go to tty7 and press ctrl+alt+backspace or go to tty1 and press ctrl+c a couple of times. After doing that, X won't work until I reboot. It will start just fine according to the tty1 output, but on tty7 I see only blackness. You're suggesting these problems may be related to my runlevel? I'll that and try starting X from a tty other than 1 when I'm at the point where I can only startx after rebooting.
this tells us that you have an intel i845G chipset (sorry, I presumed you knew that), which _should_ work fine with the i810 driver. I'm also presuming you are using i810 in your xorg.conf?
the X driver will load the drm and the i810 kernel modules as it starts.
on #2 in my sig I use the i915 driver, and when i startx the first time everything is great. but if I exit and try startx again - i get a black screen. I finally figured out that if I rmmod -f these kernel modules then X is happy to start again.
I've never pursued it more than to get it running, but I'm guessing the chipset/wm fails to restore/clear something on exiting that the kernel modules are using and so when X tries to either re-load or use them again they are not working.
These modules are best with a newer, custom kernel?
usually, most kernel revisions 'improve' things. compiling your own kernel is very rewarding and IMHO the cornerstone of running linux. if you haven't done it before, its really not as tough as you might think. check my sig for a straightforward tutorial.
I'm saying you shouldn't go to tty1 when X is running -you can't do anything there anyway. If you need to get to a console terminal go to tty6 , but alway use CTL+ALT+F? to move around when X is running and not just AL+F?
This might be the silly question of the day, but which Alt key are you using?
With the standard default keymaps, in console mode the Right Alt key does not function the same as the Left Alt key. In console mode with standard keymaps the Right Alt key is called the AltGr key and is a super modifier key. When you are in X then both Alt keys serve the same function because the desktop environment controls the keyboard. So if you press the Right Alt key along with Ctrl and Fx to toggle to a console, but then use the same Right Alt key to return to X, nothing happens. If you use the Right Alt key with a standard keymap then the Alt-Fx combination fails to toggle consoles. Try using the Left Alt key to return to X.
If this trick works for you, don't feel stupid. Most people who are unfamiliar with 'nix are never told about the AltGr function of the Right Alt key and because the majority of users coming from Windows work mostly with the GUI, they never learn this Grand Pooba secret because the Right Alt key in the GUI works the same as the Left Alt key.
Thanks for the alt key warnings. I can successfully switch between the ttys, and I always us the left one. I used to wonder why the right ALT doesn't work the same, and now I know. And thanks for the warning about going into the tty you started X from. I normally would not go the tty startx was started from, but I do go there to check on the status of prozilla when it's called by firefox or to see different messages from X and Fluxbox.
bioe007: This is the newest computer I've ever owned, and although I've been running slack since about 2004, it has only been on a very basic p3 with very little hardware tweaking needed. Thanks for the info on the drivers. Looking at xorg.conf, it looks like those drivers aren't being utilized:
Vesa is familiar to me, as I use to use the -vo vesa switch as root long ago to watch videos with mplayer in full screen in the the console, without X. I saw in xorg.conf's man page that i810 has it's own man page (that's cool). In the i810 man page I see that I can switch the driver from vesa to i810. Looks like it just automatically uses DRI as long as it's in depth 16. I'm not familiar with how to check my current depth, though. You're getting me hype about compiling my own kernel, man. I will pursue that after verifying whether or not editing xorg.conf with i810 instead of vesa works, as compiling will probably help with mighty slow dvd burning, connecting the psp/thumbdrive, etc.