theotherjimmy / autorandr-rs

like autorandr, but kdl and a daemon
38 stars 4 forks source link

About laptop screen #2

Closed seqizz closed 3 years ago

seqizz commented 3 years ago

Hi there,

Now I am trying to set my configuration, got this output from randr-edid:

[monitors.eDP-1]

[monitors.DP-3-3]
product = 'DELL U2415'
serial = '7MT016C94RAS'

[monitors.DP-3-2]
product = 'DELL U2415'
serial = '7MT016C94PKS'

eDP-1 is laptop monitor. It doesn't supply anything apparently. Configured the toml like:

[monitors.eDP-1]

[monitors.DP-3-3]
product = 'DELL U2415'
serial = '7MT016C94RAS'

[monitors.DP-3-2]
product = 'DELL U2415'
serial = '7MT016C94PKS'

[configurations.Work-Desktop]
monitors = ["DP-3-2", "DP-3-3"]
[configurations.Work-Desktop.DP-3-2]
mode = "1920x1200"
position = "0x0"
primary = false
[configurations.Work-Desktop.DP-3-3]
mode = "1920x1200"
position = "1920x0"
primary = true

Always fails with Error: Monitor change indicated, and the connected monitors did not match a config. I've tried removing the eDP-1 line, didn't differ.

Also, I should specify a "non-attached mode" which specifies only eDP-1 I guess (to switch back to laptop monitor)?

Thanks :tada:

theotherjimmy commented 3 years ago

You probably need to include eDP-1 in the monitor list of the Work-Desktop configuration. It's probably attached after all.

Asside from that, I'd have to add more instrumentation to the code to see what is going on.

theotherjimmy commented 3 years ago

Yes, you should specify a mode when only eDP-1 is attached, so that when you remove the other monitors autorandrd knows to switch back.

seqizz commented 3 years ago

I just did and got:

thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/bin/autorandrd.rs:42:28

Probably there is nothing under eDP-1's specification.

Asside from that, I'd have to add more instrumentation to the code to see what is going on.

Will wait for instructions then. We need something to distinguish this monitor I assume :+1: I couldn't manage to get any serial or anything for laptop screen with the commands I know.

theotherjimmy commented 3 years ago

Oh, that's interesting. It looks like that note above is not correct!

theotherjimmy commented 3 years ago

I was able to reproduce the issue. I'm working on a fix.

theotherjimmy commented 3 years ago

This was longer than I thought, see eb320e0cd90f5a918f1ba0cd189f2f591d23b30e and c8cd814dcdb25551e9acc7b777979a73b2241612 for a full explanation.

My reproducer no longer fails with current master. Could you try the latest master?

seqizz commented 3 years ago

Looks like working. Thanks! There is another issue, which deserves its own issue, once I can dive a bit more and reproduce. Closing this one :tada: