Re: starting X when login on certain tty

2017-03-06 Thread Matej Nanut
On 6 March 2017 at 12:35, Marko Cupać  wrote:
> Hi,
>
> I'd like to start X immediately after login on certain local tty with
> ksh as a login shell.
>

Hey, the following in .kshrc works for me.

if [ "$(tty)" = /dev/ttyC0 ]; then
  startx
fi

But I just type "startx" these days.

Cheers,
Matej



Re: X "si" keyboard layout changes in recent snapshots

2016-08-13 Thread Matej Nanut
On 13 August 2016 at 03:05, Walter Alejandro Iglesias
 wrote:
> Probably what you're experiencing is a side effect of that changes.

Yes! Great find. I reverted the patch in that message, and it started
working. There are no additional errors.

We're apparently using the head git version, not the 1.3.1 tag, as
this change hasn't made it into a release yet.

I reported this in the discussion on their bugzilla[0].

[0]: https://bugs.freedesktop.org/show_bug.cgi?id=57242#c36



X "si" keyboard layout changes in recent snapshots

2016-08-12 Thread Matej Nanut
Hello,

something seems to have changed in the "si" keyboard layout with
respect to AltGr combinations in recent snapshots. I've never used any
other layouts so I don't know if they changed too.

AltGr+1 no longer produces a tilde, and I can't type umlauts (AltGr+'
-> a for ä). At first I thought it was dead keys not working, but
AltGr+, and AltGr+. no longer produce < and > either.

Some usages continue to work, however. For example @ (AltGr+V) or €
(AltGr+E).

TTYs work fine as before.

No xenocara commits strike me as suspicious on openbsd-cvs in the past
month, but there was an xkeyboard-config update relatively recently. I
tried reverting it, but the behaviour is the same. The symbols in
/usr/xenocara/dist/xkeyboard-config/symbols/rs (which "si" includes)
also seem fine to me.

Below are outputs of some relevant commands:

$ setxkbmap -v
Trying to build keymap using the following components:
keycodes:   xfree86+aliases(qwertz)
types:  complete
compat: complete
symbols:pc+si+inet(pc105)+terminate(ctrl_alt_bksp)
geometry:   pc(pc105)

$ cat /etc/X11/xorg.conf.d/keyboard.conf
Section "InputClass"
Identifier  "keyboard-any"
MatchIsKeyboard "true"
Option  "XkbLayout" "si"
Option  "XkbVariant" ""
EndSection

$ xev
# Pressing "1".
KeyPress event, serial 33, synthetic NO, window 0xe1,
root 0xb0, subw 0x0, time 14503233, (89,89), root:(478,546),
state 0x0, keycode 10 (keysym 0x31, 1), same_screen YES,
XLookupString gives 1 bytes: (31) "1"
XmbLookupString gives 1 bytes: (31) "1"
XFilterEvent returns: False

# Pressing "AltGr".
KeyPress event, serial 33, synthetic NO, window 0xe1,
root 0xb0, subw 0x0, time 14501445, (89,89), root:(478,546),
state 0x0, keycode 113 (keysym 0xfe03, ISO_Level3_Shift), same_screen
YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False

# Pressing "AltGr+1".
KeyPress event, serial 33, synthetic NO, window 0xe1,
root 0xb0, subw 0x0, time 14502542, (89,89), root:(478,546),
state 0x80, keycode 10 (keysym 0x0, NoSymbol), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False

Thanks,
Matej



Re: Synaptics/Chrome two-finger scrolling behaviour

2016-06-06 Thread Matej Nanut
On Mon, Jun 6, 2016 at 2:34 PM, Henrik Friedrichsen  wrote:
> Good to know. Looks like it is a Chromium problem then.

I noticed the option to navigate by overscrolling was turned on by
default in version 51. Maybe it has something to do with this? Maybe
common code changes?

I disabled it immediately because I find it annoying.

You can find it at chrome://flags/. The option is named "Overscroll
history navigation".



Re: Subpixel / RGB antialiasing

2016-04-15 Thread Matej Nanut
On 15 April 2016 at 03:08, Paolo Aglialoro  wrote:
> I know nothing about Canadian law, but here in EU software patents, after
> multiple fierce battles in European parliament, have never been recognised.
>
> This said, afaik, SW patents are just a US hassle. Does it make sense
> considering them problematic if the OS is "made in Canada"?

I took this patch from Arch Linux's freetype package[0], but I didn't
feel the need to include all of them.

If Arch can include it by default, OpenBSD probably can too?

I for sure could not migrate to OpenBSD full time without enabling the
feature, but I don't mind patching it manually. :)

Note though, that enabling the feature does some weird things to font
rendering in urxvt, where things show graphical glitches without the
"URxvt.letterSpace: -1" X resource. I don't know how other terminal
emulators handle it.

[0] 
https://projects.archlinux.org/svntogit/packages.git/tree/trunk?h=packages/freetype2



Re: Subpixel / RGB antialiasing

2016-04-14 Thread Matej Nanut
Hello,

OpenBSD's freetype library is built without the feature.

If you have your source trees set up, you can rebuild it after
uncommenting FT_CONFIG_OPTION_SUBPIXEL_RENDERING in
/usr/xenocara/lib/freetype/include/freetype/config/ftoption.h.



Re: xbacklight / screen brightness

2016-04-07 Thread Matej Nanut
Ted Unangst  wrote:
> It's a bug and it's worth reporting as much info about your hardware as
> possible, but don't expect a quick fix. As a workaround, just run
'xbacklight
> 50 ; xbacklight 100' or whatever you want.
>

Hello, I've an ASUS K53SV and the brightness also behaves oddly.

Values for "wsconsctl display.brightness" between 2 and 100 set it to
8/10. 1 sets it to 7/10 and 0 sets it to 0/10. After assignment, it
always prints "100%".

xbacklight works the same way, except that setting it to 100 doesn't
do anything at all, and -get always prints 100 (with a bunch of
decimals).

Using the keyboard keys works, and allows setting the brightness to
max. But the setting is forgotten after DPMS triggers or after
switching to a TTY. Every change with the keys or with xbacklight
takes a little moment to happen, while it is instant with wsconsctl.

I'm not sure if it's relevant, but the audio keys don't work, and
neither they nor the backlight keys show up with xev(1). I built the
kernel with ACPIASUS_DEBUG and WSKBD_DEBUG, but no messages are
printed on these events.

Also, the same problem used to be present on Linux, but got fixed at
some point since I started using OpenBSD more than a year ago, so I
have no idea which version fixed it.

I'd like to try fixing this, but I don't know which drivers/files are
responsible for these things in my case. Can you give me a hint?

Matej

$ dmesg
OpenBSD 5.9-current (compile) #0: Tue Apr  5 20:06:57 CEST 2016
matej@puffy:/home/matej/openbsd/compile
real mem = 8479825920 (8086MB)
avail mem = 8218599424 (7837MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xebc30 (100 entries)
bios0: vendor American Megatrends Inc. version "K53SV.315" date 09/26/2011
bios0: ASUSTeK Computer Inc. K53SV
acpi0 at bios0: rev 2
acpi0: sleep states S0 S1 S3 S4 S5
acpi0: tables DSDT FACP APIC HPET ECDT MCFG SSDT SSDT SSDT
acpi0: wakeup devices P0P1(S4) EHC1(S3) USB1(S3) USB2(S3) USB3(S3)
USB4(S3) EHC2(S3) USB5(S3) USB6(S3) USB7(S3) PXSX(S4) PXSX(S4)
PXSX(S4) PXSX(S4) PXSX(S4) PXSX(S4) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i7-2670QM CPU @ 2.20GHz, 2195.34 MHz
cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX
,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,X
SAVE,AVX,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.1.2, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Core(TM) i7-2670QM CPU @ 2.20GHz, 2195.01 MHz
cpu1:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX
,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,X
SAVE,AVX,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 4 (application processor)
cpu2: Intel(R) Core(TM) i7-2670QM CPU @ 2.20GHz, 2195.01 MHz
cpu2:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX
,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,X
SAVE,AVX,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 2, package 0
cpu3 at mainbus0: apid 6 (application processor)
cpu3: Intel(R) Core(TM) i7-2670QM CPU @ 2.20GHz, 2195.01 MHz
cpu3:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX
,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,X
SAVE,AVX,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 0, core 3, package 0
cpu4 at mainbus0: apid 1 (application processor)
cpu4: Intel(R) Core(TM) i7-2670QM CPU @ 2.20GHz, 2195.01 MHz
cpu4:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX
,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,X
SAVE,AVX,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu4: 256KB 64b/line 8-way L2 cache
cpu4: smt 1, core 0, package 0
cpu5 at mainbus0: apid 3 (application processor)
cpu5: Intel(R) Core(TM) i7-2670QM CPU @ 2.20GHz, 2195.01 MHz
cpu5:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX

Re: sndiod fallback trouble

2016-02-27 Thread Matej Nanut
On 27 February 2016 at 10:15, Alexandre Ratchov  wrote:
> One option would to patch libsndio to try more devices (how many?).

I've also noticed this issue and have hacked libsndio to try snd/0 and
snd/1 first, which is basically the same as your suggestion.

> A nicer approach would be to handle this in sndiod [...]

That would be fantastic, but seems like quite a lot of work. I don't
know enough about the audio stack to really comment, but can't there
be problems with a device changing for the program mid stream? Or
would you add a special "trunk-like" pseudo device?

What do you think of adding a separator to AUDIODEVICE, to be able to
list more than one device (like : or ;)? Then libsndio just tries them
one after another, and you don't have to guess how many. It's a simple
backwards-compatible fix, but it doesn't address device migration.

I guess fixing it in sndiod is the right way, though.



Re: difficulties with ext2 drives

2016-01-04 Thread Matej Nanut
Hey again;

I know this is an old issue, but I tried resizing my partition to 500
G (was 2 TB) with resize2fs and it started working.

I tried putting some print statements in the ext2fs kernel driver and
noticed the block numbers being huge numbers, so I assumed some sort
of integer overflow. The function bounds_check_with_label consistently
returns EINVAL.



Re: Networking Menu option during boot

2015-11-04 Thread Matej Nanut
I also miss network profiles from Arch.

Currently, I have shell scripts for the various networks I need, and
run them manually.

I don't use hostname.if(5) with trunk or similar, because I simply
don't know in advance which network I'll connect to.

There's probably a better way of doing this that I'm not aware of.

Matej



Re: Keyboard and touchpad aren't working properly in X

2015-11-03 Thread Matej Nanut
On 3 November 2015 at 12:28, Артур Истомин 
wrote:
> Did You mean "Ctrl+U + Ctrl+V"? Because I can only remove string
> left of cursor with Ctrl+U without pasting what in a X's buffer.
>

Sorry for the confusion. I actually meant "delete all", because I
usually want to search for something or input a URL.

Matej



Re: Keyboard and touchpad aren't working properly in X

2015-11-02 Thread Matej Nanut
On 3 November 2015 at 06:49, Артур Истомин 
wrote:
> I want crossplatform keybindings in GUI applications:
>
> Ctrl+A - select all in input field
> Ctrl+W - close tab
> ..etc.

When you select a textbox at the end, you can do Ctrl+Shift+A, which
will select everything. If you're not at the end, just do Ctrl+E
first. After I struggled with this, I found out I don't actually need
"select all", but "replace all", which is basically Ctrl+U when your
cursor is at the end.

Also, Ctrl+W works just fine, but only if you don't have a text input
selected.

Matej



Re: difficulties with ext2 drives

2015-10-26 Thread Matej Nanut
Hey,

I've reported, possibly incorrectly, the exact same issue here:

https://www.marc.info/?l=openbsd-misc=144408289116398

I tried formatting a different partition on my internal drive as ext2
from an Ubuntu live DVD and that works as expected, but it is much
smaller (30 G vs 2 TB).

Matej



Reading certain files from external ext2fs drive fails

2015-10-05 Thread Matej Nanut
Hello,

I'm trying to access files on my Seagate 2TB external USB drive,
formatted ext2, but reading some files fails. I'm running -current. It
works with a live image of Ubuntu 15.04.

I'm running md5 as an example program, but others, like cp, fail as well.

For example:
# ls -l IMG_20131113_231542.jpg
-rw---  1 matej  _ldapd   879K Jul 14 17:29 IMG_20131113_231542.jpg
# md5 IMG_20131113_231542.jpg
md5: IMG_20131113_231542.jpg: read error: Invalid argument

A common thread is file size. In that folder, reading does work on a
40K image, and in so far I haven't found a sub-100K file that doesn't
work. Some ~500K files also work. Their ls output is nothing special.

I tried mounting the disk both with and without "-o ro".

The relevant dmesg shows no errors:
umass0 at uhub4 port 2 configuration 1 interface 0 "Seagate BUP Slim
SL" rev 2.10/1.43 addr 4
umass0: using SCSI over Bulk-Only
scsibus4 at umass0: 2 targets, initiator 0
sd1 at scsibus4 targ 1 lun 0:  SCSI4 0/direct fixed
sd1: 1907729MB, 512 bytes/sector, 3907029167 sectors

I'll post the full dmesg and the output of fdisk, disklabel and
dumpe2fs at the end.

I have no idea how to resolve this issue, and I would gladly supply
any required info.

And I would like to apologise for Gmail's text wrapping; is it being
tolerated these days or should I switch clients? The faq is pretty
definitive about this.

Thanks,
matej


# fdisk /dev/rsd1c
Disk: /dev/rsd1c geometry: 243201/255/63 [3907029167 Sectors]
Offset: 0 Signature: 0xAA55
Starting Ending LBA Info:
 #: id  C   H   S -  C   H   S [   start:size ]
---
 0: 83  0  32  33 - 243201  80  62 [2048:  3907027119 ] Linux files*
 1: 00  0   0   0 -  0   0   0 [   0:   0 ] unused
 2: 00  0   0   0 -  0   0   0 [   0:   0 ] unused
 3: 00  0   0   0 -  0   0   0 [   0:   0 ] unused

# disklabel /dev/rsd1c
# /dev/rsd1c:
type: SCSI
disk: SCSI disk
label: BUP Slim SL
duid: 
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 255
sectors/cylinder: 16065
cylinders: 243201
total sectors: 3907029167
boundstart: 0
boundend: 3907029167
drivedata: 0

16 partitions:
#size   offset  fstype [fsize bsize  cpg]
  c:   39070291670  unused
  i:   3907027119 2048  ext2fs

# dumpe2fs /dev/rsd1i
dumpe2fs 1.42.12 (29-Aug-2014)
Filesystem volume name:   Seagate 2TB
Last mounted on:  
Filesystem UUID:  4bc16d12-4ed0-4579-a548-af206edd3121
Filesystem magic number:  0xEF53
Filesystem revision #:1 (dynamic)
Filesystem features:  ext_attr resize_inode dir_index filetype
sparse_super large_file
Filesystem flags: signed_directory_hash
Default mount options:user_xattr acl
Filesystem state: clean
Errors behavior:  Continue
Filesystem OS type:   Linux
Inode count:  1907840
Block count:  488378389
Reserved block count: 24418919
Free blocks:  422901547
Free inodes:  1882095
First block:  0
Block size:   4096
Fragment size:4096
Reserved GDT blocks:  907
Blocks per group: 32768
Fragments per group:  32768
Inodes per group: 128
Inode blocks per group:   8
Filesystem created:   Sun Aug  9 21:35:12 2015
Last mount time:  Mon Oct  5 01:02:10 2015
Last write time:  Mon Oct  5 23:32:15 2015
Mount count:  9
Maximum mount count:  -1
Last checked: Sun Aug  9 21:35:12 2015
Check interval:   0 ()
Lifetime writes:  252 GB
Reserved blocks uid:  0 (user root)
Reserved blocks gid:  0 (group wheel)
First inode:  11
Inode size:  256
Required extra isize: 28
Desired extra isize:  28
Default directory hash:   half_md4
Directory Hash Seed:  f297e67d-332b-4ca6-9cbc-5706a327bb88

# dmesg
OpenBSD 5.8-current (GENERIC.MP.FONT) #0: Wed Sep 30 22:14:56 CEST 2015
matej@puffy:/usr/src/sys/arch/amd64/compile/GENERIC.MP.FONT
real mem = 8479825920 (8086MB)
avail mem = 8218701824 (7837MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xebc30 (100 entries)
bios0: vendor American Megatrends Inc. version "K53SV.315" date 09/26/2011
bios0: ASUSTeK Computer Inc. K53SV
acpi0 at bios0: rev 2
acpi0: sleep states S0 S1 S3 S4 S5
acpi0: tables DSDT FACP APIC HPET ECDT MCFG SSDT SSDT SSDT
acpi0: wakeup devices P0P1(S4) EHC1(S3) USB1(S3) USB2(S3) USB3(S3)
USB4(S3) EHC2(S3) USB5(S3) USB6(S3) USB7(S3) PXSX(S4) PXSX(S4)
PXSX(S4) PXSX(S4) PXSX(S4) PXSX(S4) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i7-2670QM CPU @ 2.20GHz, 2195.33 MHz