DaemonForums  

Go Back   DaemonForums > NetBSD > NetBSD General

NetBSD General Other questions regarding NetBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 17th August 2021
berni51 berni51 is offline
Real Name: Bernhard Ernst
Port Guard
 
Join Date: Apr 2020
Location: Middle of Germany
Posts: 23
Default GOP mode in /boot.cfg

Hi there,

for a better Xorg-resolution I use the wsfb driver in NetBSD 9.2 running on an Intel NUC. I do this cause the i915 driver is not working.
So I use the wsfb. However even this driver gives a bad resolution of 1024x768.
So additionally I changed the GOP mode at the bootprompt simply with "gop 0", which now allows a 1280x1024 resolution - much better.

No I tried to make this permanent in /etc/boot.fg. I tried gop 0, gop=0, gop= mode 0 - but nothing works. Only when I enter the UEFI menu and type my gop 0 at the boot prompt it works.

Can anybody give me a hint for the correct syntax writing the gop command into boot.cfg? That would be nice.

Regards
Berni
Reply With Quote
  #2   (View Single Post)  
Old 18th August 2021
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
 
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 992
Default

It's been a while since I did anything like this, but I *think* you'll need to create, in boot.cfg, a menu item which contains the parameters you want. Looking at the boot.conf(5) man page it would be something like this:

menu=<your description>:boot gop 0

If that syntax turns out to be absurd, then maybe a modification of it consistent with the general idea being floated?
Reply With Quote
  #3   (View Single Post)  
Old 19th August 2021
Sensucht94's Avatar
Sensucht94 Sensucht94 is offline
Real Name: Paolo Vincenzo Olivo
Shell Scout
 
Join Date: Oct 2017
Location: Rome
Posts: 124
Default

Quote:
Originally Posted by IdOp View Post
If that syntax turns out to be absurd, then maybe a modification of it consistent with the general idea being floated?
I'd rewrite it as:
Code:
menu=<entry description>:gop 0;rndseed /var/db/entropy-file;boot netbsd
The ending netbsd is the name of the kernel located at / on the root partition (so it may be changed accordingly to netbsd_kaslr for a ALSR kernel, to onenetbsd for a old kernel....). If that's anything different from the first partition of the first disk (e.g. on UEFI systems it might be preceded by the ESP), then the root must be specified after boot as hdXy (e.g. hd0b for the second partition on the first disk).
Quote:
Originally Posted by berni51 View Post
for a better Xorg-resolution I use the wsfb driver in NetBSD 9.2 running on an Intel NUC. I do this cause the i915 driver is not working.
So I use the wsfb. However even this driver gives a bad resolution of 1024x768
I don't know what generation does your CPU belong to, but please mind that with NetBSD -9.* SNA acceleration on older (pre-2010) Intel chips has often proven problematic, so you may want to fallback to UXA if you haven't tried already. You can do that by adding:
Code:
option "AccelMethod" "uxa"
in /etc/X11/xorg.conf or in a dedicated file in xorg.conf.d
__________________
“Mi casa tendrá dos piernas y mis sueños no tendrán fronteras„
Reply With Quote
  #4   (View Single Post)  
Old 19th August 2021
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
 
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 992
Default

Quote:
Originally Posted by Sensucht94 View Post
I'd rewrite it as:
Code:
menu=<entry description>:gop 0;rndseed /var/db/entropy-file;boot netbsd
Thank you very much for the correction!
Reply With Quote
  #5   (View Single Post)  
Old 20th August 2021
berni51 berni51 is offline
Real Name: Bernhard Ernst
Port Guard
 
Join Date: Apr 2020
Location: Middle of Germany
Posts: 23
Default

Thanks a lot for your help. With this entry in /boot.cfg gop is set to 0. Now I have the maximum resolution which my monitor is able to show.

But (there must be always a but) now I have a terrible resolution on the console (640x480).
Should I additionally set the text parameter to another value?

The computer with this issues is an Intel NUC 6CYAH with Intel 500 graphics. It is not too old, not older than 3 or 4 years.

Regards
Berni
Reply With Quote
  #6   (View Single Post)  
Old 21st August 2021
Sensucht94's Avatar
Sensucht94 Sensucht94 is offline
Real Name: Paolo Vincenzo Olivo
Shell Scout
 
Join Date: Oct 2017
Location: Rome
Posts: 124
Default

Quote:
Originally Posted by berni51 View Post
But (there must be always a but) now I have a terrible resolution on the console (640x480).
Should I additionally set the text parameter to another value?
You mean wscons resolution, as opposed to the kernel ring buffer?
The framebuffer console should retain the resolution set by the bootloader with gop, using the generic genfb(4) driver instead of i915drmkms. I suspect (but may be wrong) kernel is attempting to load Intel DRM (thus disabling genfb), so when DRM driver fails to attach to, all you're left with is the standard resolution.

What does
Code:
dmesg | fgrep genfb
return?
If using genfb, with DRM disabled, it should look like:
Code:
[     1.015430] genfb0 at pci0 dev 2 function 0: vendor 8086 product 0166 (rev. 0x09) 
[     1.015430] genfb0: framebuffer at 0xe0000000, size 1366x768, depth 32, stride 5504 
[     1.015430] genfb0: shadow framebuffer enabled, size 4128 KB [     1.015430] wsdisplay0 at genfb0 kbdmux 1: console (default, vt100 emulation), using wskbd0 
[     1.015430] drm at genfb0 not configured
Consider reporting any error to the mailing list and filing a a PR.

If you find i915drmkms is not disabled, you may blacklist the module at boot time. At the bootloader prompt, pass the -c flag to the kernel:
Code:
 > boot -c
The kernel will display a few lines, then immediately drop into the userconf prompt:

Code:
uc> list                        # list all devs; look for your drmkms entry
uc> disable i915drmkms          # disable Intel DRM 
uc> quit
You can disable the device using the bootloader like this:

Code:
 > userconf disable i915drmkms
You can make the setting permanent by adding it to your custom boot.cfg entry:
Code:
menu=<entry description>:gop 0;rndseed /var/db/entropy-file;userconf disable i915drmkms;boot netbsd
Also, if the current resolution makes the default console format look weird, you can adjust it with wsconscfg(8)

If using genfb, Xorg display driver must be set to wsfb(4) for higher resolutions to be enabled. This can be done by setting:
Code:
Section "Device"
  Identifier  "Card0"
  Driver      "wsfb"
EndSection
inside /etc/X11/xorg.conf or a partial /etc/X11/xorg.conf.d/wsfb.conf configuration file.

Compared to drm dirvers, genfb/wsfb carries non-negligible limitations:
  1. No OpenGL hardware acceleration - on x86 and aarch64, llvmpipe (a parallel CPU-based just-in-time renderer) will be used instead
  2. No X Display Power Management Signaling
  3. No X video extension (used for accelerated video playback)
  4. No DRI
Quote:
The computer with this issues is an Intel NUC 6CYAH with Intel 500 graphics. It is not too old, not older than 3 or 4 years.
You may still try with UXA acceleration, as I showed you above (this, after having reverted your changes in boot.cfg and re-enabled i915drmkms). I don't know why but Intel drm on NetBSD-9.* has always been troublesome on certain chipset generations and this is a well-known workaround.

Another option would be building a -current kernel with Riastradh's src branch, which contains updated drm/kms (ported from Linux 5.6, so much newer compared to the current ones from 4.11). This will hopefully make it into -10.* RELEASE.
If you're interested in testing the new code (still pretty much experimental), clone the repository from Riastradh's GitHub and build a kernel (remember to back up the known-working one):
Code:
git clone https://github.com/riastradh/netbsd-src
cd netbsd-src
git checkout reredrm56
(follow the standard instructions for building a kernel)
Please report any panics to the GitHub repository.
With Intel GPUs, the modesetting Xorg display driver must be used currently.
Code:
Section "Device" 
   Identifier  "Card0"
   Driver      "modesetting"
EndSection
__________________
“Mi casa tendrá dos piernas y mis sueños no tendrán fronteras„

Last edited by Sensucht94; 21st August 2021 at 11:33 AM.
Reply With Quote
  #7   (View Single Post)  
