Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in server blank/black screen, "invalid instruction" error
View unanswered posts
View posts from last 24 hours

Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message

Joined: 21 Dec 2015
Posts: 1

PostPosted: Mon Dec 21, 2015 6:45 pm    Post subject: server blank/black screen, "invalid instruction&q Reply with quote


Well, I don't know if this message is ok in "Installing Gentoo", if not please move to the right place.

I installed Gentoo, after all done, I installed a desktop and a login manager and configured to automatically login to graphical mode.

After restarting, I got to a blank/black screen.

Reading the log file (/var/log/, I saw an error related with invalid instruction, as I changed my CFLAGS to be "-O3 -march=haswell --fomit-frame-pointer", I tough that it may be the problem, so I "googled" how to change CFLAGS per package, then I followed the instructions from here and then changed the CFLAGS to be CFLAGS="-O2 -march=haswell" for the package x11-base/xorg-server , did emerge xorg-server again and all went well.

To be able to enter the system in text mode, when starting the system, in grub, I pressed 'e' for edit, moved to the end of the linux line, and after the last word ('ro' in mine) I put the number 1 (for single mode) and then pressed CTRL-X (to boot), so I can get a text mode login in the system so I can do the edition and recompilation of X server.

I'm writing this message so if someone have the same error in future can use this as a reference.

I'm using Gentoo inside a VirtualBox vm in Mac OS X, so I think the problem is related with the "talk" between the driver and the VirtualBox "fake" interface, I don't know, but changing the CFLAGS worked.

Thank you.
Back to top
View user's profile Send private message

Joined: 05 Jul 2003
Posts: 45825
Location: 56N 3W

PostPosted: Mon Dec 21, 2015 7:42 pm    Post subject: Reply with quote


Welcome to Gentoo.

-O3 is known to produce broken code, so it should only be used

a) On packages you don't mind being broken.
b) On packages where it is known to produce correct results.

Even in cases where -O3 does work, it may produce a slower executable than -O2.
This because the optimisations enabled by -O3 can make the code get bigger in the quest for speed, by eliminating branches.
The down side of bigger code is that it may no longer fit in your CPU cache RAM.
The cache RAM runs at the CPU core speed. The code that has been displaced has to be refetched from much slower main memory.
Its an effect called cache thrashing.

In a multi tasking environment, the bigger tasks displace one another, from the cache, so there may be a noticable slowdown going from -O2 to -O3.
It all depends no the size of the CPU cache and the size of the working set.


Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum