-
Notifications
You must be signed in to change notification settings - Fork 5
Custom conf & Upgrading #77
Comments
Configuration: First: common.conf seems overkill since they are all options defined for the daemon and not likely to change. It's true that optirun needs to know some of them but should be accessible by other means. So I would keep only two configuration files only. The above changes the point of view of the load_settings function. This should be the means of loading those configuration files (by sourcing them). optirun needs to know everything: daemon configuration and optirun configuration. Other way is to poll the daemon with "getter" functions (seems the better one for me) to know the daemon variables. In this way we are certain that a variable is set in the currently running daemon, would prevent the scenario when a configuration file is changed but the daemon is still running and didn't restart. Default configuration files should always be into /etc/bumblebee/ since is the configuration directory. The user configurations should be set for optirun side (client) only. The daemon is started in single-user mode at boot time and can't depend on the user home directory. However we can put the custom optirun.conf into ~/.bumblebee/optirun.conf so it can be customized for each user separately. The xorg.conf files should be in the main configuration directory (/etc/bumblebee/) since they are less likely to change, they are system specific files and not user-specific. The whole idea for load_settings function should be retrieve (or re-read) the variables only when needed. In that way we can change a setting and the daemon/optirun would behave with no issues. |
I second Samsagax on the common.conf, it should be merged with bumblebee.conf. The settings are all relevant to the server. All of the server settings may be relevant to the client. E.g. when power management is enabled, the client may decide not to use bumblebee. Same for the xorg.conf.* settings, those do not need to be in /usr/share/bumblebee/ since they're never used. The {bumblebee,optirun}.conf files can serve as defaults, but the X server never used the xorg conffiles in /usr/share/bumblebee/. |
Understand about the common.conf. So, merge that with bumblebee.conf, and source it also in optirun. About user specific conf files, maybe you didn't understand why I'm wanting todo that:
What that does mean, is that if the user change something in a conf file that we use as default, user would be asked on upgrade. If we hardcode defaults, we won't have a file with parameters description to help the user understand. Problem is the same with xorg.conf, if user want to use a custom one, which is the point we discussed in a other issue, would be prompted on upgrade, which is something we want to avoid. By the way you're right Samsagax, I was tired and forgot that in my post, we should add a function that returns conf var values, it would also be usefull for the API. |
The user should never have a need to modify the xorg.conf files and if (s)he does, (s)he would know why. On upgrade, the user is only prompted if the conffile has changed (for dpkg). The prompt exists to avoid overwriting custom modifications, but also give the user a chance to get changes from the new conffile into the current one. |
We already discussed that, we have to avoid this prompt whatever is happening. About xorg.conf, I agree, we're not going to change it at all, and an user modifying it should know what he does, so that's OK. But for common conf files, we should have a default and a custom. Or we could just update the custom with the default from the package maybe ? |
The "default" is in /usr[/local]/share/bumblebee/{optirun,bumblebee}.conf. On upgrade, this defaults file is copied to a temporary location, replaced with the values set in /etc/bumblebee/{optirun,bumblebee}.conf and then placed back in /etc/bumblebee. |
Yes, that is what I've proposed above. But Sam isn't agreeing on that. |
I don't see where Sam disagrees on it. There are three kind of settings:
As for Sams idea for a "getter" function, we currently have no way to poll the daemon for functions. That discussion is for #21 |
Ok, I wasn't seeing that like this, but make sens. About per-user, that would be only optirun one, wouldn't it ? |
The per-user settings indeed apply to optirun only. We should refer to "bumblebee" (or "[bumblebee] daemon") as server and "optirun" when talking about the client part. |
There is the part where I disagree. Just the location. But needs a little more discussion. Today I'm not available for anything, will try to explain tonight my point of view. (I think I've found a solution that can be what we all want: user friendly and user centric) |
Well here is my two cents to this matter: I would put the defaults into
My main concern is not to put configuration files under Simple isn't it? |
I don't feel for putting a lot (read-only) files in At first, me and ArchangeGabriel were thinking about reading the settings from the current /etc/bumblebee/bumblebee.conf file, copying the conffile from /usr/share/bumblebee/ and then inserting the previous settings in /etc/bumblebee/. Now, another approach would be keeping everything commented in /etc (since those are defaults), and stick to the compiled defaults in /usr/share/bumblebee/. On upgrade, we've some options:
Are there any disadvantages of this in your opinion? |
Sounds complex to parse options to add them. I understand the need to keep the users configuration but htose are files taht won't be moved along that much. They shouldn't as once they are set up they can be run forever. |
Update: so Samsagax just agreed with the /usr/share change: /usr/share/bumblebee/{optirun,bumblebee}.conf contain read-only program defaults which should keep bumblebee running even if /etc/bumblebee is missing. Note that the xorg.conf will not be stored in it since it's likely to change. |
- bumblebee.conf will contain configurations for the daemon and bumblebee globally - optirun.conf will contain the configurations specific for the client side Duplicated optirun options are kept in the bumblebee.conf until full installer and common-functions support is achieved
The common-functions support is complete
Configuration files are split into "bumblebee.conf" and "optirun.conf". Next step is to copy this two files into "/usr/share/bumblebee/" (variable DATADIR) to keep them as safe defaults.
I'm unmerging it, this feature isn't fully ready, I prefer to keep it for later. |
Please keep the conffiles separated, it needs to be implemented anyway and avoids future confusion for new users. |
Strangely, I'm thinking that keeping it as a "one-file" for now is less confusing, splitting would be nicer if released together with other changes planned here. |
Ok, postponed for a release after 2.4 until the feature is mature. I guess we can import the custom settings later. |
Outdated. |
Really ? What happened to bumblebee.conf and other conf files (xorg.conf.driver, ...) ? |
Oh, outdated was referring to splitting the config. The prompt on overwriting the config still exists but should not be discussed here but on the repo for BB3. Join #bumblebee-dev if you;ve time. |
Re-opening just for triage. |
We discussed a lot about custom configuration file and concerns with upgrading (and also load_settings function).
What we decided:
No any changes for common-paths or its use.
Please discuss this here or in IRC (then summary the discussion here if there is something interesting in it).
The text was updated successfully, but these errors were encountered: