# [SOLVED] evdev disaster?

## fourth

As a windows person I was used to running an OS with loads of crap I didn't need, disabling it and then findout out ... Oh yeah, -of course install shield wizards need DCOM-, then re-enabling it again. It;a a reason I prefer gentoo over all other OS's... I just just have a system that only has the bit I want. 

So... while trying to resolve a blocked package and looking over my make.conf I see evdev after keyboard and mouse. Thinking... I don't know what evdev is, but all I have is a keyboard and mouse. Lets drop it and recompile... 

 :Sad: 

Now I have no mouse nor keyboard. Yes, I bothger to read https://wiki.gentoo.org/wiki/Evdev *now*  :Smile: 

Question : 

What's the simplest way to get my mouse back. Do i booot the gentoo cd, chroot, edit make and rebuild anything that wants a build?Last edited by fourth on Thu Oct 22, 2015 8:29 pm; edited 1 time in total

----------

## khayyam

 *fourth wrote:*   

> What's the simplest way to get my mouse back. Do i booot the gentoo cd, chroot, edit make and rebuild anything that wants a build?

 

fourth ... you shouldn't need to boot from the CD, simply switch to a TTY (console) using 'CTL-ALT-F2, login, add 'evdev' to INPUT_DEVICES (in make.conf) and 'emerge --changed-use @world' (which should pull in x11-drivers/xf86-input-evdev).

HTH & best ... khay

----------

## Tony0945

Basically "Yes". If I understand you, you are booting to a GUI logon screen and can't logon and CTRL-ALT-F1 doesn't work.

In the future, having a grub choice to boot into the shell is handy for recovery.

If your network is set up, you can probably ssh in from another computer and remove your X display manager from the boot process. For example, "rc-update del xdm" or "rc-update del gdm" or what have you.  I forget the syntax to boot to a shell. I've locked myself out experimenting many times but i have a networked computer on every floor. My only problem is carrying my old bones up and down the stairs. Someday I'll learn how to ssh from a Smart Phone.  You can reboot from the ssh session also.

If you only have a Windows computer on the ntework, PuTTY (sic) for Windows is available here:http://www.putty.org/

I seriously recommend one or all of these recovery options. It's not nice to reboot by power button, although Linux has fewer files open and unflushed than Windows.

Emerge will probably find the correct drivers to rebuild but if you have app-portage/portage-utils installed, this definitely will do the trick (after editting make.conf) 

```
emerge -1 $(qlist -IC x11-drivers)
```

EDIT:  Hah!, Khay, a photo finish.

----------

## fourth

Thanks for the quick response guys. 

Since this is the only linux machine in the house I didn't bother installing sshd. I will look in to a Console off the grub screen. Sounds like the kind of thing I'll need  :Smile: . I was playing with make.conf because I was trying to fix another problem i created, in enabling accept_keywords="~x86" to get some package working... without knowing what that really did... Once I found out I tried to disable it, but had a lot of trouble trying to get rid of all the unstable packages that were clashing with the stable requirements. I finally got there this morning, rebooted and well...  :Smile: 

I did try and open a TTY BTW... but I'm pretty sure I have no keyboard as well... 

I tend to learn faster when I break things, so I'll take this as a good thing  :Smile: 

----------

## khayyam

 *Tony0945 wrote:*   

> I forget the syntax to boot to a shell. I've locked myself out experimenting many times [...]

 

Tony ... adding 'softlevel=single' to your kernel parameters should get you to single user mode. I'd generally recommend not adding services to 'default' but creating a 'stacked' runlevel from default ... so then you can have a boot entry with 'softlevel=default' and boot to the console.

First remove all but the necessary services from 'default', then create a 'stacked' runlevel (here called 'x11') ...

```
# rc-update del xdm default

# rc-update -s add default x11

# rc-update add xdm x11
```

You then add 'softlevel=x11' to your boot parameters ...

HTH & best ... khay

----------

## khayyam

 *fourth wrote:*   

> I did try and open a TTY BTW... but I'm pretty sure I have no keyboard as well...

 

fourth ... CTRL+ALT+F1 should work whether the x11 keyboard is functioning or not. If you can't get a tty then the above advice should work the same if chroot'ed.

 *fourth wrote:*   

> I tend to learn faster when I break things, so I'll take this as a good thing :)

 

Its nothing serious in this case ... its easy to fix.

best ... khay

----------

## John R. Graham

 *khayyam wrote:*   

> ... CTRL+ALT+F1 should work whether the x11 keyboard is functioning or not.

 It never has for me. If it really does for you, did you do anything special to set it up that way? (This is one of the reasons that I always have sshd running as chrooting is a bit of a pain.)

fourth, I think you need to recalibrate your adjectives. If this is a disaster, then what will a really serious problem be? An apocalypse? A cataclysm? An extinction level event? In my mind, yours barely qualifies as a stumble.  :Wink: 

- John

----------

## NeddySeagoon

fourth,

Its just a Gentoo learning experience.  Its that sort of thing that maintains our interest.

Help out on the Forums ... it saves you breaking your own install  :)

----------

## khayyam

 *John R. Graham wrote:*   

>  *khayyam wrote:*   ... CTRL+ALT+F1 should work whether the x11 keyboard is functioning or not. 
> 
> It never has for me. If it really does for you, did you do anything special to set it up that way? (This is one of the reasons that I always have sshd running as chrooting is a bit of a pain.)

 

John ... honestly, I've never tested, or had reason to, I'd always assumed it was something other than X11 providing this as the switch from tty1 to another tty is likewise CTRL+ALT+F{n}. Anyhow, no, I've never configured this explictly, though my kbd is configured via /etc/X11/xorg.conf.d/10-keyboard.conf and not via evdev (if that has any bearing ... unlikely).  

 *John R. Graham wrote:*   

> fourth, I think you need to recalibrate your adjectives. If this is a disaster, then what will a really serious problem be? An apocalypse? A cataclysm? An extinction level event? In my mind, yours barely qualifies as a stumble. ;)

 

In such a situation there is always option to prefix the adjective with 'mega' ;)

best ... khay

----------

## szatox

 *Quote:*   

> via /etc/X11/xorg.conf.d/10-keyboard.conf and not via evdev (if that has any bearing ... unlikely)

 evdev is a driver, you can have your 10-keyboard.conf and still use, those 2 don't imply nor exclude each other.

----------

## Irre

 *fourth wrote:*   

> Since this is the only linux machine in the house I didn't bother installing sshd.

 If you have a Windows machine, you should. On Windows there is an excellent program "putty" to install and run   :Very Happy: 

----------

## Tony0945

 *Irre wrote:*   

>  *fourth wrote:*   Since this is the only linux machine in the house I didn't bother installing sshd. If you have a Windows machine, you should. On Windows there is an excellent program "putty" to install and run  

 

I linked to it above.

----------

## Irre

 *Tony0945 wrote:*   

> I linked to it above.

 Sorry, I missed that  :Embarassed: 

----------

## Tony0945

 *Irre wrote:*   

>  *Tony0945 wrote:*   I linked to it above. Sorry, I missed that 

 

No problem.  This is good too:  http://sourceforge.net/projects/xming/

----------

## fourth

The full problem:

-I unUSE'ed evdev, removing my usb mouse, touchpad and also the keyboard. This was on a Dell e4300 laptop. 

-bash_profile was set to automatically startX, xinitrc started lxde, and I have the system set to logon automatically as well. 

-The system then ran right through to a dead desktop. No input. No amount of keyboard mashing ctrl\c\esc'ing killed the book process so i could fix it. Even if I change to tty2, I lost that console when x started.

The solution I ended up with:

-Boot Gentoo live CD (note, this is a 2008 live cd from many years back, which built this system fine)

-mounted sda4, and all the proc bits (just in case), as followed from the x86 handbook. 

-chroooted

-fixed make.conf putting evdev back

