Re: King Jim Portabook

2016-12-10 Thread Reyk Floeter

> On 10.12.2016, at 13:37, Mark Kettenis  wrote:
> 
>> From: Reyk Floeter 
>> Date: Sat, 10 Dec 2016 12:50:56 +0100
>> 
 On Sat, Dec 10, 2016 at 08:17:10PM +0900, Ryan McBride wrote:
 So I've been eying this machine for a while:
 http://www.kingjim.co.jp/sp/portabook/xmc10/
>>> 
>>> Included below is the dmesg with the previous diff applied.
>>> 
>>> Besides all the devices that show "not configured", there are a bunch of
>>> other things that don't work. I guess there's more broken that I haven't
>>> run into yet.
>>> 
>>> - Built-in keyboard does not work in the bootloader (an external USB
>>> keyboard is fine)
>>> 
>>> - zzz fails with "acpi0: state S3 unavailable"
>>> 
>>> - Console does not use the whole screen, there is an empty border around
>>> the whole screen (~2 chars tall at top and bottom, ~3 wide on the
>>> sides)
>>> 
>> 
>> efifb(4) does not fill the screen, it uses hardcoded values; I only
>> get a tiny console on my 2560x screen.
> 
> There are hardcoded limits.  On smaller screens it will use the entire
> screen.
>> 
>> I patched my kernel to fill the laptop screen but efifb should
>> really just adjust to the actual resolution automatically.
> 
> The problem with filling the entire screen is that the console becomes
> quite slow.  This makes doing things like running a full-screen editor
> or scrolling through logs a bit of a pain.  Maybe it is a bit better
> now that we map the framebuffer in write-combining mode.  Also
> increasing the number of characters beyond what we have now is not
> going to make it more usable.
> 

I know that it is a bit slow - I'm using it :)

But the alternative is a tiny console that almost doesn't make sense -
it is not much fun to stare at a tiny blue window in the middle of a black 
screen.

> What we really need is a bigger font for those high-resolution screens.

Agreed.

Reyk




Re: King Jim Portabook

2016-12-10 Thread Mark Kettenis
> From: Reyk Floeter 
> Date: Sat, 10 Dec 2016 12:50:56 +0100
> 
> >> On Sat, Dec 10, 2016 at 08:17:10PM +0900, Ryan McBride wrote:
> >> So I've been eying this machine for a while:
> >> http://www.kingjim.co.jp/sp/portabook/xmc10/
> > 
> > Included below is the dmesg with the previous diff applied.
> > 
> > Besides all the devices that show "not configured", there are a bunch of
> > other things that don't work. I guess there's more broken that I haven't
> > run into yet.
> > 
> > - Built-in keyboard does not work in the bootloader (an external USB
> >  keyboard is fine)
> > 
> > - zzz fails with "acpi0: state S3 unavailable"
> > 
> > - Console does not use the whole screen, there is an empty border around
> >  the whole screen (~2 chars tall at top and bottom, ~3 wide on the
> >  sides)
> > 
> 
> efifb(4) does not fill the screen, it uses hardcoded values; I only
> get a tiny console on my 2560x screen.

There are hardcoded limits.  On smaller screens it will use the entire
screen.
> 
> I patched my kernel to fill the laptop screen but efifb should
> really just adjust to the actual resolution automatically.

The problem with filling the entire screen is that the console becomes
quite slow.  This makes doing things like running a full-screen editor
or scrolling through logs a bit of a pain.  Maybe it is a bit better
now that we map the framebuffer in write-combining mode.  Also
increasing the number of characters beyond what we have now is not
going to make it more usable.

What we really need is a bigger font for those high-resolution screens.



Re: King Jim Portabook

2016-12-10 Thread Jonathan Gray
On Sat, Dec 10, 2016 at 08:33:47PM +0900, Ryan McBride wrote:
> On Sat, Dec 10, 2016 at 08:17:10PM +0900, Ryan McBride wrote:
> > So I've been eying this machine for a while:
> > http://www.kingjim.co.jp/sp/portabook/xmc10/
> 
> Included below is the dmesg with the previous diff applied.
> 
> Besides all the devices that show "not configured", there are a bunch of
> other things that don't work. I guess there's more broken that I haven't
> run into yet.
> 
> - Built-in keyboard does not work in the bootloader (an external USB
>   keyboard is fine)
> 
> - zzz fails with "acpi0: state S3 unavailable"

The kernel does not support systems that require
"low power idle"/"modern standby" instead of S3 for suspend.

Though even if it did there is not yet support for cherry trail in inteldrm.

Audio looks like i2c/i2s as on the 11" lenovo 100s.

> 
> - Console does not use the whole screen, there is an empty border around
>   the whole screen (~2 chars tall at top and bottom, ~3 wide on the
>   sides)
> 
> - X fails to start (see below)
> 
> Any ACPI hackers interested in a Christmas "gift"?
> 
> 
> [23.406] (--) checkDevMem: using aperture driver /dev/xf86
> [23.415] (--) Using wscons driver on /dev/ttyC4
> [23.429] 
> X.Org X Server 1.18.4
> Release Date: 2016-07-19
> [23.429] X Protocol Version 11, Revision 0
> [23.429] Build Operating System: OpenBSD 6.0 amd64 
> [23.429] Current Operating System: OpenBSD asdf.my.domain 6.0 
> GENERIC.MP#1 amd64
> [23.429] Build Date: 25 November 2016  11:21:01AM
> [23.429]  
> [23.429] Current version of pixman: 0.34.0
> [23.429]  Before reporting problems, check http://wiki.x.org
>   to make sure that you have the latest version.
> [23.429] Markers: (--) probed, (**) from config file, (==) default 
> setting,
>   (++) from command line, (!!) notice, (II) informational,
>   (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
> [23.429] (==) Log file: "/var/log/Xorg.0.log", Time: Tue Dec 22 05:10:12 
> 2015
> [23.432] (==) Using system config directory 
> "/usr/X11R6/share/X11/xorg.conf.d"
> [23.434] (==) No Layout section.  Using the first Screen section.
> [23.434] (==) No screen section available. Using defaults.
> [23.434] (**) |-->Screen "Default Screen Section" (0)
> [23.435] (**) |   |-->Monitor ""
> [23.437] (==) No monitor specified for screen "Default Screen Section".
>   Using a default monitor configuration.
> [23.437] (==) Disabling SIGIO handlers for input devices
> [23.438] (==) Automatically adding devices
> [23.438] (==) Automatically enabling devices
> [23.438] (==) Not automatically adding GPU devices
> [23.439] (==) Max clients allowed: 256, resource mask: 0x1f
> [23.457] (==) FontPath set to:
>   /usr/X11R6/lib/X11/fonts/misc/,
>   /usr/X11R6/lib/X11/fonts/TTF/,
>   /usr/X11R6/lib/X11/fonts/OTF/,
>   /usr/X11R6/lib/X11/fonts/Type1/,
>   /usr/X11R6/lib/X11/fonts/100dpi/,
>   /usr/X11R6/lib/X11/fonts/75dpi/
> [23.457] (==) ModulePath set to "/usr/X11R6/lib/modules"
> [23.457] (II) The server relies on wscons to provide the list of input 
> devices.
>   If no devices become available, reconfigure wscons or disable 
> AutoAddDevices.
> [23.458] (II) Loader magic: 0x1b864e534020
> [23.458] (II) Module ABI versions:
> [23.458]  X.Org ANSI C Emulation: 0.4
> [23.458]  X.Org Video Driver: 20.0
> [23.458]  X.Org XInput driver : 22.1
> [23.458]  X.Org Server Extension : 9.0
> [23.459] (--) PCI:*(0:0:2:0) 8086:22b0:1b0a:01bc rev 32, Mem @ 
> 0x9000/16777216, 0x8000/268435456, I/O @ 0xf000/64
> [23.459] (II) LoadModule: "glx"
> [23.463] (II) Loading /usr/X11R6/lib/modules/extensions/libglx.so
> [23.501] (II) Module glx: vendor="X.Org Foundation"
> [23.501]  compiled for 1.18.4, module version = 1.0.0
> [23.501]  ABI class: X.Org Server Extension, version 9.0
> [23.501] (==) AIGLX enabled
> [23.502] (==) Matched intel as autoconfigured driver 0
> [23.502] (==) Matched vesa as autoconfigured driver 1
> [23.502] (==) Assigned the driver to the xf86ConfigLayout
> [23.502] (II) LoadModule: "intel"
> [23.502] (II) Loading /usr/X11R6/lib/modules/drivers/intel_drv.so
> [23.513] (II) Module intel: vendor="X.Org Foundation"
> [23.513]  compiled for 1.18.4, module version = 2.99.916
> [23.513]  Module class: X.Org Video Driver
> [23.513]  ABI class: X.Org Video Driver, version 20.0
> [23.513] (II) LoadModule: "vesa"
> [23.514] (II) Loading /usr/X11R6/lib/modules/drivers/vesa_drv.so
> [23.516] (II) Module vesa: vendor="X.Org Foundation"
> [23.516]  compiled for 1.18.4, module version = 2.3.4
> [23.516]  Module class: X.Org Video Driver
> [23.516]  ABI class: X.Org Video Driver, version 20.0
> [23.516] (II) intel: Driver for Intel(R) Integrated Graphics Chipsets:
>   i810, i810-dc100, i810e, 

Re: King Jim Portabook

2016-12-10 Thread Reyk Floeter

>> On Sat, Dec 10, 2016 at 08:17:10PM +0900, Ryan McBride wrote:
>> So I've been eying this machine for a while:
>> http://www.kingjim.co.jp/sp/portabook/xmc10/
> 
> Included below is the dmesg with the previous diff applied.
> 
> Besides all the devices that show "not configured", there are a bunch of
> other things that don't work. I guess there's more broken that I haven't
> run into yet.
> 
> - Built-in keyboard does not work in the bootloader (an external USB
>  keyboard is fine)
> 
> - zzz fails with "acpi0: state S3 unavailable"
> 
> - Console does not use the whole screen, there is an empty border around
>  the whole screen (~2 chars tall at top and bottom, ~3 wide on the
>  sides)
> 

efifb(4) does not fill the screen, it uses hardcoded values; I only get a tiny 
console on my 2560x screen.

I patched my kernel to fill the laptop screen but efifb should really just 
adjust to the actual resolution automatically.

Reyk

> - X fails to start (see below)
> 
> Any ACPI hackers interested in a Christmas "gift"?
> 
> 
> [23.406] (--) checkDevMem: using aperture driver /dev/xf86
> [23.415] (--) Using wscons driver on /dev/ttyC4
> [23.429] 
> X.Org X Server 1.18.4
> Release Date: 2016-07-19
> [23.429] X Protocol Version 11, Revision 0
> [23.429] Build Operating System: OpenBSD 6.0 amd64 
> [23.429] Current Operating System: OpenBSD asdf.my.domain 6.0 
> GENERIC.MP#1 amd64
> [23.429] Build Date: 25 November 2016  11:21:01AM
> [23.429]  
> [23.429] Current version of pixman: 0.34.0
> [23.429]Before reporting problems, check http://wiki.x.org
>to make sure that you have the latest version.
> [23.429] Markers: (--) probed, (**) from config file, (==) default 
> setting,
>(++) from command line, (!!) notice, (II) informational,
>(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
> [23.429] (==) Log file: "/var/log/Xorg.0.log", Time: Tue Dec 22 05:10:12 
> 2015
> [23.432] (==) Using system config directory 
> "/usr/X11R6/share/X11/xorg.conf.d"
> [23.434] (==) No Layout section.  Using the first Screen section.
> [23.434] (==) No screen section available. Using defaults.
> [23.434] (**) |-->Screen "Default Screen Section" (0)
> [23.435] (**) |   |-->Monitor ""
> [23.437] (==) No monitor specified for screen "Default Screen Section".
>Using a default monitor configuration.
> [23.437] (==) Disabling SIGIO handlers for input devices
> [23.438] (==) Automatically adding devices
> [23.438] (==) Automatically enabling devices
> [23.438] (==) Not automatically adding GPU devices
> [23.439] (==) Max clients allowed: 256, resource mask: 0x1f
> [23.457] (==) FontPath set to:
>/usr/X11R6/lib/X11/fonts/misc/,
>/usr/X11R6/lib/X11/fonts/TTF/,
>/usr/X11R6/lib/X11/fonts/OTF/,
>/usr/X11R6/lib/X11/fonts/Type1/,
>/usr/X11R6/lib/X11/fonts/100dpi/,
>/usr/X11R6/lib/X11/fonts/75dpi/
> [23.457] (==) ModulePath set to "/usr/X11R6/lib/modules"
> [23.457] (II) The server relies on wscons to provide the list of input 
> devices.
>If no devices become available, reconfigure wscons or disable 
> AutoAddDevices.
> [23.458] (II) Loader magic: 0x1b864e534020
> [23.458] (II) Module ABI versions:
> [23.458]X.Org ANSI C Emulation: 0.4
> [23.458]X.Org Video Driver: 20.0
> [23.458]X.Org XInput driver : 22.1
> [23.458]X.Org Server Extension : 9.0
> [23.459] (--) PCI:*(0:0:2:0) 8086:22b0:1b0a:01bc rev 32, Mem @ 
> 0x9000/16777216, 0x8000/268435456, I/O @ 0xf000/64
> [23.459] (II) LoadModule: "glx"
> [23.463] (II) Loading /usr/X11R6/lib/modules/extensions/libglx.so
> [23.501] (II) Module glx: vendor="X.Org Foundation"
> [23.501]compiled for 1.18.4, module version = 1.0.0
> [23.501]ABI class: X.Org Server Extension, version 9.0
> [23.501] (==) AIGLX enabled
> [23.502] (==) Matched intel as autoconfigured driver 0
> [23.502] (==) Matched vesa as autoconfigured driver 1
> [23.502] (==) Assigned the driver to the xf86ConfigLayout
> [23.502] (II) LoadModule: "intel"
> [23.502] (II) Loading /usr/X11R6/lib/modules/drivers/intel_drv.so
> [23.513] (II) Module intel: vendor="X.Org Foundation"
> [23.513]compiled for 1.18.4, module version = 2.99.916
> [23.513]Module class: X.Org Video Driver
> [23.513]ABI class: X.Org Video Driver, version 20.0
> [23.513] (II) LoadModule: "vesa"
> [23.514] (II) Loading /usr/X11R6/lib/modules/drivers/vesa_drv.so
> [23.516] (II) Module vesa: vendor="X.Org Foundation"
> [23.516]compiled for 1.18.4, module version = 2.3.4
> [23.516]Module class: X.Org Video Driver
> [23.516]ABI class: X.Org Video Driver, version 20.0
> [23.516] (II) intel: Driver for Intel(R) Integrated Graphics Chipsets:
>i810, i810-dc100, i810e, i815, i830M, 845G, 854, 852GM/855GM, 865G,
>915G, E7221 (i915), 915GM, 

Re: King Jim Portabook

2016-12-10 Thread Matthieu Herrb
On Sat, Dec 10, 2016 at 08:33:47PM +0900, Ryan McBride wrote:
> On Sat, Dec 10, 2016 at 08:17:10PM +0900, Ryan McBride wrote:
> > So I've been eying this machine for a while:
> > http://www.kingjim.co.jp/sp/portabook/xmc10/
> 
> Included below is the dmesg with the previous diff applied.
> 
> Besides all the devices that show "not configured", there are a bunch of
> other things that don't work. I guess there's more broken that I haven't
> run into yet.
> 
> - Built-in keyboard does not work in the bootloader (an external USB
>   keyboard is fine)
> 
> - zzz fails with "acpi0: state S3 unavailable"
> 
> - Console does not use the whole screen, there is an empty border around
>   the whole screen (~2 chars tall at top and bottom, ~3 wide on the
>   sides)
> 
> - X fails to start (see below)

Since it uses efifb, creating an /etc/X11/xorg.conf with just

Section "Device"
Identifier "kingJim"
Driver "wsfb"
EndSection

should give you an un-accelerated X.
-- 
Matthieu Herrb


signature.asc
Description: PGP signature


Re: King Jim Portabook

2016-12-10 Thread Ryan McBride
On Sat, Dec 10, 2016 at 08:17:10PM +0900, Ryan McBride wrote:
> So I've been eying this machine for a while:
> http://www.kingjim.co.jp/sp/portabook/xmc10/

Included below is the dmesg with the previous diff applied.

Besides all the devices that show "not configured", there are a bunch of
other things that don't work. I guess there's more broken that I haven't
run into yet.

- Built-in keyboard does not work in the bootloader (an external USB
  keyboard is fine)

- zzz fails with "acpi0: state S3 unavailable"

- Console does not use the whole screen, there is an empty border around
  the whole screen (~2 chars tall at top and bottom, ~3 wide on the
  sides)

- X fails to start (see below)

Any ACPI hackers interested in a Christmas "gift"?


[23.406] (--) checkDevMem: using aperture driver /dev/xf86
[23.415] (--) Using wscons driver on /dev/ttyC4
[23.429] 
X.Org X Server 1.18.4
Release Date: 2016-07-19
[23.429] X Protocol Version 11, Revision 0
[23.429] Build Operating System: OpenBSD 6.0 amd64 
[23.429] Current Operating System: OpenBSD asdf.my.domain 6.0 GENERIC.MP#1 
amd64
[23.429] Build Date: 25 November 2016  11:21:01AM
[23.429]  
[23.429] Current version of pixman: 0.34.0
[23.429]Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
[23.429] Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[23.429] (==) Log file: "/var/log/Xorg.0.log", Time: Tue Dec 22 05:10:12 
2015
[23.432] (==) Using system config directory 
"/usr/X11R6/share/X11/xorg.conf.d"
[23.434] (==) No Layout section.  Using the first Screen section.
[23.434] (==) No screen section available. Using defaults.
[23.434] (**) |-->Screen "Default Screen Section" (0)
[23.435] (**) |   |-->Monitor ""
[23.437] (==) No monitor specified for screen "Default Screen Section".
Using a default monitor configuration.
[23.437] (==) Disabling SIGIO handlers for input devices
[23.438] (==) Automatically adding devices
[23.438] (==) Automatically enabling devices
[23.438] (==) Not automatically adding GPU devices
[23.439] (==) Max clients allowed: 256, resource mask: 0x1f
[23.457] (==) FontPath set to:
/usr/X11R6/lib/X11/fonts/misc/,
/usr/X11R6/lib/X11/fonts/TTF/,
/usr/X11R6/lib/X11/fonts/OTF/,
/usr/X11R6/lib/X11/fonts/Type1/,
/usr/X11R6/lib/X11/fonts/100dpi/,
/usr/X11R6/lib/X11/fonts/75dpi/
[23.457] (==) ModulePath set to "/usr/X11R6/lib/modules"
[23.457] (II) The server relies on wscons to provide the list of input 
devices.
If no devices become available, reconfigure wscons or disable 
AutoAddDevices.
[23.458] (II) Loader magic: 0x1b864e534020
[23.458] (II) Module ABI versions:
[23.458]X.Org ANSI C Emulation: 0.4
[23.458]X.Org Video Driver: 20.0
[23.458]X.Org XInput driver : 22.1
[23.458]X.Org Server Extension : 9.0
[23.459] (--) PCI:*(0:0:2:0) 8086:22b0:1b0a:01bc rev 32, Mem @ 
0x9000/16777216, 0x8000/268435456, I/O @ 0xf000/64
[23.459] (II) LoadModule: "glx"
[23.463] (II) Loading /usr/X11R6/lib/modules/extensions/libglx.so
[23.501] (II) Module glx: vendor="X.Org Foundation"
[23.501]compiled for 1.18.4, module version = 1.0.0
[23.501]ABI class: X.Org Server Extension, version 9.0
[23.501] (==) AIGLX enabled
[23.502] (==) Matched intel as autoconfigured driver 0
[23.502] (==) Matched vesa as autoconfigured driver 1
[23.502] (==) Assigned the driver to the xf86ConfigLayout
[23.502] (II) LoadModule: "intel"
[23.502] (II) Loading /usr/X11R6/lib/modules/drivers/intel_drv.so
[23.513] (II) Module intel: vendor="X.Org Foundation"
[23.513]compiled for 1.18.4, module version = 2.99.916
[23.513]Module class: X.Org Video Driver
[23.513]ABI class: X.Org Video Driver, version 20.0
[23.513] (II) LoadModule: "vesa"
[23.514] (II) Loading /usr/X11R6/lib/modules/drivers/vesa_drv.so
[23.516] (II) Module vesa: vendor="X.Org Foundation"
[23.516]compiled for 1.18.4, module version = 2.3.4
[23.516]Module class: X.Org Video Driver
[23.516]ABI class: X.Org Video Driver, version 20.0
[23.516] (II) intel: Driver for Intel(R) Integrated Graphics Chipsets:
i810, i810-dc100, i810e, i815, i830M, 845G, 854, 852GM/855GM, 865G,
915G, E7221 (i915), 915GM, 945G, 945GM, 945GME, Pineview GM,
Pineview G, 965G, G35, 965Q, 946GZ, 965GM, 965GME/GLE, G33, Q35, Q33,
GM45, 4 Series, G45/G43, Q45/Q43, G41, B43
[23.517] (II) intel: Driver for Intel(R) HD Graphics: 2000-6000
[23.517] (II) intel: Driver for Intel(R) Iris(TM) Graphics: 5100, 6100
[23.517] (II) intel: Driver for Intel(R) Iris(TM) Pro Graphics: 

King Jim Portabook

2016-12-10 Thread Ryan McBride
So I've been eying this machine for a while:
http://www.kingjim.co.jp/sp/portabook/xmc10/

Original price was a rediculous JPY 96,000 but it's dropped to a reasonable
JPY 20,000 (about USD 200) so I picked one up.

bsd.rd boots, but GENERIC / GENERIC.MP fail to parse the ACPI AML; it
needs the following diff to boot.

Perhaps someone more familiar with ACPI than I can pick this up and
actually do something useful with the ACPI_OPREG_GSB instead of just
skipping it.


Index: dev/acpi//dsdt.c
===
RCS file: /cvs/src/sys/dev/acpi/dsdt.c,v
retrieving revision 1.227
diff -u -p -u -r1.227 dsdt.c
--- dev/acpi//dsdt.c25 Oct 2016 06:48:58 -  1.227
+++ dev/acpi//dsdt.c27 Nov 2016 06:11:58 -
@@ -2031,6 +2031,9 @@ aml_convert(struct aml_value *a, int cty
c = aml_allocvalue(AML_OBJTYPE_BUFFER, a->length,
a->v_string);
break;
+   case AML_OBJTYPE_UNINITIALIZED:
+   c = aml_allocvalue(AML_OBJTYPE_BUFFER, 0, NULL);
+   break;
}
break;
case AML_OBJTYPE_INTEGER:
@@ -2064,6 +2067,9 @@ aml_convert(struct aml_value *a, int cty
c = aml_allocvalue(AML_OBJTYPE_STRING, a->length,
a->v_buffer);
break;
+   case AML_OBJTYPE_UNINITIALIZED:
+   c = aml_allocvalue(AML_OBJTYPE_STRING, 0, NULL);
+   break;
case AML_OBJTYPE_STRING:
aml_addref(a, "XConvert");
return a;
@@ -2462,6 +2468,8 @@ aml_rwfield(struct aml_value *fld, int b
val, mode, fld->v_field.flags);
} else if (fld->v_field.type == AMLOP_FIELD) {
switch (ref1->v_opregion.iospace) {
+   case ACPI_OPREG_GSB:
+   break;
case ACPI_OPREG_GPIO:
aml_rwgpio(ref2, bpos, blen, val, mode,
fld->v_field.flags);