You are not logged in.

#1 2014-09-23 20:12:53

wujek.srujek
Member
Registered: 2013-06-12
Posts: 38

i915, KMS and fbset not really working

Hi.
I'm running Arch on a MSI Wind u100 netbook, native resolution is 1024x600. Very simple installation, nothing out of the ordinary, no X yet, just the terminals.
I'm using the i915 driver with KMS enabled, and the console resolution I get is 1024x600, the native one. Howerver, I wanted to play around a bit and wanted to set the resolution after the machine is booted, and I fail to do this.
I can change the resolution with the 'video=512x300' command line parameter, which gets me 1/4 of the native screen. After that, I try some of the resolutions from the /etc/fb.modes file:
fbset '640x480-60'
'ioctl FBIOPUT_VSCREENINFO: Invalid argument'
and the same for many different attempts. Am I supposed to fill this file myself with valid modes? Are the ones that are there by default some dummy ones, just like the wpa_supplicant.conf file is just an example?

When I call 'fbset -xres 256 -yres 150' the font sizes stay the same, but only the top-left quarter is usable, the rest is black (kind of like margins), which means the resolution didn't really change, but rather the 'usable space' changed. I have the feeling fbset is not supposed to be used with KMS, but rather with vesafb/uvesafb or whatever.

Is there a way to change the resolution of the KMS fb after the computer has booted? Is there some command line tool for this?

Regards,
wujek

Offline

#2 2014-09-23 20:28:14

Gusar
Member
Registered: 2009-08-25
Posts: 3,607

Re: i915, KMS and fbset not really working

wujek.srujek wrote:

Is there a way to change the resolution of the KMS fb after the computer has booted?

Nope. No one ever wrote such a tool. It might not even be possible to write one, the KMS fbdev layer is very basic.

Offline

#3 2014-09-23 21:21:56

wujek.srujek
Member
Registered: 2013-06-12
Posts: 38

Re: i915, KMS and fbset not really working

Uh, ok, thanks.

I thought KMS is _the_ one and only modern/hip way now and find it kind of strange that it is so basic, as you call it. Is there no need for anything more robust? Because I expect there are really no technical limitations in this regard, are there? KMS, DRM and the stuff I've been reading lately seems to be pretty advanced stuff...
Because as far as I know, I won't be able to use any other framebuffer together with KMS, and KMS has its virtues (for one, it works right away on all my laptops ;d).

Offline

#4 2014-09-23 21:46:27

Gusar
Member
Registered: 2009-08-25
Posts: 3,607

Re: i915, KMS and fbset not really working

wujek.srujek wrote:

I thought KMS is _the_ one and only modern/hip way now and find it kind of strange that it is so basic, as you call it.

It's not KMS that's basic, it's the fbdev compatibility layer inside KMS.

wujek.srujek wrote:

Is there no need for anything more robust?

Have a look at kmscon. That's the direction development is going, having the console run in userspace and on top of KMS directly, instead of an in-kernel console that uses fbdev. However, looking at the kmscon manpage, there's nothing about resolution switching in there.

Offline

#5 2014-09-23 21:57:24

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: i915, KMS and fbset not really working

What are you trying to do, why do you want to change the resolution? Can you change it if you disable KMS?

Offline

#6 2014-09-24 18:21:51

wujek.srujek
Member
Registered: 2013-06-12
Posts: 38

Re: i915, KMS and fbset not really working

1. What can the 'standard' framebuffer do what the KMS compatibility layer can't?
2. I'm not trying to do anything in particular, I just want to understand more about the KMS, framebuffer, DRM, DRI etc. and hence try different things out. And I'm a bit confused about the amount of contradictory information to be found on the net, though, and it is a very long learning process for me.
3. I want to change the resolution because I want to know if it's possible and how one would go about it. So far I have been able to find out everything I needed, changing the resolution after boot is something that I cannot make work.
4. If I disable KMS (I need to prevent i915 from loading, and remove it from initramfs, I actually invested a fair amount of research into this as well ;d, I guess I could also somehow prevent udev from loading the intel driver but I don't yet know how) the fbdev driver that is used then by default is vesafb and the resolution I get is 800x600. I can neither change to anything higher nor lower than that, fbset doesn't work but it also doesn't report any errors.
5. I know about kmscon and it works for me except that I can't get it to start instead of agetty - I get blank screen with a blinking cursor. When I start the standard agetty, and then start kms from it (either with simply calling 'kmscon --vt tty2' or via 'systemctl start kmsconvt@tty2'),  it starts and works fine. I tried masking out the getty@tty2 service but to no avail. When I disable getty@tty1 and enable kmsconvt@tty1, all I can see is a black screen with a blinking cursor at the end of the boot - kmscon simply refuses to start automatically for me. In the journal, I see:

kmscon[193]: NOTICE: no running seats; exiting

Seems like the arch kmscon wiki page doesn't tell all there is to start it automatically, or maybe I don't understand it (more likely).

Anyways, I will look into it more, right now I fail to see its appeal - it's just a console that looks worse on my netbook, but I bet it can be made sweet.


In the meantime, I found this: https://lkml.org/lkml/2009/4/28/95
which implies that the FBIOPUT_VSCREENINFO ioctl  (which fbset seems to be using) always fails for intel KMS.

So basically, it seems fbset just doesn't work for me in any case, and the modes in the fb.modes are just some configurations which my card is supposed to support, but not all of them - the native resolution is not there, for instance.

Offline

#7 2014-09-24 19:20:44

Gusar
Member
Registered: 2009-08-25
Posts: 3,607

Re: i915, KMS and fbset not really working

wujek.srujek wrote:

1. What can the 'standard' framebuffer do what the KMS compatibility layer can't?

Change resolutions for one smile. Beyond that I don't know details, no idea if there exists a simple list of all fbdev ioctls and which of those KMS does or doesn't implement.

wujek.srujek wrote:

I guess I could also somehow prevent udev from loading the intel driver but I don't yet know how

Look into blacklisting.

wujek.srujek wrote:

the fbdev driver that is used then by default is vesafb and the resolution I get is 800x600. I can neither change to anything higher nor lower than that, fbset doesn't work but it also doesn't report any errors.

Hmm, I would think fbset could switch at least to 640x480, unless not even that resolution is in the VBIOS of the GPU.

wujek.srujek wrote:

So basically, it seems fbset just doesn't work for me in any case, and the modes in the fb.modes are just some configurations which my card is supposed to support, but not all of them - the native resolution is not there, for instance.

That the native resolution isn't there is quite normal. The VBIOS of GPUs rarely contains anything but standard VESA resolutions, which is basically 4:3 resolutions (except 1280x1024) up to 1600x1200. Since the netbook's display is 1024x600, it's not surprising that the VBIOS only contains 800x600.

Offline

#8 2014-09-24 19:41:44

wujek.srujek
Member
Registered: 2013-06-12
Posts: 38

Re: i915, KMS and fbset not really working

In the meantime I read more about kmscon and it seems to be able to use hardware acceleration without using X, Wayland etc. via EGL. Actually it seems pretty interesting now ;d
The standard resolutions are in VBIOS of the gpu, I think - I can see them with hwinfo --framebuffer and vbeinfo (like 640x480 in various depths, the same for 800x600) - at least I think this are the VBIOS resolution my gpu supports ;d
I am not able to change resolutions with fbset with KMS disabled either, with the vesafb used.
As for blacklisting - do you mean blacklisting the i915 module (that's what I did, i.e. echo 'install i915 > /etc/modprobe.d/blacklist.conf') or some blacklisting magic in udev?

Do you know why kmscon won't start for me? Why does it complain about no seats?

Regards,
wujek

Offline

#9 2014-09-25 15:23:36

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: i915, KMS and fbset not really working

wujek.srujek wrote:

Do you know why kmscon won't start for me? Why does it complain about no seats?

How are you starting it? Works for me https://wiki.archlinux.org/index.php/KMSCON#Install - I run it on tty3.

Offline

#10 2014-09-25 17:59:58

wujek.srujek
Member
Registered: 2013-06-12
Posts: 38

Re: i915, KMS and fbset not really working

I'm running the version from the official repos. Here is what I do:

# systemctl disable getty@tty1
Removed symlink /etc/systemd/system/getty.target.wants/getty@tty1.service.
# systemctl enable kmsconvt@tty1
Created symlink from /etc/systemd/system/getty.target.wants/kmsconvt@tty1.service to /usr/lib/systemd/system/kmsconvt@.service.

Then, after reboot and login from tty2 as tty1 has no usable console:

# journalctl -b | grep kmscon
Sep 25 19:37:06 wind systemd[1]: Starting system-kmsconvt.slice.
Sep 25 19:37:06 wind systemd[1]: Created slice system-kmsconvt.slice.
Sep 25 19:37:17 wind kmscon[166]: [0000.000000] NOTICE: kmscon Revision kmscon-8 Apr 15 2014 14:56:28
Sep 25 19:37:17 wind kmscon[166]: [0000.331728] NOTICE: no running seats, exiting

So, there are 'no running seats' and kmscon decides to exit. Howerver, according to: http://www.freedesktop.org/wiki/Softwar … multiseat/, 'seat0 always exists', but kmscon says none exists. Or is 'not running' not the same as 'not existing'?
I also tried changing the autovt service as the site mentiones, other ttys and to no avail.

# grep Exec /usr/lib/systemd/system/kmsconvt@.service
ExecStart=/usr/bin/kmscon "--vt=%I" --seats=seat0 --no-switch

So I removed the --seats=seat0 parts but it didn't help.

I have a very very basic arch installation, no X, no bells and whistles. I have the feeling that something is missing from my system, either some package or maybe some systemd configuration.

Offline

#11 2014-09-27 14:54:33

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: i915, KMS and fbset not really working

I don't know if it matters, but it's '--no-switchvt', not '--no-switch'.

Offline

#12 2014-09-28 12:17:09

wujek.srujek
Member
Registered: 2013-06-12
Posts: 38

Re: i915, KMS and fbset not really working

Yes, that's what I have, the text I copied got trimmed on paste.

Offline

#13 2014-09-29 18:57:49

wujek.srujek
Member
Registered: 2013-06-12
Posts: 38

Re: i915, KMS and fbset not really working

I gave it up for the time being, I discovered that tools like fbi etc. don't work with kmscon.
Thank you all for your time and help.

Offline

Board footer

Powered by FluxBB