WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [SOLVED] Can't start X when booting from Grub on USB stick  (Read 10225 times)

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14849
Re: Can't start X when booting from Grub on USB stick
« Reply #15 on: February 27, 2020, 01:36:37 AM »
Do you have either very old or very new graphics hardware?

Do you know the exact name of your graphics hardware (for example intel hd 4200)?

Offline mrjake2

  • Newbie
  • *
  • Posts: 35
Re: Can't start X when booting from Grub on USB stick
« Reply #16 on: February 27, 2020, 03:20:18 AM »
Do you have either very old or very new graphics hardware?

Do you know the exact name of your graphics hardware (for example intel hd 4200)?

My hardware is Intel HD Graphics 620.  Not especially old or new - it's a laptop I bought at the beginning of 2019, but it looks like that graphics hardware has been around since 2016.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14849
Re: Can't start X when booting from Grub on USB stick
« Reply #17 on: February 27, 2020, 03:34:19 AM »
The arch wiki recommends not using “nomodeset” or “vga=“ when using xf86-video-intel.

See: https://wiki.archlinux.org/index.php/Intel_graphics
« Last Edit: February 27, 2020, 03:41:26 AM by Juanito »

Offline mrjake2

  • Newbie
  • *
  • Posts: 35
Re: Can't start X when booting from Grub on USB stick
« Reply #18 on: February 27, 2020, 01:16:03 PM »
The arch wiki recommends not using “nomodeset” or “vga=“ when using xf86-video-intel.

See: https://wiki.archlinux.org/index.php/Intel_graphics

I've tried it both with and without "nomodeset", and both with and without "vga=" - it doesn't seem to make a difference.  This is my current grub menuentry, which is resulting in the behavior I described in the last couple posts:

Code: [Select]
search --no-floppy --label --set=root "AOIBOOT"

menuentry "Core" {
 linux /boot/vmlinuz home=LABEL=persistence opt=LABEL=persistence tce=LABEL=persistence quiet waitusb=5 pause loglevel=3 showapps syslog text
 initrd /boot/core.gz
}

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14849
Re: Can't start X when booting from Grub on USB stick
« Reply #19 on: February 28, 2020, 01:12:18 AM »
Can you confirm which version of tinycore you're using - x86 11.x?

Offline mrjake2

  • Newbie
  • *
  • Posts: 35
Re: Can't start X when booting from Grub on USB stick
« Reply #20 on: February 28, 2020, 01:17:59 AM »
Can you confirm which version of tinycore you're using - x86 11.x?

I am using the one at this link:
Code: [Select]
http://tinycorelinux.net/11.x/x86/release/TinyCore-current.iso
I had been trying with 10.1 before that and I saw the exact same issues. 

It's probably worth noting that on several forums (Gentoo, Arch) I saw people saying that they recommended NOT using the xf86 intel drivers, but instead using the modesetting drivers that are now built into Xorg.  When I look at all the other distros I have working on that laptop (Ubuntu, Mint, Kali, Kanotix), all of them use Xorg, and all of them end up using the modesetting driver.  I thought I'd try that, but can't figure out how to make that happen in Tiny Core.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14849
Re: Can't start X when booting from Grub on USB stick
« Reply #21 on: February 28, 2020, 01:23:40 AM »
The modesetting driver is included with xorg-server - if you don't load xf86-video-intel, it will try to load the modesetting driver next.

Offline mrjake2

  • Newbie
  • *
  • Posts: 35
Re: Can't start X when booting from Grub on USB stick
« Reply #22 on: February 28, 2020, 01:56:39 AM »
The modesetting driver is included with xorg-server - if you don't load xf86-video-intel, it will try to load the modesetting driver next.

That's what I thought, but when I try to load Xorg without the intel drivers I get this error:

Code: [Select]
[   984.765] (EE) open /dev/dri/card0: No such file or directory
[   984.765] (WW) Falling back to old probe method for modesetting
[   984.765] (EE) open /dev/dri/card0: No such file or directory
[   984.765] (EE) Screen 0 deleted because of no matching config section.

For what it's worth, the person in this Gentoo thread had almost exactly the same errors that I got when I don't include the xf86-video-intel drivers:
Code: [Select]
https://forums.gentoo.org/viewtopic-t-1085452-start-0.html

In his case he finally resolved it by updating his kernel version, but I double checked with uname -r and I definitely have 5.4.3-tinycore.  I read through all the suggestions in that thread and they mostly seemed to deal with recompiling the kernel with intel video driver support in the kernel itself rather than as a module.  I'm not sure how much of a difference that would make.  I'm not an expert, but from reading that thread it sounded like i915 support needed to be enabled in the kernel even if you wanted to use the modesetting drivers.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14849
Re: Can't start X when booting from Grub on USB stick
« Reply #23 on: February 28, 2020, 02:08:43 AM »
ah - it looks like the modesetting driver needs graphics-KERNEL:
Code: [Select]
...
[    82.029] (II) modeset(0): using drv /dev/dri/card0
[    82.029] (II) modeset(0): Creating default Display subsection in Screen section
"Default Screen Section" for depth/fbbpp 24/32
[    82.029] (==) modeset(0): Depth 24, (==) framebuffer bpp 32
...

You could try recompiling the kernel with i915 built in?

Offline mrjake2

  • Newbie
  • *
  • Posts: 35
Re: Can't start X when booting from Grub on USB stick
« Reply #24 on: February 28, 2020, 02:22:34 AM »
ah - it looks like the modesetting driver needs graphics-KERNEL:
Code: [Select]
...
[    82.029] (II) modeset(0): using drv /dev/dri/card0
[    82.029] (II) modeset(0): Creating default Display subsection in Screen section
"Default Screen Section" for depth/fbbpp 24/32
[    82.029] (==) modeset(0): Depth 24, (==) framebuffer bpp 32
...

You could try recompiling the kernel with i915 built in?

I can try that tomorrow.  It's been probably 25 years since I've compiled my own Linux kernel and I'm a bit rusty.  Can I just follow any of the guides out there on how to compile your own kernel?   Anything specific I should be aware of regarding compilation for Tiny Core?  And finally, does this just require me to make that single change, i.e. change "CONFIG_DRM_I915=m" to "CONFIG_DRM_I915=y"?  Do I also need these options that were mentioned in that thread?

Code: [Select]
CONFIG_FIRMWARE_IN_KERNEL=y
CONFIG_EXTRA_FIRMWARE="i915/skl_dmc_ver1_26.bin"
CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware"

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 934
Re: Can't start X when booting from Grub on USB stick
« Reply #25 on: February 28, 2020, 02:38:40 AM »

I am using the one at this link:
Code: [Select]
http://tinycorelinux.net/11.x/x86/release/TinyCore-current.iso


Hi, guys!

Maybe mrjake2 need to work with 64-bit stuff?

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14849
Re: Can't start X when booting from Grub on USB stick
« Reply #26 on: February 28, 2020, 02:42:35 AM »
You can use the tinycore patched kernel and config from here:

http://tinycorelinux.net/11.x/x86_64/release/src/kernel/

..but, as mentioned, it might be worth trying CorePure64 first.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: Can't start X when booting from Grub on USB stick
« Reply #27 on: February 28, 2020, 03:09:07 AM »
Compiling i915 in vs a module shouldn't change anything - very likely you'd still get the same glitched screen. That firmware mention is new, I didn't know Intel graphics now need firmware (most old ones didn't). So please try first with firmware-i915 and graphics- loaded.
The only barriers that can stop you are the ones you create yourself.

Offline mrjake2

  • Newbie
  • *
  • Posts: 35
Re: Can't start X when booting from Grub on USB stick
« Reply #28 on: March 02, 2020, 12:41:59 AM »
Compiling i915 in vs a module shouldn't change anything - very likely you'd still get the same glitched screen. That firmware mention is new, I didn't know Intel graphics now need firmware (most old ones didn't). So please try first with firmware-i915 and graphics- loaded.

Thanks for all the ideas - it's not working yet, but I'm seeing progress.

Switching to TinycorePure64 made it so that I can boot up in UEFI, meaning gfxterm is working now.  So at least now I know there is a graphics mode that works on my laptop, I just need to figure out how to get Xorg to recognize it.  I tried two different things:

1) loading firmware-i915 and graphics-KERNEL (in that order)
2) loading firmware-i915,graphics-KERNEL,and xf86-video-intel (in that order)

For #1, I see the Tinycore blue background image flash up on the screen very briefly (less than a second), and then it goes black.  Switching to another TTY this is the Xorg.0.log output I see:

Code: [Select]
modeset(0) using drv /dev/dri/card0
modeset(0): Creating default Display subsection in Screen section
“Default Screen Section” for depth/fbbpp 24/32
modeset(0): Depth 24, (==) framebuffer bpp 32
“: RGB weight 888
“: Default visual is TrueColor
(II) Loading sub module “glamoreg1”
Loadmodule: “glamoreg1
Loading /usr/local/lib/xorg/modules/libglamoreg1.so
Module glamoreg1: vendor “X.Org Foundation
compiled for 1.20.6, module version = 1.0.1
ABI class: X.Org ANSI C Emulation, version 0.4
couldn’t get display ddevice
EE modeset(0): glamor initialization failed

I also see this error further down:
Code: [Select]
(II) AIGLX: Screen0 is not DRI2 capable
(EE) AIGLX error: dlopen of /usr/local/lib/dri/swrast_dri.so failed (/usr/local/lib/dri/swrast_dri.so: cannot open shared object: No such file or directory)
(EE) AIGLX error: unable to load driver swrast
(II) Initializing extension xFree86-VideoModeExtension
(II) Initializing extension xFree86-DGA
(II) Initializing extension xFree86-DRI
modeset(0): damage tracking initialized
modeset(0): Setting screen physical size to 504 x 294

For #2, I get the following error after I try to load xf86-video-intel:
Code: [Select]
mount: mounting /dev/loop74 on /tmp/tcloop/xf86-video-intel failed: Invalid argument

Of course because of the error I get for #2, when I run startx it just exhibits the exact same behavior as in #1.
« Last Edit: March 02, 2020, 01:03:27 AM by mrjake2 »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14849
Re: Can't start X when booting from Grub on USB stick
« Reply #29 on: March 02, 2020, 01:16:48 AM »
swrast_dri.so is provided by Xorg-7.7-3d