-emerge world (I did flirt with --changed-use, but I was going to bed anyway, so rebuilt the lot. I also --sync'ed it first to splice in anything which I'd have to rebuilt anyway. 

-Success!

How do I change the subject to [SOLVED]?

----------

## Tony0945

 *fourth wrote:*   

> How do I change the subject to [SOLVED]?

 

Go to your original post, click the "Edit" button in the upper right and change the title.

----------

## Roman_Gruber

thats the reason why i only boot into init 3. without gui

i log in as root and start lxdm -d; and set up my network also everytime. old proven habit.

the x-server is just one application as any other. as linux lacks a decent file manager, I still use cli for basic manipulations. I gave up on file managers since gnome 2 was removed. 

you may also set the openrc boot process as interactive in the configs, when you use openrc.

----------

## chithanh

for the record, an easier way would have been to switch the keyboard back to raw mode with Magic SysRq (Alt+SysRq+R) and then Ctrl+Alt+F1 to console.

----------

## Tony0945

 *chithanh wrote:*   

> for the record, an easier way would have been to switch the keyboard back to raw mode with Magic SysRq (Alt+SysRq+R) and then Ctrl+Alt+F1 to console.

 

That's fantastic! But I don't have a key marked SysRq. Do you mean the Windows Key? Sorry to talk dirty but that's how it's marked on the keyboard with a little Microsoft Windows icon. There are really two of them, each next to an ALT key. Are they both the same? I've never used them, even on Windows.

----------

## steveL

 *fourth wrote:*   

> -bash_profile was set to automatically startX, xinitrc started lxde, and I have the system set to logon automatically as well.

 

Usually we'd run xdm from openrc, as khayyam outlined above (in default runlevel.)

Obviously you can do anything you like; this is Gentoo after all. ;)

 *Quote:*   

> How do I change the subject to [SOLVED]?

 

Just click the 'edit' button in the top-right of the original post, and amend the Subject line.

----------

## chithanh

 *Tony0945 wrote:*   

> That's fantastic! But I don't have a key marked SysRq. Do you mean the Windows Key?

 No, I mean the SysRq key, which is usually the same as the PrintScreen key.

I may look different depending on your keyboard. Some examples:

http://i.imgur.com/9EQdq.jpg

http://www.wdic.org/proc/plug/TECH/sysrq.jpg

----------

## Tony0945

 *chithanh wrote:*   

> [No, I mean the SysRq key, which is usually the same as the PrintScreen key.

 

Thanks! I do have a Printscreen key and as I recall other keyboards sometimes it says Printscr/sysrq, but mine just says Printscreen, possibly because it's a Microsoft keyboard.  I preffered my orginal keyboard that I bought at Fry's for $5 when I first built the computer but after about 7 years of heavy use, the ink had worn off the key caps. I never did learn to touch type but one of my former bosses said I was the fastest typist he had seen that used just two fingers.

I will try this when I go back to trying mdev instead of eudev. I had quit because I kept losing keyboard and mouse, although I could ssh in.

----------

## NeddySeagoon

SysRq needs kernel support and is a security risk if its enabled.

----------

## Tony0945

 *NeddySeagoon wrote:*   

> SysRq needs kernel support and is a security risk if its enabled.

 

Do you mean physical security?  No one has physical access but me and my wife and I'm not sure she knows where the power button is. I only worry about network security. Enlighten me if I have my head in the sand. I can see that it's different with a laptop or a computer that a smart kid or his friends have access to.

----------

## NeddySeagoon

Tony0945,

SysRq requires physical access to the console.

The kernel interprets SysRq directly.  It can do lots of things besides switching the keyboard to raw mode.

If you are happy with your physical security, thats good enough.

----------

## depontius

 *NeddySeagoon wrote:*   

> 
> 
> If you are happy with your physical security, thats good enough.

 

I have a similar attitude on physical security.  The stuff is in my house.  If someone else has physical access, it means that there's an intruder, and THAT is the far bigger problem.

----------

