Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVE] EFI, GRUB2 and other confusions
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Holysword
l33t
l33t


Joined: 19 Nov 2006
Posts: 946
Location: Greece

PostPosted: Sun Sep 01, 2013 7:59 pm    Post subject: Reply with quote

DONAHUE wrote:
rc_logger="YES" in /etc/rc.conf writes to /var/log/rc.log
does your laptop have a backlight brigtness control?
http://people.skolelinux.org/pere/blog/Fixing_the_Linux_black_screen_of_death_on_machines_with_Intel_HD_video.html may provide useful info

Yes, you are right. The screen is there, its just that the brightness control goes to minimum. I don't know about the solution though, since it uses initramfs and this seems to be a bit of an inconvenient thing in EFI (am I right). Perhaps just disabling backlight in kernel will do the trick?? I never set it to anything other than max anyway!
_________________
"Nolite arbitrari quia venerim mittere pacem in terram non veni pacem mittere sed gladium" (Yeshua Ha Mashiach)
Back to top
View user's profile Send private message
srs5694
Guru
Guru


Joined: 08 Mar 2004
Posts: 434
Location: Woonsocket, RI

PostPosted: Sun Sep 01, 2013 9:24 pm    Post subject: Reply with quote

Holysword wrote:
I don't know about the solution though, since it uses initramfs and this seems to be a bit of an inconvenient thing in EFI (am I right).


It's no easier or harder in EFI than in BIOS; you just pass an "initrd=filename" option to the kernel. All Linux boot loaders and boot managers support this, and some make it very easy. (In particular, rEFInd actively scans for initrd files with version numbers embedded in their filenames, and creates the appropriate kernel option when a matching initrd for the kernel is found.)

The one (very partial) exception to this rule is when you're booting the kernel directly via an efibootmgr entry -- or worse, by launching the kernel using the fallback filename of EFI/BOOT/bootx64.efi. Managing kernel options with this method is a bit awkward (or impossible using the fallback filename), so if you need an initrd with this method, you've got to include the "init=" option as one that's built into the main kernel file at compile time. This is no more awkward than passing the root= option or any other kernel command-line option, though.
Back to top
View user's profile Send private message
Holysword
l33t
l33t


Joined: 19 Nov 2006
Posts: 946
Location: Greece

PostPosted: Mon Sep 02, 2013 5:36 am    Post subject: Reply with quote

The invert_backlight option didn't work for me.
It works in the sense that I get the backlight correctly when booting. However, the booting process uses i915; when I start X, it uses nvidia. It then inverts nvidia also and I get a black screen when starting X.
I have been thinking about a solution; would it work if I run
Code:
echo 0 > /sys/class/backlight/intel_backlight/brightness
echo `cat /sys/class/backlight/acpi_video0/max_brightness` > /sys/class/backlight/acpi_video0/brightness

right during the booting process (without the invert_backlight options)? How could that be achieved?
(backlight cannot be disabled in kernel; it seems to be automatically selected by a certain collection of options).
_________________
"Nolite arbitrari quia venerim mittere pacem in terram non veni pacem mittere sed gladium" (Yeshua Ha Mashiach)
Back to top
View user's profile Send private message
Holysword
l33t
l33t


Joined: 19 Nov 2006
Posts: 946
Location: Greece

PostPosted: Thu Sep 05, 2013 5:32 pm    Post subject: Reply with quote

So, here is what I did.

I created an initscript called invert_brightness
Code:
◢ jarvis ◣ ~ $  cat /etc/init.d/invert_brightness
#!/sbin/runscript
depend() {
        need udev udev-mount
}

start() {
        ebegin "Starting ${SVCNAME}"
        # Put the correct path to the backlight file in here
        echo 0 > /sys/class/backlight/intel_backlight/brightness
        echo `cat /sys/class/backlight/acpi_video0/max_brightness` > /sys/class/backlight/acpi_video0/brightness
        eend $?
}

and then added it to rc-update
Code:
rc-update add invert_brightness sysinit


Now everything works like a charm: udev starts, ruins the backlight for few seconds, then right after that the invert_backlight fires up and fixes it. I don't know if I should call it a solution or a workaround though. Also I don't know if it is a good idea to add stuffs to sysinit or if there is a cleaner way to do it.

Suggestions are still appreciated.

Concerning rEFInd, I installed and it works, efibootmgr shows it there, but I have to manually select its .efi file... perhaps I'm missing something with the paths? (or perhaps I still didn't understand how this works...)
_________________
"Nolite arbitrari quia venerim mittere pacem in terram non veni pacem mittere sed gladium" (Yeshua Ha Mashiach)
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Thu Sep 05, 2013 7:31 pm    Post subject: Reply with quote

if necessary mount the EFI parttion, edit refind.conf.
Quote:
# Set the default menu selection. The available arguments match the
# keyboard accelerators available within rEFInd. You may select the
# default loader using:
# - A digit between 1 and 9, in which case the Nth loader in the menu
# will be the default.
# - Any substring that corresponds to a portion of the loader's title
# (usually the OS's name or boot loader's path).
#
default_selection vmlinuz
As I use vmlinuz as the first word in my gentoo kernel names and rEFInd finds and lists all occurrences of vmlinuz in order of most recent to oldest rEFInd will automatically boot my most recent kernel after the timeout has run.
Quote:
# Timeout in seconds for the main menu screen. Setting the timeout to 0
# disables automatic booting (i.e., no timeout).
#
timeout 20


HTH
_________________
Defund the FCC.


Last edited by DONAHUE on Thu Sep 05, 2013 9:46 pm; edited 1 time in total
Back to top
View user's profile Send private message
srs5694
Guru
Guru


Joined: 08 Mar 2004
Posts: 434
Location: Woonsocket, RI

PostPosted: Thu Sep 05, 2013 9:31 pm    Post subject: Reply with quote

Holysword wrote:
Concerning rEFInd, I installed and it works, efibootmgr shows it there, but I have to manually select its .efi file... perhaps I'm missing something with the paths? (or perhaps I still didn't understand how this works...)


There could be a typo in the "efibootmgr" command you used to register rEFInd (particularly if you did so manually rather than by using the install.sh script); or it could be that it's registered, but not set as the default boot program via the "-o" option to efibootmgr; or you might have a computer that's got a buggy EFI that refuses to launch anything but the Windows or fallback boot loader. For more advice, post the output of the following two commands, both typed as root:

Code:

efibootmgr -v
ls -l `find /boot -iname "*efi"`
Back to top
View user's profile Send private message
Holysword
l33t
l33t


Joined: 19 Nov 2006
Posts: 946
Location: Greece

PostPosted: Thu Sep 05, 2013 9:44 pm    Post subject: Reply with quote

srs5694 wrote:
There could be a typo in the "efibootmgr" command you used to register rEFInd (particularly if you did so manually rather than by using the install.sh script); or it could be that it's registered, but not set as the default boot program via the "-o" option to efibootmgr; or you might have a computer that's got a buggy EFI that refuses to launch anything but the Windows or fallback boot loader. For more advice, post the output of the following two commands, both typed as root:

Code:

efibootmgr -v
ls -l `find /boot -iname "*efi"`

Duh, you were right, there was a typo (refidn instead of refind).
After fixing it works beautifully. Indeed much simpler than GRUB2, I'm glad I can just drop it now!
_________________
"Nolite arbitrari quia venerim mittere pacem in terram non veni pacem mittere sed gladium" (Yeshua Ha Mashiach)
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
Goto page Previous  1, 2
Page 2 of 2

 
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