Old 21st August 2021
berni51 berni51 is offline
Real Name: Bernhard Ernst
Port Guard
 
Join Date: Apr 2020
Location: Middle of Germany
Posts: 23
Default

Wow! Thats great Paolo! You are my hero.
I now have a menu entry which disables i915drmkms and sets gop to 0. That works perfect, thank you so much.
I'm just playing with the wscons settings to get 80x50 screens on the console. If that will work I am 100% satisfied.

Regards
Berni
Reply With Quote
  #8   (View Single Post)  
Old 21st August 2021
berni51 berni51 is offline
Real Name: Bernhard Ernst
Port Guard
 
Join Date: Apr 2020
Location: Middle of Germany
Posts: 23
Default

Have no success trying a better wscons resolution. Whatever I do in wscons.conf is ignored: uncomment the IBM font and changing the screens to 80x50. The machine starts with a small & nice console font, but during boot the font size changes to standard VGA. Any ideas?
Regards
Berni
Reply With Quote
  #9   (View Single Post)  
Old 22nd August 2021
Sensucht94's Avatar
Sensucht94 Sensucht94 is offline
Real Name: Paolo Vincenzo Olivo
Shell Scout
 
Join Date: Oct 2017
Location: Rome
Posts: 124
Default

Quote:
Originally Posted by berni51 View Post
uncomment the IBM font and changing the screens to 80x50. The machine starts with a small & nice console font, but during boot the font size changes to standard VGA. Any ideas?
Strange, I wonder if that's related to genfb, or if there's something resetting the font. I had never had trouble switching to ibm font.

Anyway, what about building a custom kernel and embedding the font in it?
You can take one of the supported WSFonts, choosing among the smaller ones:

Code:
# Make sure to comment the default entries
# options       FONT_BOLD8x16 
# options       FONT_BOLD16x32 


# The first specified option is going to be 
# the default framebuffer console font
options         FONT_SPLEEN5x8
options         FONT_SPLEEN6x12
__________________
“Mi casa tendrá dos piernas y mis sueños no tendrán fronteras„
Reply With Quote
Old 22nd August 2021
berni51 berni51 is offline
Real Name: Bernhard Ernst
Port Guard
 
Join Date: Apr 2020
Location: Middle of Germany
Posts: 23
Default

Thks for your reply. I have no expierence in building a kernel, but will try.
Reply With Quote
Old 22nd August 2021
berni51 berni51 is offline
Real Name: Bernhard Ernst
Port Guard
 
Join Date: Apr 2020
Location: Middle of Germany
Posts: 23
Default

OK, I tried to compile a new kernel, using the fonts from your example.
Result: It works! Both, console as well as xorg. For xorg I still have to set gop to 0 in boot.cfg.
The only problem: Now the console fonts are too small, extremely small! Looks like a resolution of 262x132 - very hard to read.
What may be a good compromise for the size of the console fonts? Are vt220l8x8 and 8x16 better?
Reply With Quote
Old 22nd August 2021
berni51 berni51 is offline
Real Name: Bernhard Ernst
Port Guard
 
Join Date: Apr 2020
Location: Middle of Germany
Posts: 23
Default

I've got it! After several compiler runs I choosed the SPLEEN8x16 font which gives the perfect wscons resolution for me! Thank you very much for your kind help.

Happy, Berni
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
No user for in PXE-Boot Server environment to boot Diskless clients dennisN86 OpenBSD General 10 13th May 2021 11:39 AM
Invalid Signature when trying to boot Ubuntu 14.04 (Dual Boot) bsd007 FreeBSD General 7 18th September 2014 12:37 PM
Sun XVR-600 in 24-bit mode Don_HH2K OpenBSD Installation and Upgrading 2 30th June 2010 08:06 PM
no-tab-mode in mg? Sunnz OpenBSD General 0 10th March 2010 12:10 PM
Dual-boot laptop won't boot OpenBSD after upgrade to 4.3 kbeaucha OpenBSD Installation and Upgrading 17 30th May 2008 02:40 PM


All times are GMT. The time now is 09:52 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick