You are not logged in.
By default my screen resolution is wrong, so I put three lines of code in i3 config to fix the issue, but it doesn't seem to work for some reason.
Here's the code:
exec xrandr --newmode "1920x1080_60.00" 172.80 1920 2040 2248 2576 1080 1081 1084 1118 -HSync +Vsync
exec xrandr --addmode "Virtual1" 1920x1080_60.00
exec_always xrandr --output "Virtual1" --mode 1920x1080_60.00
Offline
You're better off doing this in your session script *before* running i3, however: how do you determine it's not executed?
Does the new mode show up in "xrandr -q"?
Is the config executed in general? Eg. does "exec_always touch /tmp/i3.touch" create and update the timestamps of that file?
Offline
It doesn't work because it's supposed to enter the mode. Also, when I enter xrandr -q the new mode doesn't show up for some reason - even though these exact commands work perfectly when I write them myself in the terminal
Last edited by Vanimion (2021-07-05 04:05:28)
Offline
when I enter xrandr -q the new mode doesn't show up for some reason
Is the config executed in general? Eg. does "exec_always touch /tmp/i3.touch" create and update the timestamps of that file?
You're better off doing this in your session script *before* running i3
Offline
Yes, the config is executed in general, because I have other code in the config file that actually works. It seems to just be these three lines that are not doing anything.
I tried to run the script on startup with systemd, but it didn't work and just ended up saying "Can't open display" three times over.
Offline
Please post your i3config.
You can only run this after the X11 server is up, eg. in some DM script or your xinitrc (before running i3) -> how do you start i3?
Offline
Does it work when you run those commands (i.e. without exec) in the terminal ?
Also, you might want to edit your /etc/X11/xorg.conf.d/##-monitor.conf so that you don't have to add a new mode everytime.
Note: in my i3 config (right on top) I have an exec ~/.screenlayout/set_display.sh where the script was produced by "arandr". It works everytime.
Offline