Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config file gets overwritten with xrandr changes #3513

Closed
jeffeb3 opened this issue Nov 8, 2018 · 7 comments
Closed

Config file gets overwritten with xrandr changes #3513

jeffeb3 opened this issue Nov 8, 2018 · 7 comments

Comments

@jeffeb3
Copy link

jeffeb3 commented Nov 8, 2018

I'm submitting a…

[x] Bug
[ ] Feature Request
[ ] Documentation Request
[ ] Other (Please describe in detail)

Current Behavior

I have spent some time in the last day or so configuring i3 (for the first time, happy to be here). I am using bumblebee-status, and the xrandr module. Long story short, when I disable or enable a monitor using that module, my screens momentarily flicker (similar to reloading the configuration) and the configuration looks like the one from yesterday. When I look at the file I was editing (~/.config/i3/config), sure enough it's the old text file. I just tried it again, and I am sure that disabling and enabling the second monitor is causing it to remove the changes to that file. It's weird that it's not the default, it's reverting to the file I made yestereday.

Expected Behavior

It might have trouble, it might crash, but if it's going to clobber my config file, it had better keep a copy...

Reproduction Instructions

I don't know xrandr well enough, but I know that when I click on DP-6.8 to turn on or off that monitor, the settings to back to the ones I had a few days ago. I immediately change the theme to solarized-powerline, save, alt+shift+r to reload, then click on the DP-6.8 to turn off the monitor, and my file is reverted and the status line is back to solarized.

Environment

Output of i3 --moreversion 2>&-:

i3 --moreversion 2>&-
Binary i3 version:  4.16 (2018-11-04) © 2009 Michael Stapelberg and contributors
Running i3 version: 4.16 (2018-11-04) (pid 2540)o abort…)
Loaded i3 config: /home/jeffe/.config/i3/config (Last modified: Thu 08 Nov 2018 04:18:44 PM MST, 146 seconds ago)

The i3 binary you just called: /usr/bin/i3
The i3 binary you are running: i3

config.txt

Logfile URL:

I'll look into making that next.

- Linux Distribution & Version: Ubuntu 16.04
- Are you using a compositor (e.g., xcompmgr or compton): No.
@i3bot i3bot added the bug label Nov 8, 2018
@i3bot
Copy link

i3bot commented Nov 8, 2018

I don’t see a link to logs.i3wm.org. Did you follow https://i3wm.org/docs/debugging.html? (In case you actually provided a link to a logfile, please ignore me.)

@i3bot i3bot added missing-log Read the CONTRIBUTING.md file for instructions 4.16 labels Nov 8, 2018
@jeffeb3
Copy link
Author

jeffeb3 commented Nov 9, 2018

Here is the log file. Is there any other info that would be helpful?

https://logs.i3wm.org/logs/5703897561694208.bz2

@i3bot i3bot removed the missing-log Read the CONTRIBUTING.md file for instructions label Nov 9, 2018
@jeffeb3
Copy link
Author

jeffeb3 commented Nov 9, 2018

Also, this is the source for the xrandr module: https://github.com/tobi-wan-kenobi/bumblebee-status/blob/master/bumblebee/modules/xrandr.py

It also calls this script: https://github.com/tobi-wan-kenobi/bumblebee-status/blob/master/bin/toggle-display.sh

The end result looks (to me) like it's calling xrandr --output DP-6.8 off.

@Airblader
Copy link
Member

We never write to the config file in i3, except for i3-config-wizard. So I'm somewhat doubtful that i3 is causing this. Can you use auditing tools like auditctl to see which process is modifying the file?

@jeffeb3
Copy link
Author

jeffeb3 commented Nov 9, 2018

I haven't ever used auditctl. That will come in handy. But I figured it out, and you're right, it is not i3, it's the bumblebee-status's xrandr module. The toggle-display.sh calls this script:

https://github.com/tobi-wan-kenobi/bumblebee-status/blob/master/bin/load-i3-bars.sh

And look at the first thing it does:

if [ ! -f ~/.config/i3/config.template ]; then
	cp ~/.config/i3/config ~/.config/i3/config.template
else
	cp ~/.config/i3/config.template ~/.config/i3/config
fi

Why? I think they are thinking there is some monitor specific configurations, but it's not in the documentation I've seen... Thanks for looking at this issue with me.

@jeffeb3 jeffeb3 closed this as completed Nov 9, 2018
@Airblader
Copy link
Member

I haven't ever used auditctl. That will come in handy.

(Me either, I just found it googling for auditing files. Good to know it works well!)

@jeffeb3
Copy link
Author

jeffeb3 commented Nov 9, 2018

I can't actually vouch for auditctl, I got as far as sudo apt install auditd, and then thought I should figure out what the rest of that script was doing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants